diff --git a/CHANGELOG.md b/CHANGELOG.md index e74a761e..ce23aed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.13.0](https://github.com/googleapis/google-cloudevents-java/compare/v0.12.0...v0.13.0) (2023-06-20) + + +### Features + +* Run the code generator ([#205](https://github.com/googleapis/google-cloudevents-java/issues/205)) ([aee9649](https://github.com/googleapis/google-cloudevents-java/commit/aee96491b3ad50f7f83f233ecfee6728009a705f)) +* Run the code generator (5377927) ([#202](https://github.com/googleapis/google-cloudevents-java/issues/202)) ([852c4e8](https://github.com/googleapis/google-cloudevents-java/commit/852c4e8eba7c130cb84b975bec9b97c7bf9e5202)) + ## [0.12.0](https://github.com/googleapis/google-cloudevents-java/compare/v0.11.0...v0.12.0) (2023-06-06) diff --git a/google-cloudevent-types/pom.xml b/google-cloudevent-types/pom.xml index bb682604..79301777 100644 --- a/google-cloudevent-types/pom.xml +++ b/google-cloudevent-types/pom.xml @@ -6,7 +6,7 @@ com.google.cloud google-cloudevent-types - 0.12.0 + 0.13.0 google-cloudevent-types https://github.com/googleapis/google-cloudevents-java @@ -16,7 +16,7 @@ com.google.cloud google-cloudevent-types-parent - 0.12.0 + 0.13.0 diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValue.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValue.java new file mode 100644 index 00000000..73d74d68 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValue.java @@ -0,0 +1,986 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * An array value.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.ArrayValue} + */ +public final class ArrayValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.ArrayValue) + ArrayValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayValue.newBuilder() to construct. + private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArrayValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArrayValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.ArrayValue.class, + com.google.events.cloud.datastore.v1.ArrayValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List values_; + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.ValueOrBuilder getValuesOrBuilder(int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.ArrayValue)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.ArrayValue other = + (com.google.events.cloud.datastore.v1.ArrayValue) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.ArrayValue 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; + } + /** + * + * + *
+   * An array value.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.ArrayValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.ArrayValue) + com.google.events.cloud.datastore.v1.ArrayValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.ArrayValue.class, + com.google.events.cloud.datastore.v1.ArrayValue.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.ArrayValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue build() { + com.google.events.cloud.datastore.v1.ArrayValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue buildPartial() { + com.google.events.cloud.datastore.v1.ArrayValue result = + new com.google.events.cloud.datastore.v1.ArrayValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.datastore.v1.ArrayValue result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.ArrayValue result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.ArrayValue) { + return mergeFrom((com.google.events.cloud.datastore.v1.ArrayValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.ArrayValue other) { + if (other == com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance()) + return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.events.cloud.datastore.v1.Value m = + input.readMessage( + com.google.events.cloud.datastore.v1.Value.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Value, + com.google.events.cloud.datastore.v1.Value.Builder, + com.google.events.cloud.datastore.v1.ValueOrBuilder> + valuesBuilder_; + + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public com.google.events.cloud.datastore.v1.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder setValues(int index, com.google.events.cloud.datastore.v1.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder setValues( + int index, com.google.events.cloud.datastore.v1.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder addValues(com.google.events.cloud.datastore.v1.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder addValues(int index, com.google.events.cloud.datastore.v1.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder addValues(com.google.events.cloud.datastore.v1.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder addValues( + int index, com.google.events.cloud.datastore.v1.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public com.google.events.cloud.datastore.v1.Value.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public com.google.events.cloud.datastore.v1.ValueOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public com.google.events.cloud.datastore.v1.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder(com.google.events.cloud.datastore.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public com.google.events.cloud.datastore.v1.Value.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.events.cloud.datastore.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Values in the array.
+     * The order of values in an array is preserved as long as all values have
+     * identical settings for 'exclude_from_indexes'.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Value, + com.google.events.cloud.datastore.v1.Value.Builder, + com.google.events.cloud.datastore.v1.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Value, + com.google.events.cloud.datastore.v1.Value.Builder, + com.google.events.cloud.datastore.v1.ValueOrBuilder>( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.ArrayValue) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.ArrayValue) + private static final com.google.events.cloud.datastore.v1.ArrayValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.ArrayValue(); + } + + public static com.google.events.cloud.datastore.v1.ArrayValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValueOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValueOrBuilder.java new file mode 100644 index 00000000..0d190215 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ArrayValueOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface ArrayValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.ArrayValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + java.util.List getValuesList(); + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + com.google.events.cloud.datastore.v1.Value getValues(int index); + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + int getValuesCount(); + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + * + * + *
+   * Values in the array.
+   * The order of values in an array is preserved as long as all values have
+   * identical settings for 'exclude_from_indexes'.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Value values = 1; + */ + com.google.events.cloud.datastore.v1.ValueOrBuilder getValuesOrBuilder(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Data.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Data.java new file mode 100644 index 00000000..3f1a1204 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Data.java @@ -0,0 +1,238 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public final class Data { + private Data() {} + + 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_events_cloud_datastore_v1_EntityEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_EntityEventData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_PropertyMask_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_EntityResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_PartitionId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_Key_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_Key_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_Key_PathElement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_ArrayValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_Value_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_Value_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_Entity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/events/cloud/datastore/v1/data." + + "proto\022 google.events.cloud.datastore.v1\032" + + "\034google/protobuf/struct.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\030google/type/latl" + + "ng.proto\"\330\001\n\017EntityEventData\022=\n\005value\030\001 " + + "\001(\0132..google.events.cloud.datastore.v1.E" + + "ntityResult\022A\n\told_value\030\002 \001(\0132..google." + + "events.cloud.datastore.v1.EntityResult\022C" + + "\n\013update_mask\030\003 \001(\0132..google.events.clou" + + "d.datastore.v1.PropertyMask\"&\n\014PropertyM" + + "ask\022\026\n\016property_paths\030\001 \003(\t\"\236\002\n\014EntityRe" + + "sult\0228\n\006entity\030\001 \001(\0132(.google.events.clo" + + "ud.datastore.v1.Entity\022\017\n\007version\030\004 \001(\003\022" + + "/\n\013create_time\030\006 \001(\0132\032.google.protobuf.T" + + "imestamp\022/\n\013update_time\030\005 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022\016\n\006cursor\030\003 \001(\014\"Q\n\nRes" + + "ultType\022\033\n\027RESULT_TYPE_UNSPECIFIED\020\000\022\010\n\004" + + "FULL\020\001\022\016\n\nPROJECTION\020\002\022\014\n\010KEY_ONLY\020\003\"L\n\013" + + "PartitionId\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013datab" + + "ase_id\030\003 \001(\t\022\024\n\014namespace_id\030\004 \001(\t\"\321\001\n\003K" + + "ey\022C\n\014partition_id\030\001 \001(\0132-.google.events" + + ".cloud.datastore.v1.PartitionId\022?\n\004path\030" + + "\002 \003(\01321.google.events.cloud.datastore.v1" + + ".Key.PathElement\032D\n\013PathElement\022\014\n\004kind\030" + + "\001 \001(\t\022\014\n\002id\030\002 \001(\003H\000\022\016\n\004name\030\003 \001(\tH\000B\t\n\007i" + + "d_type\"E\n\nArrayValue\0227\n\006values\030\001 \003(\0132\'.g" + + "oogle.events.cloud.datastore.v1.Value\"\230\004" + + "\n\005Value\0220\n\nnull_value\030\013 \001(\0162\032.google.pro" + + "tobuf.NullValueH\000\022\027\n\rboolean_value\030\001 \001(\010" + + "H\000\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014double_va" + + "lue\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n \001(\0132\032.g" + + "oogle.protobuf.TimestampH\000\022:\n\tkey_value\030" + + "\005 \001(\0132%.google.events.cloud.datastore.v1" + + ".KeyH\000\022\026\n\014string_value\030\021 \001(\tH\000\022\024\n\nblob_v" + + "alue\030\022 \001(\014H\000\022.\n\017geo_point_value\030\010 \001(\0132\023." + + "google.type.LatLngH\000\022@\n\014entity_value\030\006 \001" + + "(\0132(.google.events.cloud.datastore.v1.En" + + "tityH\000\022C\n\013array_value\030\t \001(\0132,.google.eve" + + "nts.cloud.datastore.v1.ArrayValueH\000\022\017\n\007m" + + "eaning\030\016 \001(\005\022\034\n\024exclude_from_indexes\030\023 \001" + + "(\010B\014\n\nvalue_type\"\346\001\n\006Entity\0222\n\003key\030\001 \001(\013" + + "2%.google.events.cloud.datastore.v1.Key\022" + + "L\n\nproperties\030\003 \003(\01328.google.events.clou" + + "d.datastore.v1.Entity.PropertiesEntry\032Z\n" + + "\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002" + + " \001(\0132\'.google.events.cloud.datastore.v1." + + "Value:\0028\001B\236\001\n$com.google.events.cloud.da" + + "tastore.v1P\001\252\002)Google.Events.Protobuf.Cl" + + "oud.Datastore.V1\312\002 Google\\Events\\Cloud\\D" + + "atastore\\V1\352\002$Google::Events::Cloud::Dat" + + "astore::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_events_cloud_datastore_v1_EntityEventData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_datastore_v1_EntityEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_EntityEventData_descriptor, + new java.lang.String[] { + "Value", "OldValue", "UpdateMask", + }); + internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_datastore_v1_PropertyMask_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor, + new java.lang.String[] { + "PropertyPaths", + }); + internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_events_cloud_datastore_v1_EntityResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor, + new java.lang.String[] { + "Entity", "Version", "CreateTime", "UpdateTime", "Cursor", + }); + internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_events_cloud_datastore_v1_PartitionId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor, + new java.lang.String[] { + "ProjectId", "DatabaseId", "NamespaceId", + }); + internal_static_google_events_cloud_datastore_v1_Key_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_events_cloud_datastore_v1_Key_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_Key_descriptor, + new java.lang.String[] { + "PartitionId", "Path", + }); + internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor = + internal_static_google_events_cloud_datastore_v1_Key_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_datastore_v1_Key_PathElement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor, + new java.lang.String[] { + "Kind", "Id", "Name", "IdType", + }); + internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_events_cloud_datastore_v1_ArrayValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_ArrayValue_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_events_cloud_datastore_v1_Value_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_events_cloud_datastore_v1_Value_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_Value_descriptor, + new java.lang.String[] { + "NullValue", + "BooleanValue", + "IntegerValue", + "DoubleValue", + "TimestampValue", + "KeyValue", + "StringValue", + "BlobValue", + "GeoPointValue", + "EntityValue", + "ArrayValue", + "Meaning", + "ExcludeFromIndexes", + "ValueType", + }); + internal_static_google_events_cloud_datastore_v1_Entity_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_events_cloud_datastore_v1_Entity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_Entity_descriptor, + new java.lang.String[] { + "Key", "Properties", + }); + internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_descriptor = + internal_static_google_events_cloud_datastore_v1_Entity_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Entity.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Entity.java new file mode 100644 index 00000000..8ef705cb --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Entity.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * A Datastore data object.
+ * Must not exceed 1 MiB - 4 bytes.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Entity} + */ +public final class Entity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.Entity) + EntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entity.newBuilder() to construct. + private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Entity.class, + com.google.events.cloud.datastore.v1.Entity.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private com.google.events.cloud.datastore.v1.Key key_; + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return key_ != null; + } + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return The key. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key getKey() { + return key_ == null ? com.google.events.cloud.datastore.v1.Key.getDefaultInstance() : key_; + } + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyOrBuilder() { + return key_ == null ? com.google.events.cloud.datastore.v1.Key.getDefaultInstance() : key_; + } + + public static final int PROPERTIES_FIELD_NUMBER = 3; + + private static final class PropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.events.cloud.datastore.v1.Value> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_PropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.events.cloud.datastore.v1.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + properties_; + + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().getMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public java.util.Map + getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public /* nullable */ com.google.events.cloud.datastore.v1.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.events.cloud.datastore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (key_ != null) { + output.writeMessage(1, getKey()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (key_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKey()); + } + for (java.util.Map.Entry entry : + internalGetProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + properties__ = + PropertiesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.Entity)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.Entity other = + (com.google.events.cloud.datastore.v1.Entity) obj; + + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (!internalGetProperties().equals(other.internalGetProperties())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (!internalGetProperties().getMap().isEmpty()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetProperties().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Entity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Entity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Entity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.Entity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Datastore data object.
+   * Must not exceed 1 MiB - 4 bytes.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Entity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.Entity) + com.google.events.cloud.datastore.v1.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Entity.class, + com.google.events.cloud.datastore.v1.Entity.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.Entity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + internalGetMutableProperties().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Entity_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity build() { + com.google.events.cloud.datastore.v1.Entity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity buildPartial() { + com.google.events.cloud.datastore.v1.Entity result = + new com.google.events.cloud.datastore.v1.Entity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.Entity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = keyBuilder_ == null ? key_ : keyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.properties_ = internalGetProperties(); + result.properties_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.Entity) { + return mergeFrom((com.google.events.cloud.datastore.v1.Entity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.Entity other) { + if (other == com.google.events.cloud.datastore.v1.Entity.getDefaultInstance()) return this; + if (other.hasKey()) { + mergeKey(other.getKey()); + } + internalGetMutableProperties().mergeFrom(other.internalGetProperties()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.events.cloud.datastore.v1.Value> + properties__ = + input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProperties() + .getMutableMap() + .put(properties__.getKey(), properties__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.datastore.v1.Key key_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder> + keyBuilder_; + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return The key. + */ + public com.google.events.cloud.datastore.v1.Key getKey() { + if (keyBuilder_ == null) { + return key_ == null ? com.google.events.cloud.datastore.v1.Key.getDefaultInstance() : key_; + } else { + return keyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public Builder setKey(com.google.events.cloud.datastore.v1.Key value) { + if (keyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + } else { + keyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public Builder setKey(com.google.events.cloud.datastore.v1.Key.Builder builderForValue) { + if (keyBuilder_ == null) { + key_ = builderForValue.build(); + } else { + keyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public Builder mergeKey(com.google.events.cloud.datastore.v1.Key value) { + if (keyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && key_ != null + && key_ != com.google.events.cloud.datastore.v1.Key.getDefaultInstance()) { + getKeyBuilder().mergeFrom(value); + } else { + key_ = value; + } + } else { + keyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public com.google.events.cloud.datastore.v1.Key.Builder getKeyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + public com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyOrBuilder() { + if (keyBuilder_ != null) { + return keyBuilder_.getMessageOrBuilder(); + } else { + return key_ == null ? com.google.events.cloud.datastore.v1.Key.getDefaultInstance() : key_; + } + } + /** + * + * + *
+     * The entity's key.
+     * An entity must have a key, unless otherwise documented (for example,
+     * an entity in `Value.entity_value` may have no key).
+     * An entity's kind is its key path's last element's kind,
+     * or null if it has no key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder> + getKeyFieldBuilder() { + if (keyBuilder_ == null) { + keyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder>( + getKey(), getParentForChildren(), isClean()); + key_ = null; + } + return keyBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.events.cloud.datastore.v1.Value> + properties_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.events.cloud.datastore.v1.Value> + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.events.cloud.datastore.v1.Value> + internalGetMutableProperties() { + if (properties_ == null) { + properties_ = + com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); + } + if (!properties_.isMutable()) { + properties_ = properties_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().getMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public java.util.Map + getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public /* nullable */ com.google.events.cloud.datastore.v1.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.events.cloud.datastore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableProperties().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + public Builder removeProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableProperties().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableProperties() { + bitField0_ |= 0x00000002; + return internalGetMutableProperties().getMutableMap(); + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + public Builder putProperties( + java.lang.String key, com.google.events.cloud.datastore.v1.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableProperties().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * The entity's properties.
+     * The map's keys are property names.
+     * A property name matching regex `__.*__` is reserved.
+     * A reserved property name is forbidden in certain documented contexts.
+     * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+     * be empty.
+     * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + public Builder putAllProperties( + java.util.Map values) { + internalGetMutableProperties().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.Entity) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.Entity) + private static final com.google.events.cloud.datastore.v1.Entity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.Entity(); + } + + public static com.google.events.cloud.datastore.v1.Entity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventData.java new file mode 100644 index 00000000..38f6fb0f --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventData.java @@ -0,0 +1,1279 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * The data within all Firestore in Datastore Mode entity events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.EntityEventData} + */ +public final class EntityEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.EntityEventData) + EntityEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityEventData.newBuilder() to construct. + private EntityEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EntityEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntityEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.EntityEventData.class, + com.google.events.cloud.datastore.v1.EntityEventData.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.events.cloud.datastore.v1.EntityResult value_; + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return The value. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult getValue() { + return value_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : value_; + } + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResultOrBuilder getValueOrBuilder() { + return value_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : value_; + } + + public static final int OLD_VALUE_FIELD_NUMBER = 2; + private com.google.events.cloud.datastore.v1.EntityResult oldValue_; + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return Whether the oldValue field is set. + */ + @java.lang.Override + public boolean hasOldValue() { + return oldValue_ != null; + } + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return The oldValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult getOldValue() { + return oldValue_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : oldValue_; + } + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResultOrBuilder getOldValueOrBuilder() { + return oldValue_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : oldValue_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.events.cloud.datastore.v1.PropertyMask updateMask_; + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMask getUpdateMask() { + return updateMask_ == null + ? com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance() + : updateMask_; + } + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null + ? com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance() + : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (value_ != null) { + output.writeMessage(1, getValue()); + } + if (oldValue_ != null) { + output.writeMessage(2, getOldValue()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getValue()); + } + if (oldValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOldValue()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.EntityEventData)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.EntityEventData other = + (com.google.events.cloud.datastore.v1.EntityEventData) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) return false; + } + if (hasOldValue() != other.hasOldValue()) return false; + if (hasOldValue()) { + if (!getOldValue().equals(other.getOldValue())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + if (hasOldValue()) { + hash = (37 * hash) + OLD_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getOldValue().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.EntityEventData 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 data within all Firestore in Datastore Mode entity events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.EntityEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.EntityEventData) + com.google.events.cloud.datastore.v1.EntityEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.EntityEventData.class, + com.google.events.cloud.datastore.v1.EntityEventData.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.EntityEventData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + oldValue_ = null; + if (oldValueBuilder_ != null) { + oldValueBuilder_.dispose(); + oldValueBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityEventData getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.EntityEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityEventData build() { + com.google.events.cloud.datastore.v1.EntityEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityEventData buildPartial() { + com.google.events.cloud.datastore.v1.EntityEventData result = + new com.google.events.cloud.datastore.v1.EntityEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.EntityEventData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = valueBuilder_ == null ? value_ : valueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.oldValue_ = oldValueBuilder_ == null ? oldValue_ : oldValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.EntityEventData) { + return mergeFrom((com.google.events.cloud.datastore.v1.EntityEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.EntityEventData other) { + if (other == com.google.events.cloud.datastore.v1.EntityEventData.getDefaultInstance()) + return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + if (other.hasOldValue()) { + mergeOldValue(other.getOldValue()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getOldValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.datastore.v1.EntityResult value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder> + valueBuilder_; + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return The value. + */ + public com.google.events.cloud.datastore.v1.EntityResult getValue() { + if (valueBuilder_ == null) { + return value_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public Builder setValue(com.google.events.cloud.datastore.v1.EntityResult value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public Builder setValue( + com.google.events.cloud.datastore.v1.EntityResult.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public Builder mergeValue(com.google.events.cloud.datastore.v1.EntityResult value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && value_ != null + && value_ != com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public com.google.events.cloud.datastore.v1.EntityResult.Builder getValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + public com.google.events.cloud.datastore.v1.EntityResultOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : value_; + } + } + /** + * + * + *
+     * An EntityResult object containing a post-operation entity snapshot.
+     * This is not populated for delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder>( + getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + private com.google.events.cloud.datastore.v1.EntityResult oldValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder> + oldValueBuilder_; + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return Whether the oldValue field is set. + */ + public boolean hasOldValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return The oldValue. + */ + public com.google.events.cloud.datastore.v1.EntityResult getOldValue() { + if (oldValueBuilder_ == null) { + return oldValue_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : oldValue_; + } else { + return oldValueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public Builder setOldValue(com.google.events.cloud.datastore.v1.EntityResult value) { + if (oldValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldValue_ = value; + } else { + oldValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public Builder setOldValue( + com.google.events.cloud.datastore.v1.EntityResult.Builder builderForValue) { + if (oldValueBuilder_ == null) { + oldValue_ = builderForValue.build(); + } else { + oldValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public Builder mergeOldValue(com.google.events.cloud.datastore.v1.EntityResult value) { + if (oldValueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && oldValue_ != null + && oldValue_ + != com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance()) { + getOldValueBuilder().mergeFrom(value); + } else { + oldValue_ = value; + } + } else { + oldValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public Builder clearOldValue() { + bitField0_ = (bitField0_ & ~0x00000002); + oldValue_ = null; + if (oldValueBuilder_ != null) { + oldValueBuilder_.dispose(); + oldValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public com.google.events.cloud.datastore.v1.EntityResult.Builder getOldValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOldValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + public com.google.events.cloud.datastore.v1.EntityResultOrBuilder getOldValueOrBuilder() { + if (oldValueBuilder_ != null) { + return oldValueBuilder_.getMessageOrBuilder(); + } else { + return oldValue_ == null + ? com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance() + : oldValue_; + } + } + /** + * + * + *
+     * An EntityResult object containing a pre-operation entity snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder> + getOldValueFieldBuilder() { + if (oldValueBuilder_ == null) { + oldValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.EntityResult, + com.google.events.cloud.datastore.v1.EntityResult.Builder, + com.google.events.cloud.datastore.v1.EntityResultOrBuilder>( + getOldValue(), getParentForChildren(), isClean()); + oldValue_ = null; + } + return oldValueBuilder_; + } + + private com.google.events.cloud.datastore.v1.PropertyMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PropertyMask, + com.google.events.cloud.datastore.v1.PropertyMask.Builder, + com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return The updateMask. + */ + public com.google.events.cloud.datastore.v1.PropertyMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.events.cloud.datastore.v1.PropertyMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.events.cloud.datastore.v1.PropertyMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.events.cloud.datastore.v1.PropertyMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ + != com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public com.google.events.cloud.datastore.v1.PropertyMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + public com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * A PropertyMask object that lists changed properties.
+     * This is only populated for update events..
+     * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PropertyMask, + com.google.events.cloud.datastore.v1.PropertyMask.Builder, + com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PropertyMask, + com.google.events.cloud.datastore.v1.PropertyMask.Builder, + com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.EntityEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.EntityEventData) + private static final com.google.events.cloud.datastore.v1.EntityEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.EntityEventData(); + } + + public static com.google.events.cloud.datastore.v1.EntityEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventDataOrBuilder.java new file mode 100644 index 00000000..72504644 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityEventDataOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface EntityEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.EntityEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + * + * @return The value. + */ + com.google.events.cloud.datastore.v1.EntityResult getValue(); + /** + * + * + *
+   * An EntityResult object containing a post-operation entity snapshot.
+   * This is not populated for delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult value = 1; + */ + com.google.events.cloud.datastore.v1.EntityResultOrBuilder getValueOrBuilder(); + + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return Whether the oldValue field is set. + */ + boolean hasOldValue(); + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + * + * @return The oldValue. + */ + com.google.events.cloud.datastore.v1.EntityResult getOldValue(); + /** + * + * + *
+   * An EntityResult object containing a pre-operation entity snapshot.
+   * This is only populated for update and delete events.
+   * 
+ * + * .google.events.cloud.datastore.v1.EntityResult old_value = 2; + */ + com.google.events.cloud.datastore.v1.EntityResultOrBuilder getOldValueOrBuilder(); + + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.events.cloud.datastore.v1.PropertyMask getUpdateMask(); + /** + * + * + *
+   * A PropertyMask object that lists changed properties.
+   * This is only populated for update events..
+   * 
+ * + * .google.events.cloud.datastore.v1.PropertyMask update_mask = 3; + */ + com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityOrBuilder.java new file mode 100644 index 00000000..2e705f34 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface EntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + * + * @return The key. + */ + com.google.events.cloud.datastore.v1.Key getKey(); + /** + * + * + *
+   * The entity's key.
+   * An entity must have a key, unless otherwise documented (for example,
+   * an entity in `Value.entity_value` may have no key).
+   * An entity's kind is its key path's last element's kind,
+   * or null if it has no key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key = 1; + */ + com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyOrBuilder(); + + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + int getPropertiesCount(); + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + boolean containsProperties(java.lang.String key); + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getProperties(); + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + java.util.Map getPropertiesMap(); + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + /* nullable */ + com.google.events.cloud.datastore.v1.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.events.cloud.datastore.v1.Value defaultValue); + /** + * + * + *
+   * The entity's properties.
+   * The map's keys are property names.
+   * A property name matching regex `__.*__` is reserved.
+   * A reserved property name is forbidden in certain documented contexts.
+   * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+   * be empty.
+   * 
+ * + * map<string, .google.events.cloud.datastore.v1.Value> properties = 3; + */ + com.google.events.cloud.datastore.v1.Value getPropertiesOrThrow(java.lang.String key); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResult.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResult.java new file mode 100644 index 00000000..c6c210f3 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResult.java @@ -0,0 +1,1705 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * The result of fetching an entity from Datastore.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.EntityResult} + */ +public final class EntityResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.EntityResult) + EntityResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityResult.newBuilder() to construct. + private EntityResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EntityResult() { + cursor_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntityResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.EntityResult.class, + com.google.events.cloud.datastore.v1.EntityResult.Builder.class); + } + + /** + * + * + *
+   * Specifies what data the 'entity' field contains.
+   * A `ResultType` is either implied (for example, in `LookupResponse.missing`
+   * from `datastore.proto`, it is always `KEY_ONLY`) or specified by context
+   * (for example, in message `QueryResultBatch`, field `entity_result_type`
+   * specifies a `ResultType` for all the values in field `entity_results`).
+   * 
+ * + * Protobuf enum {@code google.events.cloud.datastore.v1.EntityResult.ResultType} + */ + public enum ResultType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. This value is never used.
+     * 
+ * + * RESULT_TYPE_UNSPECIFIED = 0; + */ + RESULT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The key and properties.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + /** + * + * + *
+     * A projected subset of properties. The entity may have no key.
+     * 
+ * + * PROJECTION = 2; + */ + PROJECTION(2), + /** + * + * + *
+     * Only the key.
+     * 
+ * + * KEY_ONLY = 3; + */ + KEY_ONLY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. This value is never used.
+     * 
+ * + * RESULT_TYPE_UNSPECIFIED = 0; + */ + public static final int RESULT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The key and properties.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + /** + * + * + *
+     * A projected subset of properties. The entity may have no key.
+     * 
+ * + * PROJECTION = 2; + */ + public static final int PROJECTION_VALUE = 2; + /** + * + * + *
+     * Only the key.
+     * 
+ * + * KEY_ONLY = 3; + */ + public static final int KEY_ONLY_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResultType forNumber(int value) { + switch (value) { + case 0: + return RESULT_TYPE_UNSPECIFIED; + case 1: + return FULL; + case 2: + return PROJECTION; + case 3: + return KEY_ONLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResultType findValueByNumber(int number) { + return ResultType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.EntityResult.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResultType[] VALUES = values(); + + public static ResultType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResultType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.datastore.v1.EntityResult.ResultType) + } + + public static final int ENTITY_FIELD_NUMBER = 1; + private com.google.events.cloud.datastore.v1.Entity entity_; + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return Whether the entity field is set. + */ + @java.lang.Override + public boolean hasEntity() { + return entity_ != null; + } + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return The entity. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity getEntity() { + return entity_ == null + ? com.google.events.cloud.datastore.v1.Entity.getDefaultInstance() + : entity_; + } + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityOrBuilder() { + return entity_ == null + ? com.google.events.cloud.datastore.v1.Entity.getDefaultInstance() + : entity_; + } + + public static final int VERSION_FIELD_NUMBER = 4; + private long version_ = 0L; + /** + * + * + *
+   * The version of the entity, a strictly positive number that monotonically
+   * increases with changes to the entity.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * For [missing][google.datastore.v1.LookupResponse.missing] entities in
+   * `LookupResponse`, this is the version of the snapshot that was used to look
+   * up the entity, and it is always set except for eventually consistent reads.
+   * 
+ * + * int64 version = 4; + * + * @return The version. + */ + @java.lang.Override + public long getVersion() { + return version_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CURSOR_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString cursor_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * A cursor that points to the position after the result entity.
+   * Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+   * 
+ * + * bytes cursor = 3; + * + * @return The cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCursor() { + return cursor_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (entity_ != null) { + output.writeMessage(1, getEntity()); + } + if (!cursor_.isEmpty()) { + output.writeBytes(3, cursor_); + } + if (version_ != 0L) { + output.writeInt64(4, version_); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entity_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntity()); + } + if (!cursor_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, cursor_); + } + if (version_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, version_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.EntityResult)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.EntityResult other = + (com.google.events.cloud.datastore.v1.EntityResult) obj; + + if (hasEntity() != other.hasEntity()) return false; + if (hasEntity()) { + if (!getEntity().equals(other.getEntity())) return false; + } + if (getVersion() != other.getVersion()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getCursor().equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEntity()) { + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVersion()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.EntityResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.EntityResult 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 result of fetching an entity from Datastore.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.EntityResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.EntityResult) + com.google.events.cloud.datastore.v1.EntityResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.EntityResult.class, + com.google.events.cloud.datastore.v1.EntityResult.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.EntityResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + version_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + cursor_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_EntityResult_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult build() { + com.google.events.cloud.datastore.v1.EntityResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult buildPartial() { + com.google.events.cloud.datastore.v1.EntityResult result = + new com.google.events.cloud.datastore.v1.EntityResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.EntityResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.entity_ = entityBuilder_ == null ? entity_ : entityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.EntityResult) { + return mergeFrom((com.google.events.cloud.datastore.v1.EntityResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.EntityResult other) { + if (other == com.google.events.cloud.datastore.v1.EntityResult.getDefaultInstance()) + return this; + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + if (other.getVersion() != 0L) { + setVersion(other.getVersion()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getCursor() != com.google.protobuf.ByteString.EMPTY) { + setCursor(other.getCursor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + cursor_ = input.readBytes(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 32: + { + version_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 32 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.datastore.v1.Entity entity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return Whether the entity field is set. + */ + public boolean hasEntity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return The entity. + */ + public com.google.events.cloud.datastore.v1.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.events.cloud.datastore.v1.Entity.getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public Builder setEntity(com.google.events.cloud.datastore.v1.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + } else { + entityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public Builder setEntity(com.google.events.cloud.datastore.v1.Entity.Builder builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public Builder mergeEntity(com.google.events.cloud.datastore.v1.Entity value) { + if (entityBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && entity_ != null + && entity_ != com.google.events.cloud.datastore.v1.Entity.getDefaultInstance()) { + getEntityBuilder().mergeFrom(value); + } else { + entity_ = value; + } + } else { + entityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public Builder clearEntity() { + bitField0_ = (bitField0_ & ~0x00000001); + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public com.google.events.cloud.datastore.v1.Entity.Builder getEntityBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + public com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.events.cloud.datastore.v1.Entity.getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+     * The resulting entity.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + private long version_; + /** + * + * + *
+     * The version of the entity, a strictly positive number that monotonically
+     * increases with changes to the entity.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * For [missing][google.datastore.v1.LookupResponse.missing] entities in
+     * `LookupResponse`, this is the version of the snapshot that was used to look
+     * up the entity, and it is always set except for eventually consistent reads.
+     * 
+ * + * int64 version = 4; + * + * @return The version. + */ + @java.lang.Override + public long getVersion() { + return version_; + } + /** + * + * + *
+     * The version of the entity, a strictly positive number that monotonically
+     * increases with changes to the entity.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * For [missing][google.datastore.v1.LookupResponse.missing] entities in
+     * `LookupResponse`, this is the version of the snapshot that was used to look
+     * up the entity, and it is always set except for eventually consistent reads.
+     * 
+ * + * int64 version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(long value) { + + version_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the entity, a strictly positive number that monotonically
+     * increases with changes to the entity.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * For [missing][google.datastore.v1.LookupResponse.missing] entities in
+     * `LookupResponse`, this is the version of the snapshot that was used to look
+     * up the entity, and it is always set except for eventually consistent reads.
+     * 
+ * + * int64 version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + version_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time at which the entity was created.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time at which the entity was last changed.
+     * This field is set for
+     * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+     * If this entity is missing, this field will not be set.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.ByteString cursor_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A cursor that points to the position after the result entity.
+     * Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+     * 
+ * + * bytes cursor = 3; + * + * @return The cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCursor() { + return cursor_; + } + /** + * + * + *
+     * A cursor that points to the position after the result entity.
+     * Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+     * 
+ * + * bytes cursor = 3; + * + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + cursor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A cursor that points to the position after the result entity.
+     * Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+     * 
+ * + * bytes cursor = 3; + * + * @return This builder for chaining. + */ + public Builder clearCursor() { + bitField0_ = (bitField0_ & ~0x00000010); + cursor_ = getDefaultInstance().getCursor(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.EntityResult) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.EntityResult) + private static final com.google.events.cloud.datastore.v1.EntityResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.EntityResult(); + } + + public static com.google.events.cloud.datastore.v1.EntityResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResultOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResultOrBuilder.java new file mode 100644 index 00000000..dbe06e9b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/EntityResultOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface EntityResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.EntityResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return Whether the entity field is set. + */ + boolean hasEntity(); + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + * + * @return The entity. + */ + com.google.events.cloud.datastore.v1.Entity getEntity(); + /** + * + * + *
+   * The resulting entity.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity = 1; + */ + com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityOrBuilder(); + + /** + * + * + *
+   * The version of the entity, a strictly positive number that monotonically
+   * increases with changes to the entity.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * For [missing][google.datastore.v1.LookupResponse.missing] entities in
+   * `LookupResponse`, this is the version of the snapshot that was used to look
+   * up the entity, and it is always set except for eventually consistent reads.
+   * 
+ * + * int64 version = 4; + * + * @return The version. + */ + long getVersion(); + + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time at which the entity was created.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time at which the entity was last changed.
+   * This field is set for
+   * [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+   * If this entity is missing, this field will not be set.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * A cursor that points to the position after the result entity.
+   * Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+   * 
+ * + * bytes cursor = 3; + * + * @return The cursor. + */ + com.google.protobuf.ByteString getCursor(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Key.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Key.java new file mode 100644 index 00000000..77b47ce0 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Key.java @@ -0,0 +1,2841 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * A unique identifier for an entity.
+ * If a key's partition ID or any of its path kinds or names are
+ * reserved/read-only, the key is reserved/read-only.
+ * A reserved/read-only key is forbidden in certain documented contexts.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Key} + */ +public final class Key extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.Key) + KeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Key.newBuilder() to construct. + private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Key() { + path_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Key(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Key.class, + com.google.events.cloud.datastore.v1.Key.Builder.class); + } + + public interface PathElementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.Key.PathElement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string kind = 1; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * + * @return Whether the id field is set. + */ + boolean hasId(); + /** + * + * + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * + * @return The id. + */ + long getId(); + + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return Whether the name field is set. + */ + boolean hasName(); + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + public com.google.events.cloud.datastore.v1.Key.PathElement.IdTypeCase getIdTypeCase(); + } + /** + * + * + *
+   * A (kind, ID/name) pair used to construct a key path.
+   * If either name or ID is set, the element is complete.
+   * If neither is set, the element is incomplete.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Key.PathElement} + */ + public static final class PathElement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.Key.PathElement) + PathElementOrBuilder { + private static final long serialVersionUID = 0L; + // Use PathElement.newBuilder() to construct. + private PathElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PathElement() { + kind_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PathElement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_PathElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Key.PathElement.class, + com.google.events.cloud.datastore.v1.Key.PathElement.Builder.class); + } + + private int idTypeCase_ = 0; + private java.lang.Object idType_; + + public enum IdTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ID(2), + NAME(3), + IDTYPE_NOT_SET(0); + private final int value; + + private IdTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdTypeCase valueOf(int value) { + return forNumber(value); + } + + public static IdTypeCase forNumber(int value) { + switch (value) { + case 2: + return ID; + case 3: + return NAME; + case 0: + return IDTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IdTypeCase getIdTypeCase() { + return IdTypeCase.forNumber(idTypeCase_); + } + + public static final int KIND_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + * + * + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + /** + * + * + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * + * @return Whether the id field is set. + */ + @java.lang.Override + public boolean hasId() { + return idTypeCase_ == 2; + } + /** + * + * + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * + * @return The id. + */ + @java.lang.Override + public long getId() { + if (idTypeCase_ == 2) { + return (java.lang.Long) idType_; + } + return 0L; + } + + public static final int NAME_FIELD_NUMBER = 3; + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return idTypeCase_ == 3; + } + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idTypeCase_ == 3) { + idType_ = s; + } + return s; + } + } + /** + * + * + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+     * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+     * bytes.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idTypeCase_ == 3) { + idType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); + } + if (idTypeCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) idType_)); + } + if (idTypeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); + } + if (idTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) idType_)); + } + if (idTypeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.Key.PathElement)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.Key.PathElement other = + (com.google.events.cloud.datastore.v1.Key.PathElement) obj; + + if (!getKind().equals(other.getKind())) return false; + if (!getIdTypeCase().equals(other.getIdTypeCase())) return false; + switch (idTypeCase_) { + case 2: + if (getId() != other.getId()) return false; + break; + case 3: + if (!getName().equals(other.getName())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + switch (idTypeCase_) { + case 2: + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); + break; + case 3: + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.datastore.v1.Key.PathElement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A (kind, ID/name) pair used to construct a key path.
+     * If either name or ID is set, the element is complete.
+     * If neither is set, the element is incomplete.
+     * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Key.PathElement} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.Key.PathElement) + com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_PathElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Key.PathElement.class, + com.google.events.cloud.datastore.v1.Key.PathElement.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.Key.PathElement.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = ""; + idTypeCase_ = 0; + idType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_PathElement_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElement getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.Key.PathElement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElement build() { + com.google.events.cloud.datastore.v1.Key.PathElement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElement buildPartial() { + com.google.events.cloud.datastore.v1.Key.PathElement result = + new com.google.events.cloud.datastore.v1.Key.PathElement(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.Key.PathElement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + } + + private void buildPartialOneofs(com.google.events.cloud.datastore.v1.Key.PathElement result) { + result.idTypeCase_ = idTypeCase_; + result.idType_ = this.idType_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.Key.PathElement) { + return mergeFrom((com.google.events.cloud.datastore.v1.Key.PathElement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.Key.PathElement other) { + if (other == com.google.events.cloud.datastore.v1.Key.PathElement.getDefaultInstance()) + return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getIdTypeCase()) { + case ID: + { + setId(other.getId()); + break; + } + case NAME: + { + idTypeCase_ = 3; + idType_ = other.idType_; + onChanged(); + break; + } + case IDTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + idType_ = input.readInt64(); + idTypeCase_ = 2; + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + idTypeCase_ = 3; + idType_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int idTypeCase_ = 0; + private java.lang.Object idType_; + + public IdTypeCase getIdTypeCase() { + return IdTypeCase.forNumber(idTypeCase_); + } + + public Builder clearIdType() { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object kind_ = ""; + /** + * + * + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string kind = 1; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string kind = 1; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string kind = 1; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string kind = 1; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * + * @return Whether the id field is set. + */ + public boolean hasId() { + return idTypeCase_ == 2; + } + /** + * + * + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * + * @return The id. + */ + public long getId() { + if (idTypeCase_ == 2) { + return (java.lang.Long) idType_; + } + return 0L; + } + /** + * + * + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + idTypeCase_ = 2; + idType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + if (idTypeCase_ == 2) { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return idTypeCase_ == 3; + } + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idTypeCase_ == 3) { + idType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idTypeCase_ == 3) { + idType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + idTypeCase_ = 3; + idType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + if (idTypeCase_ == 3) { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
+       * encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
+       * bytes.
+       * 
+ * + * string name = 3; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + idTypeCase_ = 3; + idType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.Key.PathElement) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.Key.PathElement) + private static final com.google.events.cloud.datastore.v1.Key.PathElement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.Key.PathElement(); + } + + public static com.google.events.cloud.datastore.v1.Key.PathElement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PathElement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PARTITION_ID_FIELD_NUMBER = 1; + private com.google.events.cloud.datastore.v1.PartitionId partitionId_; + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return Whether the partitionId field is set. + */ + @java.lang.Override + public boolean hasPartitionId() { + return partitionId_ != null; + } + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return The partitionId. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionId getPartitionId() { + return partitionId_ == null + ? com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance() + : partitionId_; + } + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionIdOrBuilder getPartitionIdOrBuilder() { + return partitionId_ == null + ? com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance() + : partitionId_; + } + + public static final int PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List path_; + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + @java.lang.Override + public java.util.List getPathList() { + return path_; + } + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + @java.lang.Override + public java.util.List + getPathOrBuilderList() { + return path_; + } + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElement getPath(int index) { + return path_.get(index); + } + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder getPathOrBuilder(int index) { + return path_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (partitionId_ != null) { + output.writeMessage(1, getPartitionId()); + } + for (int i = 0; i < path_.size(); i++) { + output.writeMessage(2, path_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partitionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPartitionId()); + } + for (int i = 0; i < path_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, path_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.Key)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.Key other = (com.google.events.cloud.datastore.v1.Key) obj; + + if (hasPartitionId() != other.hasPartitionId()) return false; + if (hasPartitionId()) { + if (!getPartitionId().equals(other.getPartitionId())) return false; + } + if (!getPathList().equals(other.getPathList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPartitionId()) { + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartitionId().hashCode(); + } + if (getPathCount() > 0) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPathList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Key parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.Key prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A unique identifier for an entity.
+   * If a key's partition ID or any of its path kinds or names are
+   * reserved/read-only, the key is reserved/read-only.
+   * A reserved/read-only key is forbidden in certain documented contexts.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Key} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.Key) + com.google.events.cloud.datastore.v1.KeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Key.class, + com.google.events.cloud.datastore.v1.Key.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.Key.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partitionId_ = null; + if (partitionIdBuilder_ != null) { + partitionIdBuilder_.dispose(); + partitionIdBuilder_ = null; + } + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + } else { + path_ = null; + pathBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Key_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key build() { + com.google.events.cloud.datastore.v1.Key result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key buildPartial() { + com.google.events.cloud.datastore.v1.Key result = + new com.google.events.cloud.datastore.v1.Key(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.events.cloud.datastore.v1.Key result) { + if (pathBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + path_ = java.util.Collections.unmodifiableList(path_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.path_ = path_; + } else { + result.path_ = pathBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.Key result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partitionId_ = + partitionIdBuilder_ == null ? partitionId_ : partitionIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.Key) { + return mergeFrom((com.google.events.cloud.datastore.v1.Key) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.Key other) { + if (other == com.google.events.cloud.datastore.v1.Key.getDefaultInstance()) return this; + if (other.hasPartitionId()) { + mergePartitionId(other.getPartitionId()); + } + if (pathBuilder_ == null) { + if (!other.path_.isEmpty()) { + if (path_.isEmpty()) { + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePathIsMutable(); + path_.addAll(other.path_); + } + onChanged(); + } + } else { + if (!other.path_.isEmpty()) { + if (pathBuilder_.isEmpty()) { + pathBuilder_.dispose(); + pathBuilder_ = null; + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000002); + pathBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPathFieldBuilder() + : null; + } else { + pathBuilder_.addAllMessages(other.path_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPartitionIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.events.cloud.datastore.v1.Key.PathElement m = + input.readMessage( + com.google.events.cloud.datastore.v1.Key.PathElement.parser(), + extensionRegistry); + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(m); + } else { + pathBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.datastore.v1.PartitionId partitionId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PartitionId, + com.google.events.cloud.datastore.v1.PartitionId.Builder, + com.google.events.cloud.datastore.v1.PartitionIdOrBuilder> + partitionIdBuilder_; + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return Whether the partitionId field is set. + */ + public boolean hasPartitionId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return The partitionId. + */ + public com.google.events.cloud.datastore.v1.PartitionId getPartitionId() { + if (partitionIdBuilder_ == null) { + return partitionId_ == null + ? com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance() + : partitionId_; + } else { + return partitionIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public Builder setPartitionId(com.google.events.cloud.datastore.v1.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitionId_ = value; + } else { + partitionIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public Builder setPartitionId( + com.google.events.cloud.datastore.v1.PartitionId.Builder builderForValue) { + if (partitionIdBuilder_ == null) { + partitionId_ = builderForValue.build(); + } else { + partitionIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public Builder mergePartitionId(com.google.events.cloud.datastore.v1.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && partitionId_ != null + && partitionId_ + != com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance()) { + getPartitionIdBuilder().mergeFrom(value); + } else { + partitionId_ = value; + } + } else { + partitionIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public Builder clearPartitionId() { + bitField0_ = (bitField0_ & ~0x00000001); + partitionId_ = null; + if (partitionIdBuilder_ != null) { + partitionIdBuilder_.dispose(); + partitionIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public com.google.events.cloud.datastore.v1.PartitionId.Builder getPartitionIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPartitionIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + public com.google.events.cloud.datastore.v1.PartitionIdOrBuilder getPartitionIdOrBuilder() { + if (partitionIdBuilder_ != null) { + return partitionIdBuilder_.getMessageOrBuilder(); + } else { + return partitionId_ == null + ? com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance() + : partitionId_; + } + } + /** + * + * + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PartitionId, + com.google.events.cloud.datastore.v1.PartitionId.Builder, + com.google.events.cloud.datastore.v1.PartitionIdOrBuilder> + getPartitionIdFieldBuilder() { + if (partitionIdBuilder_ == null) { + partitionIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.PartitionId, + com.google.events.cloud.datastore.v1.PartitionId.Builder, + com.google.events.cloud.datastore.v1.PartitionIdOrBuilder>( + getPartitionId(), getParentForChildren(), isClean()); + partitionId_ = null; + } + return partitionIdBuilder_; + } + + private java.util.List path_ = + java.util.Collections.emptyList(); + + private void ensurePathIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + path_ = + new java.util.ArrayList(path_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key.PathElement, + com.google.events.cloud.datastore.v1.Key.PathElement.Builder, + com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder> + pathBuilder_; + + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public java.util.List getPathList() { + if (pathBuilder_ == null) { + return java.util.Collections.unmodifiableList(path_); + } else { + return pathBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public int getPathCount() { + if (pathBuilder_ == null) { + return path_.size(); + } else { + return pathBuilder_.getCount(); + } + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public com.google.events.cloud.datastore.v1.Key.PathElement getPath(int index) { + if (pathBuilder_ == null) { + return path_.get(index); + } else { + return pathBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder setPath(int index, com.google.events.cloud.datastore.v1.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.set(index, value); + onChanged(); + } else { + pathBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder setPath( + int index, com.google.events.cloud.datastore.v1.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.set(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder addPath(com.google.events.cloud.datastore.v1.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(value); + onChanged(); + } else { + pathBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder addPath(int index, com.google.events.cloud.datastore.v1.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(index, value); + onChanged(); + } else { + pathBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder addPath( + com.google.events.cloud.datastore.v1.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder addPath( + int index, com.google.events.cloud.datastore.v1.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder addAllPath( + java.lang.Iterable values) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, path_); + onChanged(); + } else { + pathBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder clearPath() { + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pathBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public Builder removePath(int index) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.remove(index); + onChanged(); + } else { + pathBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public com.google.events.cloud.datastore.v1.Key.PathElement.Builder getPathBuilder(int index) { + return getPathFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder getPathOrBuilder( + int index) { + if (pathBuilder_ == null) { + return path_.get(index); + } else { + return pathBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public java.util.List + getPathOrBuilderList() { + if (pathBuilder_ != null) { + return pathBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(path_); + } + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public com.google.events.cloud.datastore.v1.Key.PathElement.Builder addPathBuilder() { + return getPathFieldBuilder() + .addBuilder(com.google.events.cloud.datastore.v1.Key.PathElement.getDefaultInstance()); + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public com.google.events.cloud.datastore.v1.Key.PathElement.Builder addPathBuilder(int index) { + return getPathFieldBuilder() + .addBuilder( + index, com.google.events.cloud.datastore.v1.Key.PathElement.getDefaultInstance()); + } + /** + * + * + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * An entity path is always fully complete: *all* of the entity's ancestors
+     * are required to be in the path along with the entity identifier itself.
+     * The only exception is that in some documented cases, the identifier in the
+     * last path element (for the entity) itself may be omitted. For example,
+     * the last path element of the key of `Mutation.insert` may have no
+     * identifier.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + public java.util.List + getPathBuilderList() { + return getPathFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key.PathElement, + com.google.events.cloud.datastore.v1.Key.PathElement.Builder, + com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder> + getPathFieldBuilder() { + if (pathBuilder_ == null) { + pathBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key.PathElement, + com.google.events.cloud.datastore.v1.Key.PathElement.Builder, + com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder>( + path_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + path_ = null; + } + return pathBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.Key) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.Key) + private static final com.google.events.cloud.datastore.v1.Key DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.Key(); + } + + public static com.google.events.cloud.datastore.v1.Key getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Key parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/KeyOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/KeyOrBuilder.java new file mode 100644 index 00000000..43dd56d7 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/KeyOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface KeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.Key) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return Whether the partitionId field is set. + */ + boolean hasPartitionId(); + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + * + * @return The partitionId. + */ + com.google.events.cloud.datastore.v1.PartitionId getPartitionId(); + /** + * + * + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.events.cloud.datastore.v1.PartitionId partition_id = 1; + */ + com.google.events.cloud.datastore.v1.PartitionIdOrBuilder getPartitionIdOrBuilder(); + + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + java.util.List getPathList(); + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + com.google.events.cloud.datastore.v1.Key.PathElement getPath(int index); + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + int getPathCount(); + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + java.util.List + getPathOrBuilderList(); + /** + * + * + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * An entity path is always fully complete: *all* of the entity's ancestors
+   * are required to be in the path along with the entity identifier itself.
+   * The only exception is that in some documented cases, the identifier in the
+   * last path element (for the entity) itself may be omitted. For example,
+   * the last path element of the key of `Mutation.insert` may have no
+   * identifier.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.events.cloud.datastore.v1.Key.PathElement path = 2; + */ + com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder getPathOrBuilder(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionId.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionId.java new file mode 100644 index 00000000..3ac83395 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionId.java @@ -0,0 +1,1030 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * A partition ID identifies a grouping of entities. The grouping is always
+ * by project and namespace, however the namespace ID may be empty.
+ * A partition ID contains several dimensions:
+ * project ID and namespace ID.
+ * Partition dimensions:
+ * - May be `""`.
+ * - Must be valid UTF-8 bytes.
+ * - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
+ * If the value of any dimension matches regex `__.*__`, the partition is
+ * reserved/read-only.
+ * A reserved/read-only partition ID is forbidden in certain documented
+ * contexts.
+ * Foreign partition IDs (in which the project ID does
+ * not match the context project ID ) are discouraged.
+ * Reads and writes of foreign partition IDs may fail if the project is not in
+ * an active state.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.PartitionId} + */ +public final class PartitionId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.PartitionId) + PartitionIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use PartitionId.newBuilder() to construct. + private PartitionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PartitionId() { + projectId_ = ""; + databaseId_ = ""; + namespaceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PartitionId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.PartitionId.class, + com.google.events.cloud.datastore.v1.PartitionId.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * If not empty, the ID of the database to which the entities
+   * belong.
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * If not empty, the ID of the database to which the entities
+   * belong.
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespaceId_ = ""; + /** + * + * + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * + * @return The namespaceId. + */ + @java.lang.Override + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } + } + /** + * + * + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * + * @return The bytes for namespaceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespaceId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespaceId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.PartitionId)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.PartitionId other = + (com.google.events.cloud.datastore.v1.PartitionId) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getNamespaceId().equals(other.getNamespaceId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (37 * hash) + NAMESPACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PartitionId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.PartitionId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * A partition ID contains several dimensions:
+   * project ID and namespace ID.
+   * Partition dimensions:
+   * - May be `""`.
+   * - Must be valid UTF-8 bytes.
+   * - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
+   * If the value of any dimension matches regex `__.*__`, the partition is
+   * reserved/read-only.
+   * A reserved/read-only partition ID is forbidden in certain documented
+   * contexts.
+   * Foreign partition IDs (in which the project ID does
+   * not match the context project ID ) are discouraged.
+   * Reads and writes of foreign partition IDs may fail if the project is not in
+   * an active state.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.PartitionId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.PartitionId) + com.google.events.cloud.datastore.v1.PartitionIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PartitionId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.PartitionId.class, + com.google.events.cloud.datastore.v1.PartitionId.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.PartitionId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + databaseId_ = ""; + namespaceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PartitionId_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionId getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionId build() { + com.google.events.cloud.datastore.v1.PartitionId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionId buildPartial() { + com.google.events.cloud.datastore.v1.PartitionId result = + new com.google.events.cloud.datastore.v1.PartitionId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.PartitionId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.namespaceId_ = namespaceId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.PartitionId) { + return mergeFrom((com.google.events.cloud.datastore.v1.PartitionId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.PartitionId other) { + if (other == com.google.events.cloud.datastore.v1.PartitionId.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNamespaceId().isEmpty()) { + namespaceId_ = other.namespaceId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + namespaceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * If not empty, the ID of the database to which the entities
+     * belong.
+     * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not empty, the ID of the database to which the entities
+     * belong.
+     * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not empty, the ID of the database to which the entities
+     * belong.
+     * 
+ * + * string database_id = 3; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If not empty, the ID of the database to which the entities
+     * belong.
+     * 
+ * + * string database_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * If not empty, the ID of the database to which the entities
+     * belong.
+     * 
+ * + * string database_id = 3; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object namespaceId_ = ""; + /** + * + * + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * + * @return The namespaceId. + */ + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * + * @return The bytes for namespaceId. + */ + public com.google.protobuf.ByteString getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * + * @param value The namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + namespaceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearNamespaceId() { + namespaceId_ = getDefaultInstance().getNamespaceId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * + * @param value The bytes for namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespaceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.PartitionId) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.PartitionId) + private static final com.google.events.cloud.datastore.v1.PartitionId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.PartitionId(); + } + + public static com.google.events.cloud.datastore.v1.PartitionId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PartitionId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionIdOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionIdOrBuilder.java new file mode 100644 index 00000000..c28b3c8e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PartitionIdOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface PartitionIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.PartitionId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * If not empty, the ID of the database to which the entities
+   * belong.
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * If not empty, the ID of the database to which the entities
+   * belong.
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * + * @return The namespaceId. + */ + java.lang.String getNamespaceId(); + /** + * + * + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * + * @return The bytes for namespaceId. + */ + com.google.protobuf.ByteString getNamespaceIdBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMask.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMask.java new file mode 100644 index 00000000..d9b1babc --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMask.java @@ -0,0 +1,737 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * A set of property paths on an entity.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.PropertyMask} + */ +public final class PropertyMask extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.PropertyMask) + PropertyMaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use PropertyMask.newBuilder() to construct. + private PropertyMask(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PropertyMask() { + propertyPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PropertyMask(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PropertyMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.PropertyMask.class, + com.google.events.cloud.datastore.v1.PropertyMask.Builder.class); + } + + public static final int PROPERTY_PATHS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList propertyPaths_; + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @return A list containing the propertyPaths. + */ + public com.google.protobuf.ProtocolStringList getPropertyPathsList() { + return propertyPaths_; + } + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @return The count of propertyPaths. + */ + public int getPropertyPathsCount() { + return propertyPaths_.size(); + } + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the element to return. + * @return The propertyPaths at the given index. + */ + public java.lang.String getPropertyPaths(int index) { + return propertyPaths_.get(index); + } + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the value to return. + * @return The bytes of the propertyPaths at the given index. + */ + public com.google.protobuf.ByteString getPropertyPathsBytes(int index) { + return propertyPaths_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < propertyPaths_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, propertyPaths_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < propertyPaths_.size(); i++) { + dataSize += computeStringSizeNoTag(propertyPaths_.getRaw(i)); + } + size += dataSize; + size += 1 * getPropertyPathsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.PropertyMask)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.PropertyMask other = + (com.google.events.cloud.datastore.v1.PropertyMask) obj; + + if (!getPropertyPathsList().equals(other.getPropertyPathsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPropertyPathsCount() > 0) { + hash = (37 * hash) + PROPERTY_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getPropertyPathsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.PropertyMask prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A set of property paths on an entity.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.PropertyMask} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.PropertyMask) + com.google.events.cloud.datastore.v1.PropertyMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PropertyMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.PropertyMask.class, + com.google.events.cloud.datastore.v1.PropertyMask.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.PropertyMask.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + propertyPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_PropertyMask_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMask getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMask build() { + com.google.events.cloud.datastore.v1.PropertyMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMask buildPartial() { + com.google.events.cloud.datastore.v1.PropertyMask result = + new com.google.events.cloud.datastore.v1.PropertyMask(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.datastore.v1.PropertyMask result) { + if (((bitField0_ & 0x00000001) != 0)) { + propertyPaths_ = propertyPaths_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.propertyPaths_ = propertyPaths_; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.PropertyMask result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.PropertyMask) { + return mergeFrom((com.google.events.cloud.datastore.v1.PropertyMask) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.PropertyMask other) { + if (other == com.google.events.cloud.datastore.v1.PropertyMask.getDefaultInstance()) + return this; + if (!other.propertyPaths_.isEmpty()) { + if (propertyPaths_.isEmpty()) { + propertyPaths_ = other.propertyPaths_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertyPathsIsMutable(); + propertyPaths_.addAll(other.propertyPaths_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePropertyPathsIsMutable(); + propertyPaths_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList propertyPaths_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePropertyPathsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + propertyPaths_ = new com.google.protobuf.LazyStringArrayList(propertyPaths_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @return A list containing the propertyPaths. + */ + public com.google.protobuf.ProtocolStringList getPropertyPathsList() { + return propertyPaths_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @return The count of propertyPaths. + */ + public int getPropertyPathsCount() { + return propertyPaths_.size(); + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the element to return. + * @return The propertyPaths at the given index. + */ + public java.lang.String getPropertyPaths(int index) { + return propertyPaths_.get(index); + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the value to return. + * @return The bytes of the propertyPaths at the given index. + */ + public com.google.protobuf.ByteString getPropertyPathsBytes(int index) { + return propertyPaths_.getByteString(index); + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param index The index to set the value at. + * @param value The propertyPaths to set. + * @return This builder for chaining. + */ + public Builder setPropertyPaths(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertyPathsIsMutable(); + propertyPaths_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param value The propertyPaths to add. + * @return This builder for chaining. + */ + public Builder addPropertyPaths(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertyPathsIsMutable(); + propertyPaths_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param values The propertyPaths to add. + * @return This builder for chaining. + */ + public Builder addAllPropertyPaths(java.lang.Iterable values) { + ensurePropertyPathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertyPaths_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @return This builder for chaining. + */ + public Builder clearPropertyPaths() { + propertyPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of property paths in the mask.
+     * This is not populated for delete events.
+     * 
+ * + * repeated string property_paths = 1; + * + * @param value The bytes of the propertyPaths to add. + * @return This builder for chaining. + */ + public Builder addPropertyPathsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePropertyPathsIsMutable(); + propertyPaths_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.PropertyMask) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.PropertyMask) + private static final com.google.events.cloud.datastore.v1.PropertyMask DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.PropertyMask(); + } + + public static com.google.events.cloud.datastore.v1.PropertyMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PropertyMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.PropertyMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMaskOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMaskOrBuilder.java new file mode 100644 index 00000000..97c00db4 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/PropertyMaskOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface PropertyMaskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.PropertyMask) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @return A list containing the propertyPaths. + */ + java.util.List getPropertyPathsList(); + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @return The count of propertyPaths. + */ + int getPropertyPathsCount(); + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the element to return. + * @return The propertyPaths at the given index. + */ + java.lang.String getPropertyPaths(int index); + /** + * + * + *
+   * The list of property paths in the mask.
+   * This is not populated for delete events.
+   * 
+ * + * repeated string property_paths = 1; + * + * @param index The index of the value to return. + * @return The bytes of the propertyPaths at the given index. + */ + com.google.protobuf.ByteString getPropertyPathsBytes(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Value.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Value.java new file mode 100644 index 00000000..b7134a1e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/Value.java @@ -0,0 +1,3278 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +/** + * + * + *
+ * A message that can hold any of the supported value types and associated
+ * metadata.
+ * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Value} + */ +public final class Value extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.datastore.v1.Value) + ValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Value() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Value(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Value.class, + com.google.events.cloud.datastore.v1.Value.Builder.class); + } + + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + + public enum ValueTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NULL_VALUE(11), + BOOLEAN_VALUE(1), + INTEGER_VALUE(2), + DOUBLE_VALUE(3), + TIMESTAMP_VALUE(10), + KEY_VALUE(5), + STRING_VALUE(17), + BLOB_VALUE(18), + GEO_POINT_VALUE(8), + ENTITY_VALUE(6), + ARRAY_VALUE(9), + VALUETYPE_NOT_SET(0); + private final int value; + + private ValueTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ValueTypeCase forNumber(int value) { + switch (value) { + case 11: + return NULL_VALUE; + case 1: + return BOOLEAN_VALUE; + case 2: + return INTEGER_VALUE; + case 3: + return DOUBLE_VALUE; + case 10: + return TIMESTAMP_VALUE; + case 5: + return KEY_VALUE; + case 17: + return STRING_VALUE; + case 18: + return BLOB_VALUE; + case 8: + return GEO_POINT_VALUE; + case 6: + return ENTITY_VALUE; + case 9: + return ARRAY_VALUE; + case 0: + return VALUETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public static final int NULL_VALUE_FIELD_NUMBER = 11; + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return Whether the nullValue field is set. + */ + public boolean hasNullValue() { + return valueTypeCase_ == 11; + } + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The enum numeric value on the wire for nullValue. + */ + public int getNullValueValue() { + if (valueTypeCase_ == 11) { + return (java.lang.Integer) valueType_; + } + return 0; + } + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The nullValue. + */ + public com.google.protobuf.NullValue getNullValue() { + if (valueTypeCase_ == 11) { + com.google.protobuf.NullValue result = + com.google.protobuf.NullValue.forNumber((java.lang.Integer) valueType_); + return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; + } + return com.google.protobuf.NullValue.NULL_VALUE; + } + + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * A boolean value.
+   * 
+ * + * bool boolean_value = 1; + * + * @return Whether the booleanValue field is set. + */ + @java.lang.Override + public boolean hasBooleanValue() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+   * A boolean value.
+   * 
+ * + * bool boolean_value = 1; + * + * @return The booleanValue. + */ + @java.lang.Override + public boolean getBooleanValue() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int INTEGER_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * An integer value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + @java.lang.Override + public boolean hasIntegerValue() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+   * An integer value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + @java.lang.Override + public long getIntegerValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + + public static final int DOUBLE_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * A double value.
+   * 
+ * + * double double_value = 3; + * + * @return Whether the doubleValue field is set. + */ + @java.lang.Override + public boolean hasDoubleValue() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+   * A double value.
+   * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Double) valueType_; + } + return 0D; + } + + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 10; + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 10; + } + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int KEY_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return Whether the keyValue field is set. + */ + @java.lang.Override + public boolean hasKeyValue() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return The keyValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key getKeyValue() { + if (valueTypeCase_ == 5) { + return (com.google.events.cloud.datastore.v1.Key) valueType_; + } + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyValueOrBuilder() { + if (valueTypeCase_ == 5) { + return (com.google.events.cloud.datastore.v1.Key) valueType_; + } + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + + public static final int STRING_VALUE_FIELD_NUMBER = 17; + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return valueTypeCase_ == 17; + } + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 17) { + valueType_ = s; + } + return s; + } + } + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 17) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BLOB_VALUE_FIELD_NUMBER = 18; + /** + * + * + *
+   * A blob value.
+   * May have at most 1,000,000 bytes.
+   * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+   * In JSON requests, must be base64-encoded.
+   * 
+ * + * bytes blob_value = 18; + * + * @return Whether the blobValue field is set. + */ + @java.lang.Override + public boolean hasBlobValue() { + return valueTypeCase_ == 18; + } + /** + * + * + *
+   * A blob value.
+   * May have at most 1,000,000 bytes.
+   * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+   * In JSON requests, must be base64-encoded.
+   * 
+ * + * bytes blob_value = 18; + * + * @return The blobValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlobValue() { + if (valueTypeCase_ == 18) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int GEO_POINT_VALUE_FIELD_NUMBER = 8; + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return Whether the geoPointValue field is set. + */ + @java.lang.Override + public boolean hasGeoPointValue() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return The geoPointValue. + */ + @java.lang.Override + public com.google.type.LatLng getGeoPointValue() { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int ENTITY_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return Whether the entityValue field is set. + */ + @java.lang.Override + public boolean hasEntityValue() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return The entityValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity getEntityValue() { + if (valueTypeCase_ == 6) { + return (com.google.events.cloud.datastore.v1.Entity) valueType_; + } + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityValueOrBuilder() { + if (valueTypeCase_ == 6) { + return (com.google.events.cloud.datastore.v1.Entity) valueType_; + } + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + + public static final int ARRAY_VALUE_FIELD_NUMBER = 9; + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue getArrayValue() { + if (valueTypeCase_ == 9) { + return (com.google.events.cloud.datastore.v1.ArrayValue) valueType_; + } + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { + if (valueTypeCase_ == 9) { + return (com.google.events.cloud.datastore.v1.ArrayValue) valueType_; + } + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + + public static final int MEANING_FIELD_NUMBER = 14; + private int meaning_ = 0; + /** + * + * + *
+   * The `meaning` field should only be populated for backwards compatibility.
+   * 
+ * + * int32 meaning = 14; + * + * @return The meaning. + */ + @java.lang.Override + public int getMeaning() { + return meaning_; + } + + public static final int EXCLUDE_FROM_INDEXES_FIELD_NUMBER = 19; + private boolean excludeFromIndexes_ = false; + /** + * + * + *
+   * If the value should be excluded from all indexes including those defined
+   * explicitly.
+   * 
+ * + * bool exclude_from_indexes = 19; + * + * @return The excludeFromIndexes. + */ + @java.lang.Override + public boolean getExcludeFromIndexes() { + return excludeFromIndexes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (valueTypeCase_ == 1) { + output.writeBool(1, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + output.writeDouble(3, (double) ((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + output.writeMessage(5, (com.google.events.cloud.datastore.v1.Key) valueType_); + } + if (valueTypeCase_ == 6) { + output.writeMessage(6, (com.google.events.cloud.datastore.v1.Entity) valueType_); + } + if (valueTypeCase_ == 8) { + output.writeMessage(8, (com.google.type.LatLng) valueType_); + } + if (valueTypeCase_ == 9) { + output.writeMessage(9, (com.google.events.cloud.datastore.v1.ArrayValue) valueType_); + } + if (valueTypeCase_ == 10) { + output.writeMessage(10, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 11) { + output.writeEnum(11, ((java.lang.Integer) valueType_)); + } + if (meaning_ != 0) { + output.writeInt32(14, meaning_); + } + if (valueTypeCase_ == 17) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, valueType_); + } + if (valueTypeCase_ == 18) { + output.writeBytes(18, (com.google.protobuf.ByteString) valueType_); + } + if (excludeFromIndexes_ != false) { + output.writeBool(19, excludeFromIndexes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 3, (double) ((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.events.cloud.datastore.v1.Key) valueType_); + } + if (valueTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.events.cloud.datastore.v1.Entity) valueType_); + } + if (valueTypeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.type.LatLng) valueType_); + } + if (valueTypeCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.events.cloud.datastore.v1.ArrayValue) valueType_); + } + if (valueTypeCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 11, ((java.lang.Integer) valueType_)); + } + if (meaning_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, meaning_); + } + if (valueTypeCase_ == 17) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, valueType_); + } + if (valueTypeCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 18, (com.google.protobuf.ByteString) valueType_); + } + if (excludeFromIndexes_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, excludeFromIndexes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.datastore.v1.Value)) { + return super.equals(obj); + } + com.google.events.cloud.datastore.v1.Value other = + (com.google.events.cloud.datastore.v1.Value) obj; + + if (getMeaning() != other.getMeaning()) return false; + if (getExcludeFromIndexes() != other.getExcludeFromIndexes()) return false; + if (!getValueTypeCase().equals(other.getValueTypeCase())) return false; + switch (valueTypeCase_) { + case 11: + if (getNullValueValue() != other.getNullValueValue()) return false; + break; + case 1: + if (getBooleanValue() != other.getBooleanValue()) return false; + break; + case 2: + if (getIntegerValue() != other.getIntegerValue()) return false; + break; + case 3: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false; + break; + case 10: + if (!getTimestampValue().equals(other.getTimestampValue())) return false; + break; + case 5: + if (!getKeyValue().equals(other.getKeyValue())) return false; + break; + case 17: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 18: + if (!getBlobValue().equals(other.getBlobValue())) return false; + break; + case 8: + if (!getGeoPointValue().equals(other.getGeoPointValue())) return false; + break; + case 6: + if (!getEntityValue().equals(other.getEntityValue())) return false; + break; + case 9: + if (!getArrayValue().equals(other.getArrayValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MEANING_FIELD_NUMBER; + hash = (53 * hash) + getMeaning(); + hash = (37 * hash) + EXCLUDE_FROM_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExcludeFromIndexes()); + switch (valueTypeCase_) { + case 11: + hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNullValueValue(); + break; + case 1: + hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBooleanValue()); + break; + case 2: + hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntegerValue()); + break; + case 3: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 10: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 5: + hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKeyValue().hashCode(); + break; + case 17: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 18: + hash = (37 * hash) + BLOB_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBlobValue().hashCode(); + break; + case 8: + hash = (37 * hash) + GEO_POINT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getGeoPointValue().hashCode(); + break; + case 6: + hash = (37 * hash) + ENTITY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getEntityValue().hashCode(); + break; + case 9: + hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getArrayValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Value parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Value parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.datastore.v1.Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.datastore.v1.Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A message that can hold any of the supported value types and associated
+   * metadata.
+   * 
+ * + * Protobuf type {@code google.events.cloud.datastore.v1.Value} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.datastore.v1.Value) + com.google.events.cloud.datastore.v1.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.datastore.v1.Value.class, + com.google.events.cloud.datastore.v1.Value.Builder.class); + } + + // Construct using com.google.events.cloud.datastore.v1.Value.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (timestampValueBuilder_ != null) { + timestampValueBuilder_.clear(); + } + if (keyValueBuilder_ != null) { + keyValueBuilder_.clear(); + } + if (geoPointValueBuilder_ != null) { + geoPointValueBuilder_.clear(); + } + if (entityValueBuilder_ != null) { + entityValueBuilder_.clear(); + } + if (arrayValueBuilder_ != null) { + arrayValueBuilder_.clear(); + } + meaning_ = 0; + excludeFromIndexes_ = false; + valueTypeCase_ = 0; + valueType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.datastore.v1.Data + .internal_static_google_events_cloud_datastore_v1_Value_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value getDefaultInstanceForType() { + return com.google.events.cloud.datastore.v1.Value.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value build() { + com.google.events.cloud.datastore.v1.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value buildPartial() { + com.google.events.cloud.datastore.v1.Value result = + new com.google.events.cloud.datastore.v1.Value(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.datastore.v1.Value result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000800) != 0)) { + result.meaning_ = meaning_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.excludeFromIndexes_ = excludeFromIndexes_; + } + } + + private void buildPartialOneofs(com.google.events.cloud.datastore.v1.Value result) { + result.valueTypeCase_ = valueTypeCase_; + result.valueType_ = this.valueType_; + if (valueTypeCase_ == 10 && timestampValueBuilder_ != null) { + result.valueType_ = timestampValueBuilder_.build(); + } + if (valueTypeCase_ == 5 && keyValueBuilder_ != null) { + result.valueType_ = keyValueBuilder_.build(); + } + if (valueTypeCase_ == 8 && geoPointValueBuilder_ != null) { + result.valueType_ = geoPointValueBuilder_.build(); + } + if (valueTypeCase_ == 6 && entityValueBuilder_ != null) { + result.valueType_ = entityValueBuilder_.build(); + } + if (valueTypeCase_ == 9 && arrayValueBuilder_ != null) { + result.valueType_ = arrayValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.datastore.v1.Value) { + return mergeFrom((com.google.events.cloud.datastore.v1.Value) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.datastore.v1.Value other) { + if (other == com.google.events.cloud.datastore.v1.Value.getDefaultInstance()) return this; + if (other.getMeaning() != 0) { + setMeaning(other.getMeaning()); + } + if (other.getExcludeFromIndexes() != false) { + setExcludeFromIndexes(other.getExcludeFromIndexes()); + } + switch (other.getValueTypeCase()) { + case NULL_VALUE: + { + setNullValueValue(other.getNullValueValue()); + break; + } + case BOOLEAN_VALUE: + { + setBooleanValue(other.getBooleanValue()); + break; + } + case INTEGER_VALUE: + { + setIntegerValue(other.getIntegerValue()); + break; + } + case DOUBLE_VALUE: + { + setDoubleValue(other.getDoubleValue()); + break; + } + case TIMESTAMP_VALUE: + { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case KEY_VALUE: + { + mergeKeyValue(other.getKeyValue()); + break; + } + case STRING_VALUE: + { + valueTypeCase_ = 17; + valueType_ = other.valueType_; + onChanged(); + break; + } + case BLOB_VALUE: + { + setBlobValue(other.getBlobValue()); + break; + } + case GEO_POINT_VALUE: + { + mergeGeoPointValue(other.getGeoPointValue()); + break; + } + case ENTITY_VALUE: + { + mergeEntityValue(other.getEntityValue()); + break; + } + case ARRAY_VALUE: + { + mergeArrayValue(other.getArrayValue()); + break; + } + case VALUETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + valueType_ = input.readBool(); + valueTypeCase_ = 1; + break; + } // case 8 + case 16: + { + valueType_ = input.readInt64(); + valueTypeCase_ = 2; + break; + } // case 16 + case 25: + { + valueType_ = input.readDouble(); + valueTypeCase_ = 3; + break; + } // case 25 + case 42: + { + input.readMessage(getKeyValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getEntityValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 6; + break; + } // case 50 + case 66: + { + input.readMessage(getGeoPointValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 10; + break; + } // case 82 + case 88: + { + int rawValue = input.readEnum(); + valueTypeCase_ = 11; + valueType_ = rawValue; + break; + } // case 88 + case 112: + { + meaning_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 112 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 17; + valueType_ = s; + break; + } // case 138 + case 146: + { + valueType_ = input.readBytes(); + valueTypeCase_ = 18; + break; + } // case 146 + case 152: + { + excludeFromIndexes_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 152 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public Builder clearValueType() { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return Whether the nullValue field is set. + */ + @java.lang.Override + public boolean hasNullValue() { + return valueTypeCase_ == 11; + } + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The enum numeric value on the wire for nullValue. + */ + @java.lang.Override + public int getNullValueValue() { + if (valueTypeCase_ == 11) { + return ((java.lang.Integer) valueType_).intValue(); + } + return 0; + } + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @param value The enum numeric value on the wire for nullValue to set. + * @return This builder for chaining. + */ + public Builder setNullValueValue(int value) { + valueTypeCase_ = 11; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The nullValue. + */ + @java.lang.Override + public com.google.protobuf.NullValue getNullValue() { + if (valueTypeCase_ == 11) { + com.google.protobuf.NullValue result = + com.google.protobuf.NullValue.forNumber((java.lang.Integer) valueType_); + return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; + } + return com.google.protobuf.NullValue.NULL_VALUE; + } + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @param value The nullValue to set. + * @return This builder for chaining. + */ + public Builder setNullValue(com.google.protobuf.NullValue value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 11; + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return This builder for chaining. + */ + public Builder clearNullValue() { + if (valueTypeCase_ == 11) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * + * @return Whether the booleanValue field is set. + */ + public boolean hasBooleanValue() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * + * @return The booleanValue. + */ + public boolean getBooleanValue() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * + * @param value The booleanValue to set. + * @return This builder for chaining. + */ + public Builder setBooleanValue(boolean value) { + + valueTypeCase_ = 1; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearBooleanValue() { + if (valueTypeCase_ == 1) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + public boolean hasIntegerValue() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + public long getIntegerValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + /** + * + * + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * + * @param value The integerValue to set. + * @return This builder for chaining. + */ + public Builder setIntegerValue(long value) { + + valueTypeCase_ = 2; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearIntegerValue() { + if (valueTypeCase_ == 2) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * + * @return Whether the doubleValue field is set. + */ + public boolean hasDoubleValue() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Double) valueType_; + } + return 0D; + } + /** + * + * + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + + valueTypeCase_ = 3; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (valueTypeCase_ == 3) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampValueBuilder_; + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 10; + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (valueTypeCase_ == 10) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + valueTypeCase_ = 10; + return this; + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 10; + return this; + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10 + && valueType_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + valueType_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 10) { + timestampValueBuilder_.mergeFrom(value); + } else { + timestampValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 10; + return this; + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 10) { + valueTypeCase_ = 0; + valueType_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((valueTypeCase_ == 10) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * A timestamp value.
+     * When stored in the Datastore, precise only to microseconds;
+     * any additional precision is rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampValueFieldBuilder() { + if (timestampValueBuilder_ == null) { + if (!(valueTypeCase_ == 10)) { + valueType_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + timestampValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 10; + onChanged(); + return timestampValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder> + keyValueBuilder_; + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return Whether the keyValue field is set. + */ + @java.lang.Override + public boolean hasKeyValue() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return The keyValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Key getKeyValue() { + if (keyValueBuilder_ == null) { + if (valueTypeCase_ == 5) { + return (com.google.events.cloud.datastore.v1.Key) valueType_; + } + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } else { + if (valueTypeCase_ == 5) { + return keyValueBuilder_.getMessage(); + } + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + public Builder setKeyValue(com.google.events.cloud.datastore.v1.Key value) { + if (keyValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + keyValueBuilder_.setMessage(value); + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + public Builder setKeyValue(com.google.events.cloud.datastore.v1.Key.Builder builderForValue) { + if (keyValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + keyValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + public Builder mergeKeyValue(com.google.events.cloud.datastore.v1.Key value) { + if (keyValueBuilder_ == null) { + if (valueTypeCase_ == 5 + && valueType_ != com.google.events.cloud.datastore.v1.Key.getDefaultInstance()) { + valueType_ = + com.google.events.cloud.datastore.v1.Key.newBuilder( + (com.google.events.cloud.datastore.v1.Key) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 5) { + keyValueBuilder_.mergeFrom(value); + } else { + keyValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + public Builder clearKeyValue() { + if (keyValueBuilder_ == null) { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + } + keyValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + public com.google.events.cloud.datastore.v1.Key.Builder getKeyValueBuilder() { + return getKeyValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyValueOrBuilder() { + if ((valueTypeCase_ == 5) && (keyValueBuilder_ != null)) { + return keyValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 5) { + return (com.google.events.cloud.datastore.v1.Key) valueType_; + } + return com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + } + /** + * + * + *
+     * A key value.
+     * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder> + getKeyValueFieldBuilder() { + if (keyValueBuilder_ == null) { + if (!(valueTypeCase_ == 5)) { + valueType_ = com.google.events.cloud.datastore.v1.Key.getDefaultInstance(); + } + keyValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Key, + com.google.events.cloud.datastore.v1.Key.Builder, + com.google.events.cloud.datastore.v1.KeyOrBuilder>( + (com.google.events.cloud.datastore.v1.Key) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 5; + onChanged(); + return keyValueBuilder_; + } + + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return valueTypeCase_ == 17; + } + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 17) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 17) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 17; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueTypeCase_ == 17) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A UTF-8 encoded string value.
+     * When `exclude_from_indexes` is false (it is indexed) , may have at most
+     * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+     * 
+ * + * string string_value = 17; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 17; + valueType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A blob value.
+     * May have at most 1,000,000 bytes.
+     * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+     * In JSON requests, must be base64-encoded.
+     * 
+ * + * bytes blob_value = 18; + * + * @return Whether the blobValue field is set. + */ + public boolean hasBlobValue() { + return valueTypeCase_ == 18; + } + /** + * + * + *
+     * A blob value.
+     * May have at most 1,000,000 bytes.
+     * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+     * In JSON requests, must be base64-encoded.
+     * 
+ * + * bytes blob_value = 18; + * + * @return The blobValue. + */ + public com.google.protobuf.ByteString getBlobValue() { + if (valueTypeCase_ == 18) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * A blob value.
+     * May have at most 1,000,000 bytes.
+     * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+     * In JSON requests, must be base64-encoded.
+     * 
+ * + * bytes blob_value = 18; + * + * @param value The blobValue to set. + * @return This builder for chaining. + */ + public Builder setBlobValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 18; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A blob value.
+     * May have at most 1,000,000 bytes.
+     * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+     * In JSON requests, must be base64-encoded.
+     * 
+ * + * bytes blob_value = 18; + * + * @return This builder for chaining. + */ + public Builder clearBlobValue() { + if (valueTypeCase_ == 18) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + geoPointValueBuilder_; + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return Whether the geoPointValue field is set. + */ + @java.lang.Override + public boolean hasGeoPointValue() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return The geoPointValue. + */ + @java.lang.Override + public com.google.type.LatLng getGeoPointValue() { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (valueTypeCase_ == 8) { + return geoPointValueBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder setGeoPointValue(com.google.type.LatLng value) { + if (geoPointValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + geoPointValueBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder setGeoPointValue(com.google.type.LatLng.Builder builderForValue) { + if (geoPointValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + geoPointValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder mergeGeoPointValue(com.google.type.LatLng value) { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8 && valueType_ != com.google.type.LatLng.getDefaultInstance()) { + valueType_ = + com.google.type.LatLng.newBuilder((com.google.type.LatLng) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 8) { + geoPointValueBuilder_.mergeFrom(value); + } else { + geoPointValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder clearGeoPointValue() { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + } + geoPointValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public com.google.type.LatLng.Builder getGeoPointValueBuilder() { + return getGeoPointValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { + if ((valueTypeCase_ == 8) && (geoPointValueBuilder_ != null)) { + return geoPointValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + * + * + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getGeoPointValueFieldBuilder() { + if (geoPointValueBuilder_ == null) { + if (!(valueTypeCase_ == 8)) { + valueType_ = com.google.type.LatLng.getDefaultInstance(); + } + geoPointValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 8; + onChanged(); + return geoPointValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder> + entityValueBuilder_; + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return Whether the entityValue field is set. + */ + @java.lang.Override + public boolean hasEntityValue() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return The entityValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.Entity getEntityValue() { + if (entityValueBuilder_ == null) { + if (valueTypeCase_ == 6) { + return (com.google.events.cloud.datastore.v1.Entity) valueType_; + } + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } else { + if (valueTypeCase_ == 6) { + return entityValueBuilder_.getMessage(); + } + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + public Builder setEntityValue(com.google.events.cloud.datastore.v1.Entity value) { + if (entityValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + entityValueBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + public Builder setEntityValue( + com.google.events.cloud.datastore.v1.Entity.Builder builderForValue) { + if (entityValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + entityValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + public Builder mergeEntityValue(com.google.events.cloud.datastore.v1.Entity value) { + if (entityValueBuilder_ == null) { + if (valueTypeCase_ == 6 + && valueType_ != com.google.events.cloud.datastore.v1.Entity.getDefaultInstance()) { + valueType_ = + com.google.events.cloud.datastore.v1.Entity.newBuilder( + (com.google.events.cloud.datastore.v1.Entity) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 6) { + entityValueBuilder_.mergeFrom(value); + } else { + entityValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + public Builder clearEntityValue() { + if (entityValueBuilder_ == null) { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + } + entityValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + public com.google.events.cloud.datastore.v1.Entity.Builder getEntityValueBuilder() { + return getEntityValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityValueOrBuilder() { + if ((valueTypeCase_ == 6) && (entityValueBuilder_ != null)) { + return entityValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 6) { + return (com.google.events.cloud.datastore.v1.Entity) valueType_; + } + return com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + } + /** + * + * + *
+     * An entity value.
+     * - May have no key.
+     * - May have a key with an incomplete key path.
+     * - May have a reserved/read-only key.
+     * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder> + getEntityValueFieldBuilder() { + if (entityValueBuilder_ == null) { + if (!(valueTypeCase_ == 6)) { + valueType_ = com.google.events.cloud.datastore.v1.Entity.getDefaultInstance(); + } + entityValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.Entity, + com.google.events.cloud.datastore.v1.Entity.Builder, + com.google.events.cloud.datastore.v1.EntityOrBuilder>( + (com.google.events.cloud.datastore.v1.Entity) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 6; + onChanged(); + return entityValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.ArrayValue, + com.google.events.cloud.datastore.v1.ArrayValue.Builder, + com.google.events.cloud.datastore.v1.ArrayValueOrBuilder> + arrayValueBuilder_; + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValue getArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9) { + return (com.google.events.cloud.datastore.v1.ArrayValue) valueType_; + } + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } else { + if (valueTypeCase_ == 9) { + return arrayValueBuilder_.getMessage(); + } + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + public Builder setArrayValue(com.google.events.cloud.datastore.v1.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + arrayValueBuilder_.setMessage(value); + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + public Builder setArrayValue( + com.google.events.cloud.datastore.v1.ArrayValue.Builder builderForValue) { + if (arrayValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + arrayValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + public Builder mergeArrayValue(com.google.events.cloud.datastore.v1.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9 + && valueType_ != com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance()) { + valueType_ = + com.google.events.cloud.datastore.v1.ArrayValue.newBuilder( + (com.google.events.cloud.datastore.v1.ArrayValue) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 9) { + arrayValueBuilder_.mergeFrom(value); + } else { + arrayValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + public Builder clearArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + } + arrayValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + public com.google.events.cloud.datastore.v1.ArrayValue.Builder getArrayValueBuilder() { + return getArrayValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + @java.lang.Override + public com.google.events.cloud.datastore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { + if ((valueTypeCase_ == 9) && (arrayValueBuilder_ != null)) { + return arrayValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 9) { + return (com.google.events.cloud.datastore.v1.ArrayValue) valueType_; + } + return com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * An array value.
+     * Cannot contain another array value.
+     * A `Value` instance that sets field `array_value` must not set fields
+     * `meaning` or `exclude_from_indexes`.
+     * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.ArrayValue, + com.google.events.cloud.datastore.v1.ArrayValue.Builder, + com.google.events.cloud.datastore.v1.ArrayValueOrBuilder> + getArrayValueFieldBuilder() { + if (arrayValueBuilder_ == null) { + if (!(valueTypeCase_ == 9)) { + valueType_ = com.google.events.cloud.datastore.v1.ArrayValue.getDefaultInstance(); + } + arrayValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.datastore.v1.ArrayValue, + com.google.events.cloud.datastore.v1.ArrayValue.Builder, + com.google.events.cloud.datastore.v1.ArrayValueOrBuilder>( + (com.google.events.cloud.datastore.v1.ArrayValue) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 9; + onChanged(); + return arrayValueBuilder_; + } + + private int meaning_; + /** + * + * + *
+     * The `meaning` field should only be populated for backwards compatibility.
+     * 
+ * + * int32 meaning = 14; + * + * @return The meaning. + */ + @java.lang.Override + public int getMeaning() { + return meaning_; + } + /** + * + * + *
+     * The `meaning` field should only be populated for backwards compatibility.
+     * 
+ * + * int32 meaning = 14; + * + * @param value The meaning to set. + * @return This builder for chaining. + */ + public Builder setMeaning(int value) { + + meaning_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The `meaning` field should only be populated for backwards compatibility.
+     * 
+ * + * int32 meaning = 14; + * + * @return This builder for chaining. + */ + public Builder clearMeaning() { + bitField0_ = (bitField0_ & ~0x00000800); + meaning_ = 0; + onChanged(); + return this; + } + + private boolean excludeFromIndexes_; + /** + * + * + *
+     * If the value should be excluded from all indexes including those defined
+     * explicitly.
+     * 
+ * + * bool exclude_from_indexes = 19; + * + * @return The excludeFromIndexes. + */ + @java.lang.Override + public boolean getExcludeFromIndexes() { + return excludeFromIndexes_; + } + /** + * + * + *
+     * If the value should be excluded from all indexes including those defined
+     * explicitly.
+     * 
+ * + * bool exclude_from_indexes = 19; + * + * @param value The excludeFromIndexes to set. + * @return This builder for chaining. + */ + public Builder setExcludeFromIndexes(boolean value) { + + excludeFromIndexes_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * If the value should be excluded from all indexes including those defined
+     * explicitly.
+     * 
+ * + * bool exclude_from_indexes = 19; + * + * @return This builder for chaining. + */ + public Builder clearExcludeFromIndexes() { + bitField0_ = (bitField0_ & ~0x00001000); + excludeFromIndexes_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.datastore.v1.Value) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.datastore.v1.Value) + private static final com.google.events.cloud.datastore.v1.Value DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.datastore.v1.Value(); + } + + public static com.google.events.cloud.datastore.v1.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.datastore.v1.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ValueOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ValueOrBuilder.java new file mode 100644 index 00000000..129bc5bd --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/datastore/v1/ValueOrBuilder.java @@ -0,0 +1,439 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/datastore/v1/data.proto + +package com.google.events.cloud.datastore.v1; + +public interface ValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.datastore.v1.Value) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return Whether the nullValue field is set. + */ + boolean hasNullValue(); + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The enum numeric value on the wire for nullValue. + */ + int getNullValueValue(); + /** + * + * + *
+   * A null value.
+   * 
+ * + * .google.protobuf.NullValue null_value = 11; + * + * @return The nullValue. + */ + com.google.protobuf.NullValue getNullValue(); + + /** + * + * + *
+   * A boolean value.
+   * 
+ * + * bool boolean_value = 1; + * + * @return Whether the booleanValue field is set. + */ + boolean hasBooleanValue(); + /** + * + * + *
+   * A boolean value.
+   * 
+ * + * bool boolean_value = 1; + * + * @return The booleanValue. + */ + boolean getBooleanValue(); + + /** + * + * + *
+   * An integer value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + boolean hasIntegerValue(); + /** + * + * + *
+   * An integer value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + long getIntegerValue(); + + /** + * + * + *
+   * A double value.
+   * 
+ * + * double double_value = 3; + * + * @return Whether the doubleValue field is set. + */ + boolean hasDoubleValue(); + /** + * + * + *
+   * A double value.
+   * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + /** + * + * + *
+   * A timestamp value.
+   * When stored in the Datastore, precise only to microseconds;
+   * any additional precision is rounded down.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return Whether the keyValue field is set. + */ + boolean hasKeyValue(); + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + * + * @return The keyValue. + */ + com.google.events.cloud.datastore.v1.Key getKeyValue(); + /** + * + * + *
+   * A key value.
+   * 
+ * + * .google.events.cloud.datastore.v1.Key key_value = 5; + */ + com.google.events.cloud.datastore.v1.KeyOrBuilder getKeyValueOrBuilder(); + + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * A UTF-8 encoded string value.
+   * When `exclude_from_indexes` is false (it is indexed) , may have at most
+   * 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
+   * 
+ * + * string string_value = 17; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * A blob value.
+   * May have at most 1,000,000 bytes.
+   * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+   * In JSON requests, must be base64-encoded.
+   * 
+ * + * bytes blob_value = 18; + * + * @return Whether the blobValue field is set. + */ + boolean hasBlobValue(); + /** + * + * + *
+   * A blob value.
+   * May have at most 1,000,000 bytes.
+   * When `exclude_from_indexes` is false, may have at most 1500 bytes.
+   * In JSON requests, must be base64-encoded.
+   * 
+ * + * bytes blob_value = 18; + * + * @return The blobValue. + */ + com.google.protobuf.ByteString getBlobValue(); + + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return Whether the geoPointValue field is set. + */ + boolean hasGeoPointValue(); + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + * + * @return The geoPointValue. + */ + com.google.type.LatLng getGeoPointValue(); + /** + * + * + *
+   * A geo point value representing a point on the surface of Earth.
+   * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder(); + + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return Whether the entityValue field is set. + */ + boolean hasEntityValue(); + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + * + * @return The entityValue. + */ + com.google.events.cloud.datastore.v1.Entity getEntityValue(); + /** + * + * + *
+   * An entity value.
+   * - May have no key.
+   * - May have a key with an incomplete key path.
+   * - May have a reserved/read-only key.
+   * 
+ * + * .google.events.cloud.datastore.v1.Entity entity_value = 6; + */ + com.google.events.cloud.datastore.v1.EntityOrBuilder getEntityValueOrBuilder(); + + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return Whether the arrayValue field is set. + */ + boolean hasArrayValue(); + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + * + * @return The arrayValue. + */ + com.google.events.cloud.datastore.v1.ArrayValue getArrayValue(); + /** + * + * + *
+   * An array value.
+   * Cannot contain another array value.
+   * A `Value` instance that sets field `array_value` must not set fields
+   * `meaning` or `exclude_from_indexes`.
+   * 
+ * + * .google.events.cloud.datastore.v1.ArrayValue array_value = 9; + */ + com.google.events.cloud.datastore.v1.ArrayValueOrBuilder getArrayValueOrBuilder(); + + /** + * + * + *
+   * The `meaning` field should only be populated for backwards compatibility.
+   * 
+ * + * int32 meaning = 14; + * + * @return The meaning. + */ + int getMeaning(); + + /** + * + * + *
+   * If the value should be excluded from all indexes including those defined
+   * explicitly.
+   * 
+ * + * bool exclude_from_indexes = 19; + * + * @return The excludeFromIndexes. + */ + boolean getExcludeFromIndexes(); + + public com.google.events.cloud.datastore.v1.Value.ValueTypeCase getValueTypeCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Data.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Data.java index e50e4518..8fcbc2bc 100644 --- a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Data.java +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Data.java @@ -35,10 +35,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_events_cloud_gkehub_v1_Feature_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_events_cloud_gkehub_v1_Feature_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_events_cloud_gkehub_v1_Feature_MembershipStatesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -63,10 +59,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_events_cloud_gkehub_v1_ScopeFeatureState_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_events_cloud_gkehub_v1_ScopeFeatureState_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_events_cloud_gkehub_v1_MembershipFeatureState_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -170,151 +162,144 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n(google/events/cloud/gkehub/v1/data.pro" + "to\022\035google.events.cloud.gkehub.v1\032\037googl" - + "e/protobuf/timestamp.proto\"\357\007\n\007Feature\022\014" + + "e/protobuf/timestamp.proto\"\252\006\n\007Feature\022\014" + "\n\004name\030\001 \001(\t\022B\n\006labels\030\002 \003(\01322.google.ev" + "ents.cloud.gkehub.v1.Feature.LabelsEntry" + "\022K\n\016resource_state\030\003 \001(\01323.google.events" - + ".cloud.gkehub.v1.FeatureResourceState\022U\n" - + "\020membership_specs\030\005 \003(\0132;.google.events." - + "cloud.gkehub.v1.Feature.MembershipSpecsE" - + "ntry\022@\n\005state\030\006 \001(\01321.google.events.clou" - + "d.gkehub.v1.CommonFeatureState\022W\n\021member" - + "ship_states\030\007 \003(\0132<.google.events.cloud." - + "gkehub.v1.Feature.MembershipStatesEntry\022" - + "/\n\013create_time\030\010 \001(\0132\032.google.protobuf.T" - + "imestamp\022/\n\013update_time\030\t \001(\0132\032.google.p" - + "rotobuf.Timestamp\022/\n\013delete_time\030\n \001(\0132\032" - + ".google.protobuf.Timestamp\022M\n\014scope_stat" - + "es\030\r \003(\01327.google.events.cloud.gkehub.v1" - + ".Feature.ScopeStatesEntry\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032l\n\024Memb" - + "ershipSpecsEntry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002" - + " \001(\01324.google.events.cloud.gkehub.v1.Mem" - + "bershipFeatureSpec:\0028\001\032n\n\025MembershipStat" - + "esEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\01325.go" - + "ogle.events.cloud.gkehub.v1.MembershipFe" - + "atureState:\0028\001\032d\n\020ScopeStatesEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.events.c" - + "loud.gkehub.v1.ScopeFeatureState:\0028\001\"\315\001\n" - + "\024FeatureResourceState\022H\n\005state\030\001 \001(\01629.g" - + "oogle.events.cloud.gkehub.v1.FeatureReso" - + "urceState.State\"k\n\005State\022\025\n\021STATE_UNSPEC" - + "IFIED\020\000\022\014\n\010ENABLING\020\001\022\n\n\006ACTIVE\020\002\022\r\n\tDIS" - + "ABLING\020\003\022\014\n\010UPDATING\020\004\022\024\n\020SERVICE_UPDATI" - + "NG\020\005\"\322\001\n\014FeatureState\022>\n\004code\030\001 \001(\01620.go" - + "ogle.events.cloud.gkehub.v1.FeatureState" - + ".Code\022\023\n\013description\030\002 \001(\t\022/\n\013update_tim" - + "e\030\003 \001(\0132\032.google.protobuf.Timestamp\"<\n\004C" - + "ode\022\024\n\020CODE_UNSPECIFIED\020\000\022\006\n\002OK\020\001\022\013\n\007WAR" - + "NING\020\002\022\t\n\005ERROR\020\003\"P\n\022CommonFeatureState\022" - + ":\n\005state\030\001 \001(\0132+.google.events.cloud.gke" - + "hub.v1.FeatureState\"O\n\021ScopeFeatureState" - + "\022:\n\005state\030\001 \001(\0132+.google.events.cloud.gk" - + "ehub.v1.FeatureState\"0\n\025MembershipFeatur" - + "eSpec\022\027\n\017fleet_inherited\030\001 \001(\010\"T\n\026Member" - + "shipFeatureState\022:\n\005state\030\001 \001(\0132+.google" - + ".events.cloud.gkehub.v1.FeatureState\"\370\001\n" - + "\005Scope\022\014\n\004name\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022/\n\013cre" - + "ate_time\030\003 \001(\0132\032.google.protobuf.Timesta" - + "mp\022/\n\013update_time\030\004 \001(\0132\032.google.protobu" - + "f.Timestamp\022/\n\013delete_time\030\005 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022A\n\005state\030\006 \001(\01322.go" - + "ogle.events.cloud.gkehub.v1.ScopeLifecyc" - + "leState\"\257\001\n\023ScopeLifecycleState\022E\n\004code\030" - + "\001 \001(\01627.google.events.cloud.gkehub.v1.Sc" - + "opeLifecycleState.Code\"Q\n\004Code\022\024\n\020CODE_U" - + "NSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n" - + "\010DELETING\020\003\022\014\n\010UPDATING\020\004\"\274\002\n\021Membership" - + "Binding\022\017\n\005scope\030\003 \001(\tH\000\022\017\n\005fleet\030\004 \001(\010H" - + "\000\022\014\n\004name\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022/\n\013create_t" - + "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\022/\n" - + "\013update_time\030\006 \001(\0132\032.google.protobuf.Tim" - + "estamp\022/\n\013delete_time\030\007 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022M\n\005state\030\010 \001(\0132>.google." - + "events.cloud.gkehub.v1.MembershipBinding" - + "LifecycleStateB\010\n\006target\"\307\001\n\037MembershipB" - + "indingLifecycleState\022Q\n\004code\030\001 \001(\0162C.goo" - + "gle.events.cloud.gkehub.v1.MembershipBin" - + "dingLifecycleState.Code\"Q\n\004Code\022\024\n\020CODE_" - + "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014" - + "\n\010DELETING\020\003\022\014\n\010UPDATING\020\004\"\345\004\n\nMembershi" - + "p\022E\n\010endpoint\030\004 \001(\01321.google.events.clou" - + "d.gkehub.v1.MembershipEndpointH\000\022\014\n\004name" - + "\030\001 \001(\t\022E\n\006labels\030\002 \003(\01325.google.events.c" - + "loud.gkehub.v1.Membership.LabelsEntry\022\023\n" - + "\013description\030\003 \001(\t\022=\n\005state\030\005 \001(\0132..goog" - + "le.events.cloud.gkehub.v1.MembershipStat" - + "e\022/\n\013create_time\030\006 \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013update_time\030\007 \001(\0132\032.google" - + ".protobuf.Timestamp\022/\n\013delete_time\030\010 \001(\013" - + "2\032.google.protobuf.Timestamp\022\023\n\013external" - + "_id\030\t \001(\t\0228\n\024last_connection_time\030\n \001(\0132" - + "\032.google.protobuf.Timestamp\022\021\n\tunique_id" - + "\030\013 \001(\t\022;\n\tauthority\030\014 \001(\0132(.google.event" - + "s.cloud.gkehub.v1.Authority\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\006\n\004ty" - + "pe\"\302\004\n\022MembershipEndpoint\022@\n\013gke_cluster" - + "\030\001 \001(\0132).google.events.cloud.gkehub.v1.G" - + "keClusterH\000\022G\n\017on_prem_cluster\030\004 \001(\0132,.g" - + "oogle.events.cloud.gkehub.v1.OnPremClust" - + "erH\000\022O\n\023multi_cloud_cluster\030\005 \001(\01320.goog" - + "le.events.cloud.gkehub.v1.MultiCloudClus" - + "terH\000\022B\n\014edge_cluster\030\006 \001(\0132*.google.eve" - + "nts.cloud.gkehub.v1.EdgeClusterH\000\022L\n\021app" - + "liance_cluster\030\007 \001(\0132/.google.events.clo" - + "ud.gkehub.v1.ApplianceClusterH\000\022N\n\023kuber" - + "netes_metadata\030\002 \001(\01321.google.events.clo" - + "ud.gkehub.v1.KubernetesMetadata\022N\n\023kuber" - + "netes_resource\030\003 \001(\01321.google.events.clo" - + "ud.gkehub.v1.KubernetesResource\022\026\n\016googl" - + "e_managed\030\010 \001(\010B\006\n\004type\"\371\001\n\022KubernetesRe" - + "source\022M\n\024membership_resources\030\002 \003(\0132/.g" - + "oogle.events.cloud.gkehub.v1.ResourceMan" - + "ifest\022J\n\021connect_resources\030\003 \003(\0132/.googl" - + "e.events.cloud.gkehub.v1.ResourceManifes" - + "t\022H\n\020resource_options\030\004 \001(\0132..google.eve" - + "nts.cloud.gkehub.v1.ResourceOptions\"T\n\017R" - + "esourceOptions\022\027\n\017connect_version\030\001 \001(\t\022" - + "\023\n\013v1beta1_crd\030\002 \001(\010\022\023\n\013k8s_version\030\003 \001(" - + "\t\"<\n\020ResourceManifest\022\020\n\010manifest\030\001 \001(\t\022" - + "\026\n\016cluster_scoped\030\002 \001(\010\"<\n\nGkeCluster\022\025\n" - + "\rresource_link\030\001 \001(\t\022\027\n\017cluster_missing\030" - + "\002 \001(\010\"\207\002\n\rOnPremCluster\022\025\n\rresource_link" - + "\030\001 \001(\t\022\027\n\017cluster_missing\030\002 \001(\010\022\025\n\radmin" - + "_cluster\030\003 \001(\010\022N\n\014cluster_type\030\004 \001(\01628.g" - + "oogle.events.cloud.gkehub.v1.OnPremClust" - + "er.ClusterType\"_\n\013ClusterType\022\033\n\027CLUSTER" - + "TYPE_UNSPECIFIED\020\000\022\r\n\tBOOTSTRAP\020\001\022\n\n\006HYB" - + "RID\020\002\022\016\n\nSTANDALONE\020\003\022\010\n\004USER\020\004\"C\n\021Multi" - + "CloudCluster\022\025\n\rresource_link\030\001 \001(\t\022\027\n\017c" - + "luster_missing\030\002 \001(\010\"$\n\013EdgeCluster\022\025\n\rr" - + "esource_link\030\001 \001(\t\")\n\020ApplianceCluster\022\025" - + "\n\rresource_link\030\001 \001(\t\"\301\001\n\022KubernetesMeta" - + "data\022%\n\035kubernetes_api_server_version\030\001 " - + "\001(\t\022\030\n\020node_provider_id\030\002 \001(\t\022\022\n\nnode_co" - + "unt\030\003 \001(\005\022\022\n\nvcpu_count\030\004 \001(\005\022\021\n\tmemory_" - + "mb\030\005 \001(\005\022/\n\013update_time\030d \001(\0132\032.google.p" - + "rotobuf.Timestamp\"\275\001\n\017MembershipState\022A\n" - + "\004code\030\001 \001(\01623.google.events.cloud.gkehub" - + ".v1.MembershipState.Code\"g\n\004Code\022\024\n\020CODE" - + "_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022" - + "\014\n\010DELETING\020\003\022\014\n\010UPDATING\020\004\022\024\n\020SERVICE_U" - + "PDATING\020\005\"i\n\tAuthority\022\016\n\006issuer\030\001 \001(\t\022\036" - + "\n\026workload_identity_pool\030\002 \001(\t\022\031\n\021identi" - + "ty_provider\030\003 \001(\t\022\021\n\toidc_jwks\030\004 \001(\014\"X\n\016" - + "ScopeEventData\022:\n\007payload\030\001 \001(\0132$.google" - + ".events.cloud.gkehub.v1.ScopeH\000\210\001\001B\n\n\010_p" - + "ayload\"b\n\023MembershipEventData\022?\n\007payload" - + "\030\001 \001(\0132).google.events.cloud.gkehub.v1.M" - + "embershipH\000\210\001\001B\n\n\010_payload\"\\\n\020FeatureEve" - + "ntData\022<\n\007payload\030\001 \001(\0132&.google.events." - + "cloud.gkehub.v1.FeatureH\000\210\001\001B\n\n\010_payload" - + "\"p\n\032MembershipBindingEventData\022F\n\007payloa" - + "d\030\001 \001(\01320.google.events.cloud.gkehub.v1." - + "MembershipBindingH\000\210\001\001B\n\n\010_payloadBN\n!co" - + "m.google.events.cloud.gkehub.v1P\001\252\002&Goog" - + "le.Events.Protobuf.Cloud.GkeHub.V1b\006prot" - + "o3" + + ".cloud.gkehub.v1.FeatureResourceState\022@\n" + + "\005state\030\006 \001(\01321.google.events.cloud.gkehu" + + "b.v1.CommonFeatureState\022W\n\021membership_st" + + "ates\030\007 \003(\0132<.google.events.cloud.gkehub." + + "v1.Feature.MembershipStatesEntry\022/\n\013crea" + + "te_time\030\010 \001(\0132\032.google.protobuf.Timestam" + + "p\022/\n\013update_time\030\t \001(\0132\032.google.protobuf" + + ".Timestamp\022/\n\013delete_time\030\n \001(\0132\032.google" + + ".protobuf.Timestamp\022M\n\014scope_states\030\r \003(" + + "\01327.google.events.cloud.gkehub.v1.Featur" + + "e.ScopeStatesEntry\032-\n\013LabelsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032n\n\025MembershipS" + + "tatesEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\01325" + + ".google.events.cloud.gkehub.v1.Membershi" + + "pFeatureState:\0028\001\032d\n\020ScopeStatesEntry\022\013\n" + + "\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.event" + + "s.cloud.gkehub.v1.ScopeFeatureState:\0028\001\"" + + "\315\001\n\024FeatureResourceState\022H\n\005state\030\001 \001(\0162" + + "9.google.events.cloud.gkehub.v1.FeatureR" + + "esourceState.State\"k\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\014\n\010ENABLING\020\001\022\n\n\006ACTIVE\020\002\022\r\n\t" + + "DISABLING\020\003\022\014\n\010UPDATING\020\004\022\024\n\020SERVICE_UPD" + + "ATING\020\005\"\322\001\n\014FeatureState\022>\n\004code\030\001 \001(\01620" + + ".google.events.cloud.gkehub.v1.FeatureSt" + + "ate.Code\022\023\n\013description\030\002 \001(\t\022/\n\013update_" + + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\"<" + + "\n\004Code\022\024\n\020CODE_UNSPECIFIED\020\000\022\006\n\002OK\020\001\022\013\n\007" + + "WARNING\020\002\022\t\n\005ERROR\020\003\"P\n\022CommonFeatureSta" + + "te\022:\n\005state\030\001 \001(\0132+.google.events.cloud." + + "gkehub.v1.FeatureState\"O\n\021ScopeFeatureSt" + + "ate\022:\n\005state\030\001 \001(\0132+.google.events.cloud" + + ".gkehub.v1.FeatureState\"T\n\026MembershipFea" + + "tureState\022:\n\005state\030\001 \001(\0132+.google.events" + + ".cloud.gkehub.v1.FeatureState\"\370\001\n\005Scope\022" + + "\014\n\004name\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022/\n\013create_tim" + + "e\030\003 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013delete_time\030\005 \001(\0132\032.google.proto" + + "buf.Timestamp\022A\n\005state\030\006 \001(\01322.google.ev" + + "ents.cloud.gkehub.v1.ScopeLifecycleState" + + "\"\257\001\n\023ScopeLifecycleState\022E\n\004code\030\001 \001(\01627" + + ".google.events.cloud.gkehub.v1.ScopeLife" + + "cycleState.Code\"Q\n\004Code\022\024\n\020CODE_UNSPECIF" + + "IED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010DELETI" + + "NG\020\003\022\014\n\010UPDATING\020\004\"\274\002\n\021MembershipBinding" + + "\022\017\n\005scope\030\003 \001(\tH\000\022\017\n\005fleet\030\004 \001(\010H\000\022\014\n\004na" + + "me\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022/\n\013create_time\030\005 \001" + + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + + "_time\030\006 \001(\0132\032.google.protobuf.Timestamp\022" + + "/\n\013delete_time\030\007 \001(\0132\032.google.protobuf.T" + + "imestamp\022M\n\005state\030\010 \001(\0132>.google.events." + + "cloud.gkehub.v1.MembershipBindingLifecyc" + + "leStateB\010\n\006target\"\307\001\n\037MembershipBindingL" + + "ifecycleState\022Q\n\004code\030\001 \001(\0162C.google.eve" + + "nts.cloud.gkehub.v1.MembershipBindingLif" + + "ecycleState.Code\"Q\n\004Code\022\024\n\020CODE_UNSPECI" + + "FIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010DELET" + + "ING\020\003\022\014\n\010UPDATING\020\004\"\345\004\n\nMembership\022E\n\010en" + + "dpoint\030\004 \001(\01321.google.events.cloud.gkehu" + + "b.v1.MembershipEndpointH\000\022\014\n\004name\030\001 \001(\t\022" + + "E\n\006labels\030\002 \003(\01325.google.events.cloud.gk" + + "ehub.v1.Membership.LabelsEntry\022\023\n\013descri" + + "ption\030\003 \001(\t\022=\n\005state\030\005 \001(\0132..google.even" + + "ts.cloud.gkehub.v1.MembershipState\022/\n\013cr" + + "eate_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013update_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013delete_time\030\010 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\023\n\013external_id\030\t \001" + + "(\t\0228\n\024last_connection_time\030\n \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\021\n\tunique_id\030\013 \001(\t\022" + + ";\n\tauthority\030\014 \001(\0132(.google.events.cloud" + + ".gkehub.v1.Authority\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\006\n\004type\"\302\004\n\022" + + "MembershipEndpoint\022@\n\013gke_cluster\030\001 \001(\0132" + + ").google.events.cloud.gkehub.v1.GkeClust" + + "erH\000\022G\n\017on_prem_cluster\030\004 \001(\0132,.google.e" + + "vents.cloud.gkehub.v1.OnPremClusterH\000\022O\n" + + "\023multi_cloud_cluster\030\005 \001(\01320.google.even" + + "ts.cloud.gkehub.v1.MultiCloudClusterH\000\022B" + + "\n\014edge_cluster\030\006 \001(\0132*.google.events.clo" + + "ud.gkehub.v1.EdgeClusterH\000\022L\n\021appliance_" + + "cluster\030\007 \001(\0132/.google.events.cloud.gkeh" + + "ub.v1.ApplianceClusterH\000\022N\n\023kubernetes_m" + + "etadata\030\002 \001(\01321.google.events.cloud.gkeh" + + "ub.v1.KubernetesMetadata\022N\n\023kubernetes_r" + + "esource\030\003 \001(\01321.google.events.cloud.gkeh" + + "ub.v1.KubernetesResource\022\026\n\016google_manag" + + "ed\030\010 \001(\010B\006\n\004type\"\371\001\n\022KubernetesResource\022" + + "M\n\024membership_resources\030\002 \003(\0132/.google.e" + + "vents.cloud.gkehub.v1.ResourceManifest\022J" + + "\n\021connect_resources\030\003 \003(\0132/.google.event" + + "s.cloud.gkehub.v1.ResourceManifest\022H\n\020re" + + "source_options\030\004 \001(\0132..google.events.clo" + + "ud.gkehub.v1.ResourceOptions\"T\n\017Resource" + + "Options\022\027\n\017connect_version\030\001 \001(\t\022\023\n\013v1be" + + "ta1_crd\030\002 \001(\010\022\023\n\013k8s_version\030\003 \001(\t\"<\n\020Re" + + "sourceManifest\022\020\n\010manifest\030\001 \001(\t\022\026\n\016clus" + + "ter_scoped\030\002 \001(\010\"<\n\nGkeCluster\022\025\n\rresour" + + "ce_link\030\001 \001(\t\022\027\n\017cluster_missing\030\002 \001(\010\"\207" + + "\002\n\rOnPremCluster\022\025\n\rresource_link\030\001 \001(\t\022" + + "\027\n\017cluster_missing\030\002 \001(\010\022\025\n\radmin_cluste" + + "r\030\003 \001(\010\022N\n\014cluster_type\030\004 \001(\01628.google.e" + + "vents.cloud.gkehub.v1.OnPremCluster.Clus" + + "terType\"_\n\013ClusterType\022\033\n\027CLUSTERTYPE_UN" + + "SPECIFIED\020\000\022\r\n\tBOOTSTRAP\020\001\022\n\n\006HYBRID\020\002\022\016" + + "\n\nSTANDALONE\020\003\022\010\n\004USER\020\004\"C\n\021MultiCloudCl" + + "uster\022\025\n\rresource_link\030\001 \001(\t\022\027\n\017cluster_" + + "missing\030\002 \001(\010\"$\n\013EdgeCluster\022\025\n\rresource" + + "_link\030\001 \001(\t\")\n\020ApplianceCluster\022\025\n\rresou" + + "rce_link\030\001 \001(\t\"\301\001\n\022KubernetesMetadata\022%\n" + + "\035kubernetes_api_server_version\030\001 \001(\t\022\030\n\020" + + "node_provider_id\030\002 \001(\t\022\022\n\nnode_count\030\003 \001" + + "(\005\022\022\n\nvcpu_count\030\004 \001(\005\022\021\n\tmemory_mb\030\005 \001(" + + "\005\022/\n\013update_time\030d \001(\0132\032.google.protobuf" + + ".Timestamp\"\275\001\n\017MembershipState\022A\n\004code\030\001" + + " \001(\01623.google.events.cloud.gkehub.v1.Mem" + + "bershipState.Code\"g\n\004Code\022\024\n\020CODE_UNSPEC" + + "IFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010DELE" + + "TING\020\003\022\014\n\010UPDATING\020\004\022\024\n\020SERVICE_UPDATING" + + "\020\005\"i\n\tAuthority\022\016\n\006issuer\030\001 \001(\t\022\036\n\026workl" + + "oad_identity_pool\030\002 \001(\t\022\031\n\021identity_prov" + + "ider\030\003 \001(\t\022\021\n\toidc_jwks\030\004 \001(\014\"X\n\016ScopeEv" + + "entData\022:\n\007payload\030\001 \001(\0132$.google.events" + + ".cloud.gkehub.v1.ScopeH\000\210\001\001B\n\n\010_payload\"" + + "b\n\023MembershipEventData\022?\n\007payload\030\001 \001(\0132" + + ").google.events.cloud.gkehub.v1.Membersh" + + "ipH\000\210\001\001B\n\n\010_payload\"\\\n\020FeatureEventData\022" + + "<\n\007payload\030\001 \001(\0132&.google.events.cloud.g" + + "kehub.v1.FeatureH\000\210\001\001B\n\n\010_payload\"p\n\032Mem" + + "bershipBindingEventData\022F\n\007payload\030\001 \001(\013" + + "20.google.events.cloud.gkehub.v1.Members" + + "hipBindingH\000\210\001\001B\n\n\010_payloadBN\n!com.googl" + + "e.events.cloud.gkehub.v1P\001\252\002&Google.Even" + + "ts.Protobuf.Cloud.GkeHub.V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -331,7 +316,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Labels", "ResourceState", - "MembershipSpecs", "State", "MembershipStates", "CreateTime", @@ -347,16 +331,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); - internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_descriptor = - internal_static_google_events_cloud_gkehub_v1_Feature_descriptor.getNestedTypes().get(1); - internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); internal_static_google_events_cloud_gkehub_v1_Feature_MembershipStatesEntry_descriptor = - internal_static_google_events_cloud_gkehub_v1_Feature_descriptor.getNestedTypes().get(2); + internal_static_google_events_cloud_gkehub_v1_Feature_descriptor.getNestedTypes().get(1); internal_static_google_events_cloud_gkehub_v1_Feature_MembershipStatesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_Feature_MembershipStatesEntry_descriptor, @@ -364,7 +340,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_events_cloud_gkehub_v1_Feature_ScopeStatesEntry_descriptor = - internal_static_google_events_cloud_gkehub_v1_Feature_descriptor.getNestedTypes().get(3); + internal_static_google_events_cloud_gkehub_v1_Feature_descriptor.getNestedTypes().get(2); internal_static_google_events_cloud_gkehub_v1_Feature_ScopeStatesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_Feature_ScopeStatesEntry_descriptor, @@ -403,16 +379,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "State", }); - internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor, - new java.lang.String[] { - "FleetInherited", - }); internal_static_google_events_cloud_gkehub_v1_MembershipFeatureState_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(5); internal_static_google_events_cloud_gkehub_v1_MembershipFeatureState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipFeatureState_descriptor, @@ -420,7 +388,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", }); internal_static_google_events_cloud_gkehub_v1_Scope_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(6); internal_static_google_events_cloud_gkehub_v1_Scope_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_Scope_descriptor, @@ -428,7 +396,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Uid", "CreateTime", "UpdateTime", "DeleteTime", "State", }); internal_static_google_events_cloud_gkehub_v1_ScopeLifecycleState_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(7); internal_static_google_events_cloud_gkehub_v1_ScopeLifecycleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_ScopeLifecycleState_descriptor, @@ -436,7 +404,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", }); internal_static_google_events_cloud_gkehub_v1_MembershipBinding_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(8); internal_static_google_events_cloud_gkehub_v1_MembershipBinding_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipBinding_descriptor, @@ -452,7 +420,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Target", }); internal_static_google_events_cloud_gkehub_v1_MembershipBindingLifecycleState_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(9); internal_static_google_events_cloud_gkehub_v1_MembershipBindingLifecycleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipBindingLifecycleState_descriptor, @@ -460,7 +428,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", }); internal_static_google_events_cloud_gkehub_v1_Membership_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(10); internal_static_google_events_cloud_gkehub_v1_Membership_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_Membership_descriptor, @@ -488,7 +456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_events_cloud_gkehub_v1_MembershipEndpoint_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(11); internal_static_google_events_cloud_gkehub_v1_MembershipEndpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipEndpoint_descriptor, @@ -504,7 +472,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", }); internal_static_google_events_cloud_gkehub_v1_KubernetesResource_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(12); internal_static_google_events_cloud_gkehub_v1_KubernetesResource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_KubernetesResource_descriptor, @@ -512,7 +480,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MembershipResources", "ConnectResources", "ResourceOptions", }); internal_static_google_events_cloud_gkehub_v1_ResourceOptions_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(13); internal_static_google_events_cloud_gkehub_v1_ResourceOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_ResourceOptions_descriptor, @@ -520,7 +488,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConnectVersion", "V1Beta1Crd", "K8SVersion", }); internal_static_google_events_cloud_gkehub_v1_ResourceManifest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(14); internal_static_google_events_cloud_gkehub_v1_ResourceManifest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_ResourceManifest_descriptor, @@ -528,7 +496,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Manifest", "ClusterScoped", }); internal_static_google_events_cloud_gkehub_v1_GkeCluster_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(15); internal_static_google_events_cloud_gkehub_v1_GkeCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_GkeCluster_descriptor, @@ -536,7 +504,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResourceLink", "ClusterMissing", }); internal_static_google_events_cloud_gkehub_v1_OnPremCluster_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(16); internal_static_google_events_cloud_gkehub_v1_OnPremCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_OnPremCluster_descriptor, @@ -544,7 +512,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResourceLink", "ClusterMissing", "AdminCluster", "ClusterType", }); internal_static_google_events_cloud_gkehub_v1_MultiCloudCluster_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(17); internal_static_google_events_cloud_gkehub_v1_MultiCloudCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MultiCloudCluster_descriptor, @@ -552,7 +520,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResourceLink", "ClusterMissing", }); internal_static_google_events_cloud_gkehub_v1_EdgeCluster_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(18); internal_static_google_events_cloud_gkehub_v1_EdgeCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_EdgeCluster_descriptor, @@ -560,7 +528,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResourceLink", }); internal_static_google_events_cloud_gkehub_v1_ApplianceCluster_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(19); internal_static_google_events_cloud_gkehub_v1_ApplianceCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_ApplianceCluster_descriptor, @@ -568,7 +536,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResourceLink", }); internal_static_google_events_cloud_gkehub_v1_KubernetesMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(20); internal_static_google_events_cloud_gkehub_v1_KubernetesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_KubernetesMetadata_descriptor, @@ -581,7 +549,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateTime", }); internal_static_google_events_cloud_gkehub_v1_MembershipState_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(21); internal_static_google_events_cloud_gkehub_v1_MembershipState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipState_descriptor, @@ -589,7 +557,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", }); internal_static_google_events_cloud_gkehub_v1_Authority_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(22); internal_static_google_events_cloud_gkehub_v1_Authority_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_Authority_descriptor, @@ -597,7 +565,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Issuer", "WorkloadIdentityPool", "IdentityProvider", "OidcJwks", }); internal_static_google_events_cloud_gkehub_v1_ScopeEventData_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(23); internal_static_google_events_cloud_gkehub_v1_ScopeEventData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_ScopeEventData_descriptor, @@ -605,7 +573,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Payload", "Payload", }); internal_static_google_events_cloud_gkehub_v1_MembershipEventData_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(24); internal_static_google_events_cloud_gkehub_v1_MembershipEventData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipEventData_descriptor, @@ -613,7 +581,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Payload", "Payload", }); internal_static_google_events_cloud_gkehub_v1_FeatureEventData_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(25); internal_static_google_events_cloud_gkehub_v1_FeatureEventData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_FeatureEventData_descriptor, @@ -621,7 +589,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Payload", "Payload", }); internal_static_google_events_cloud_gkehub_v1_MembershipBindingEventData_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(26); internal_static_google_events_cloud_gkehub_v1_MembershipBindingEventData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_gkehub_v1_MembershipBindingEventData_descriptor, diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Feature.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Feature.java index 97cf2924..43257dbf 100644 --- a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Feature.java +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/Feature.java @@ -63,8 +63,6 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); - case 5: - return internalGetMembershipSpecs(); case 7: return internalGetMembershipStates(); case 13: @@ -290,184 +288,6 @@ public com.google.events.cloud.gkehub.v1.FeatureResourceState getResourceState() : resourceState_; } - public static final int MEMBERSHIP_SPECS_FIELD_NUMBER = 5; - - private static final class MembershipSpecsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_Feature_MembershipSpecsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec - .getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - membershipSpecs_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - internalGetMembershipSpecs() { - if (membershipSpecs_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MembershipSpecsDefaultEntryHolder.defaultEntry); - } - return membershipSpecs_; - } - - public int getMembershipSpecsCount() { - return internalGetMembershipSpecs().getMap().size(); - } - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public boolean containsMembershipSpecs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetMembershipSpecs().getMap().containsKey(key); - } - /** Use {@link #getMembershipSpecsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getMembershipSpecs() { - return getMembershipSpecsMap(); - } - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public java.util.Map - getMembershipSpecsMap() { - return internalGetMembershipSpecs().getMap(); - } - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.events.cloud.gkehub.v1.MembershipFeatureSpec - getMembershipSpecsOrDefault( - java.lang.String key, - /* nullable */ - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMembershipSpecs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getMembershipSpecsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMembershipSpecs().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public static final int STATE_FIELD_NUMBER = 6; private com.google.events.cloud.gkehub.v1.CommonFeatureState state_; /** @@ -967,8 +787,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resourceState_ != null) { output.writeMessage(3, getResourceState()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetMembershipSpecs(), MembershipSpecsDefaultEntryHolder.defaultEntry, 5); if (state_ != null) { output.writeMessage(6, getState()); } @@ -1010,19 +828,6 @@ public int getSerializedSize() { if (resourceState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResourceState()); } - for (java.util.Map.Entry< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - entry : internalGetMembershipSpecs().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - membershipSpecs__ = - MembershipSpecsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, membershipSpecs__); - } if (state_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getState()); } @@ -1082,7 +887,6 @@ public boolean equals(final java.lang.Object obj) { if (hasResourceState()) { if (!getResourceState().equals(other.getResourceState())) return false; } - if (!internalGetMembershipSpecs().equals(other.internalGetMembershipSpecs())) return false; if (hasState() != other.hasState()) return false; if (hasState()) { if (!getState().equals(other.getState())) return false; @@ -1122,10 +926,6 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_STATE_FIELD_NUMBER; hash = (53 * hash) + getResourceState().hashCode(); } - if (!internalGetMembershipSpecs().getMap().isEmpty()) { - hash = (37 * hash) + MEMBERSHIP_SPECS_FIELD_NUMBER; - hash = (53 * hash) + internalGetMembershipSpecs().hashCode(); - } if (hasState()) { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); @@ -1273,8 +1073,6 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); - case 5: - return internalGetMembershipSpecs(); case 7: return internalGetMembershipStates(); case 13: @@ -1289,8 +1087,6 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 2: return internalGetMutableLabels(); - case 5: - return internalGetMutableMembershipSpecs(); case 7: return internalGetMutableMembershipStates(); case 13: @@ -1328,7 +1124,6 @@ public Builder clear() { resourceStateBuilder_.dispose(); resourceStateBuilder_ = null; } - internalGetMutableMembershipSpecs().clear(); state_ = null; if (stateBuilder_ != null) { stateBuilder_.dispose(); @@ -1399,26 +1194,22 @@ private void buildPartial0(com.google.events.cloud.gkehub.v1.Feature result) { resourceStateBuilder_ == null ? resourceState_ : resourceStateBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { - result.membershipSpecs_ = internalGetMembershipSpecs(); - result.membershipSpecs_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { result.state_ = stateBuilder_ == null ? state_ : stateBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.membershipStates_ = internalGetMembershipStates(); result.membershipStates_.makeImmutable(); } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.scopeStates_ = internalGetScopeStates(); result.scopeStates_.makeImmutable(); } @@ -1479,13 +1270,11 @@ public Builder mergeFrom(com.google.events.cloud.gkehub.v1.Feature other) { if (other.hasResourceState()) { mergeResourceState(other.getResourceState()); } - internalGetMutableMembershipSpecs().mergeFrom(other.internalGetMembershipSpecs()); - bitField0_ |= 0x00000008; if (other.hasState()) { mergeState(other.getState()); } internalGetMutableMembershipStates().mergeFrom(other.internalGetMembershipStates()); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } @@ -1496,7 +1285,7 @@ public Builder mergeFrom(com.google.events.cloud.gkehub.v1.Feature other) { mergeDeleteTime(other.getDeleteTime()); } internalGetMutableScopeStates().mergeFrom(other.internalGetScopeStates()); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1547,24 +1336,10 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 - case 42: - { - com.google.protobuf.MapEntry< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - membershipSpecs__ = - input.readMessage( - MembershipSpecsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableMembershipSpecs() - .getMutableMap() - .put(membershipSpecs__.getKey(), membershipSpecs__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 42 case 50: { input.readMessage(getStateFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; break; } // case 50 case 58: @@ -1578,25 +1353,25 @@ public Builder mergeFrom( internalGetMutableMembershipStates() .getMutableMap() .put(membershipStates__.getKey(), membershipStates__.getValue()); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; break; } // case 58 case 66: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; break; } // case 66 case 74: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; break; } // case 74 case 82: { input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; break; } // case 82 case 106: @@ -1610,7 +1385,7 @@ public Builder mergeFrom( internalGetMutableScopeStates() .getMutableMap() .put(scopeStates__.getKey(), scopeStates__.getValue()); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; break; } // case 106 default: @@ -2094,292 +1869,6 @@ public Builder clearResourceState() { return resourceStateBuilder_; } - private com.google.protobuf.MapField< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - membershipSpecs_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - internalGetMembershipSpecs() { - if (membershipSpecs_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MembershipSpecsDefaultEntryHolder.defaultEntry); - } - return membershipSpecs_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec> - internalGetMutableMembershipSpecs() { - if (membershipSpecs_ == null) { - membershipSpecs_ = - com.google.protobuf.MapField.newMapField( - MembershipSpecsDefaultEntryHolder.defaultEntry); - } - if (!membershipSpecs_.isMutable()) { - membershipSpecs_ = membershipSpecs_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return membershipSpecs_; - } - - public int getMembershipSpecsCount() { - return internalGetMembershipSpecs().getMap().size(); - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public boolean containsMembershipSpecs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetMembershipSpecs().getMap().containsKey(key); - } - /** Use {@link #getMembershipSpecsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getMembershipSpecs() { - return getMembershipSpecsMap(); - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public java.util.Map - getMembershipSpecsMap() { - return internalGetMembershipSpecs().getMap(); - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.events.cloud.gkehub.v1.MembershipFeatureSpec - getMembershipSpecsOrDefault( - java.lang.String key, - /* nullable */ - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMembershipSpecs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getMembershipSpecsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMembershipSpecs().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMembershipSpecs() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableMembershipSpecs().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - public Builder removeMembershipSpecs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableMembershipSpecs().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableMembershipSpecs() { - bitField0_ |= 0x00000008; - return internalGetMutableMembershipSpecs().getMutableMap(); - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - public Builder putMembershipSpecs( - java.lang.String key, com.google.events.cloud.gkehub.v1.MembershipFeatureSpec value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableMembershipSpecs().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - * - * - *
-     * Optional. Membership-specific configuration for this Feature. If this
-     * Feature does not support any per-Membership configuration, this field may
-     * be unused.
-     * The keys indicate which Membership the configuration is for, in the form:
-     * `projects/{p}/locations/{l}/memberships/{m}`
-     * Where {p} is the project, {l} is a valid location and {m} is a valid
-     * Membership in this project at that location. {p} WILL match the Feature's
-     * project.
-     * {p} will always be returned as the project number, but the project ID is
-     * also accepted during input. If the same Membership is specified in the map
-     * twice (using the project ID form, and the project number form), exactly
-     * ONE of the entries will be saved, with no guarantees as to which. For this
-     * reason, it is recommended the same format be used for all entries when
-     * mutating a Feature.
-     * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - public Builder putAllMembershipSpecs( - java.util.Map - values) { - internalGetMutableMembershipSpecs().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; - return this; - } - private com.google.events.cloud.gkehub.v1.CommonFeatureState state_; private com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.gkehub.v1.CommonFeatureState, @@ -2398,7 +1887,7 @@ public Builder putAllMembershipSpecs( * @return Whether the state field is set. */ public boolean hasState() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2438,7 +1927,7 @@ public Builder setState(com.google.events.cloud.gkehub.v1.CommonFeatureState val } else { stateBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2458,7 +1947,7 @@ public Builder setState( } else { stateBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2473,7 +1962,7 @@ public Builder setState( */ public Builder mergeState(com.google.events.cloud.gkehub.v1.CommonFeatureState value) { if (stateBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000008) != 0) && state_ != null && state_ != com.google.events.cloud.gkehub.v1.CommonFeatureState.getDefaultInstance()) { @@ -2484,7 +1973,7 @@ public Builder mergeState(com.google.events.cloud.gkehub.v1.CommonFeatureState v } else { stateBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2498,7 +1987,7 @@ public Builder mergeState(com.google.events.cloud.gkehub.v1.CommonFeatureState v * .google.events.cloud.gkehub.v1.CommonFeatureState state = 6; */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); state_ = null; if (stateBuilder_ != null) { stateBuilder_.dispose(); @@ -2517,7 +2006,7 @@ public Builder clearState() { * .google.events.cloud.gkehub.v1.CommonFeatureState state = 6; */ public com.google.events.cloud.gkehub.v1.CommonFeatureState.Builder getStateBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return getStateFieldBuilder().getBuilder(); } @@ -2590,7 +2079,7 @@ public com.google.events.cloud.gkehub.v1.CommonFeatureStateOrBuilder getStateOrB if (!membershipStates_.isMutable()) { membershipStates_ = membershipStates_.copy(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return membershipStates_; } @@ -2713,7 +2202,7 @@ public com.google.events.cloud.gkehub.v1.MembershipFeatureState getMembershipSta } public Builder clearMembershipStates() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableMembershipStates().getMutableMap().clear(); return this; } @@ -2745,7 +2234,7 @@ public Builder removeMembershipStates(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableMembershipStates() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return internalGetMutableMembershipStates().getMutableMap(); } /** @@ -2774,7 +2263,7 @@ public Builder putMembershipStates( throw new NullPointerException("map value"); } internalGetMutableMembershipStates().getMutableMap().put(key, value); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return this; } /** @@ -2798,7 +2287,7 @@ public Builder putAllMembershipStates( java.util.Map values) { internalGetMutableMembershipStates().getMutableMap().putAll(values); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return this; } @@ -2820,7 +2309,7 @@ public Builder putAllMembershipStates( * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2860,7 +2349,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2879,7 +2368,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2894,7 +2383,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000020) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -2904,7 +2393,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2918,7 +2407,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp create_time = 8; */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -2937,7 +2426,7 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 8; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -3003,7 +2492,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -3043,7 +2532,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3062,7 +2551,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3077,7 +2566,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000040) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -3087,7 +2576,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3101,7 +2590,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp update_time = 9; */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -3120,7 +2609,7 @@ public Builder clearUpdateTime() { * .google.protobuf.Timestamp update_time = 9; */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } @@ -3186,7 +2675,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * @return Whether the deleteTime field is set. */ public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -3226,7 +2715,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { } else { deleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3245,7 +2734,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal } else { deleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3260,7 +2749,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { if (deleteTimeBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000080) != 0) && deleteTime_ != null && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getDeleteTimeBuilder().mergeFrom(value); @@ -3270,7 +2759,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { } else { deleteTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3284,7 +2773,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp delete_time = 10; */ public Builder clearDeleteTime() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); deleteTime_ = null; if (deleteTimeBuilder_ != null) { deleteTimeBuilder_.dispose(); @@ -3303,7 +2792,7 @@ public Builder clearDeleteTime() { * .google.protobuf.Timestamp delete_time = 10; */ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return getDeleteTimeFieldBuilder().getBuilder(); } @@ -3375,7 +2864,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { if (!scopeStates_.isMutable()) { scopeStates_ = scopeStates_.copy(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return scopeStates_; } @@ -3490,7 +2979,7 @@ public com.google.events.cloud.gkehub.v1.ScopeFeatureState getScopeStatesOrThrow } public Builder clearScopeStates() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableScopeStates().getMutableMap().clear(); return this; } @@ -3520,7 +3009,7 @@ public Builder removeScopeStates(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableScopeStates() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; return internalGetMutableScopeStates().getMutableMap(); } /** @@ -3547,7 +3036,7 @@ public Builder putScopeStates( throw new NullPointerException("map value"); } internalGetMutableScopeStates().getMutableMap().put(key, value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; return this; } /** @@ -3569,7 +3058,7 @@ public Builder putAllScopeStates( java.util.Map values) { internalGetMutableScopeStates().getMutableMap().putAll(values); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; return this; } diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/FeatureOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/FeatureOrBuilder.java index a0eda77e..7735e156 100644 --- a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/FeatureOrBuilder.java +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/FeatureOrBuilder.java @@ -143,142 +143,6 @@ java.lang.String getLabelsOrDefault( */ com.google.events.cloud.gkehub.v1.FeatureResourceStateOrBuilder getResourceStateOrBuilder(); - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - int getMembershipSpecsCount(); - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - boolean containsMembershipSpecs(java.lang.String key); - /** Use {@link #getMembershipSpecsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getMembershipSpecs(); - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - java.util.Map - getMembershipSpecsMap(); - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - /* nullable */ - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getMembershipSpecsOrDefault( - java.lang.String key, - /* nullable */ - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec defaultValue); - /** - * - * - *
-   * Optional. Membership-specific configuration for this Feature. If this
-   * Feature does not support any per-Membership configuration, this field may
-   * be unused.
-   * The keys indicate which Membership the configuration is for, in the form:
-   * `projects/{p}/locations/{l}/memberships/{m}`
-   * Where {p} is the project, {l} is a valid location and {m} is a valid
-   * Membership in this project at that location. {p} WILL match the Feature's
-   * project.
-   * {p} will always be returned as the project number, but the project ID is
-   * also accepted during input. If the same Membership is specified in the map
-   * twice (using the project ID form, and the project number form), exactly
-   * ONE of the entries will be saved, with no guarantees as to which. For this
-   * reason, it is recommended the same format be used for all entries when
-   * mutating a Feature.
-   * 
- * - * - * map<string, .google.events.cloud.gkehub.v1.MembershipFeatureSpec> membership_specs = 5; - * - */ - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getMembershipSpecsOrThrow( - java.lang.String key); - /** * * diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpecOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpecOrBuilder.java deleted file mode 100644 index b1d1f863..00000000 --- a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpecOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/events/cloud/gkehub/v1/data.proto - -package com.google.events.cloud.gkehub.v1; - -public interface MembershipFeatureSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.events.cloud.gkehub.v1.MembershipFeatureSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * True if value of `feature_spec` was inherited from a fleet-level default.
-   * 
- * - * bool fleet_inherited = 1; - * - * @return The fleetInherited. - */ - boolean getFleetInherited(); -} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfo.java new file mode 100644 index 00000000..d3f5d8df --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfo.java @@ -0,0 +1,1639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "abort" and associated resource.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.AbortInfo} + */ +public final class AbortInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.AbortInfo) + AbortInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AbortInfo.newBuilder() to construct. + private AbortInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AbortInfo() { + cause_ = 0; + resourceUri_ = ""; + projectsMissingPermission_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AbortInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.AbortInfo.class, + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder.class); + } + + /** + * + * + *
+   * Abort cause types:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.AbortInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + UNKNOWN_NETWORK(1), + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + UNKNOWN_IP(2), + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + UNKNOWN_PROJECT(3), + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + PERMISSION_DENIED(4), + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + NO_SOURCE_LOCATION(5), + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + INVALID_ARGUMENT(6), + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + NO_EXTERNAL_IP(7), + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + UNINTENDED_DESTINATION(8), + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + TRACE_TOO_LONG(9), + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + INTERNAL_ERROR(10), + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + SOURCE_ENDPOINT_NOT_FOUND(11), + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + MISMATCHED_SOURCE_NETWORK(12), + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + DESTINATION_ENDPOINT_NOT_FOUND(13), + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + MISMATCHED_DESTINATION_NETWORK(14), + /** + * + * + *
+     * Aborted because the test scenario is not supported.
+     * 
+ * + * UNSUPPORTED = 15; + */ + UNSUPPORTED(15), + /** + * + * + *
+     * Aborted because the source and destination resources have no common IP
+     * version.
+     * 
+ * + * MISMATCHED_IP_VERSION = 16; + */ + MISMATCHED_IP_VERSION(16), + /** + * + * + *
+     * Aborted because the connection between the control plane and the node of
+     * the source cluster is initiated by the node and managed by the
+     * Konnectivity proxy.
+     * 
+ * + * GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + */ + GKE_KONNECTIVITY_PROXY_UNSUPPORTED(17), + /** + * + * + *
+     * Aborted because expected resource configuration was missing.
+     * 
+ * + * RESOURCE_CONFIG_NOT_FOUND = 18; + */ + RESOURCE_CONFIG_NOT_FOUND(18), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + public static final int UNKNOWN_NETWORK_VALUE = 1; + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + public static final int UNKNOWN_IP_VALUE = 2; + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + public static final int UNKNOWN_PROJECT_VALUE = 3; + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + public static final int PERMISSION_DENIED_VALUE = 4; + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + public static final int NO_SOURCE_LOCATION_VALUE = 5; + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + public static final int INVALID_ARGUMENT_VALUE = 6; + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + public static final int NO_EXTERNAL_IP_VALUE = 7; + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + public static final int UNINTENDED_DESTINATION_VALUE = 8; + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + public static final int TRACE_TOO_LONG_VALUE = 9; + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + public static final int INTERNAL_ERROR_VALUE = 10; + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + public static final int SOURCE_ENDPOINT_NOT_FOUND_VALUE = 11; + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + public static final int MISMATCHED_SOURCE_NETWORK_VALUE = 12; + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + public static final int DESTINATION_ENDPOINT_NOT_FOUND_VALUE = 13; + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + public static final int MISMATCHED_DESTINATION_NETWORK_VALUE = 14; + /** + * + * + *
+     * Aborted because the test scenario is not supported.
+     * 
+ * + * UNSUPPORTED = 15; + */ + public static final int UNSUPPORTED_VALUE = 15; + /** + * + * + *
+     * Aborted because the source and destination resources have no common IP
+     * version.
+     * 
+ * + * MISMATCHED_IP_VERSION = 16; + */ + public static final int MISMATCHED_IP_VERSION_VALUE = 16; + /** + * + * + *
+     * Aborted because the connection between the control plane and the node of
+     * the source cluster is initiated by the node and managed by the
+     * Konnectivity proxy.
+     * 
+ * + * GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + */ + public static final int GKE_KONNECTIVITY_PROXY_UNSUPPORTED_VALUE = 17; + /** + * + * + *
+     * Aborted because expected resource configuration was missing.
+     * 
+ * + * RESOURCE_CONFIG_NOT_FOUND = 18; + */ + public static final int RESOURCE_CONFIG_NOT_FOUND_VALUE = 18; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Cause valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_NETWORK; + case 2: + return UNKNOWN_IP; + case 3: + return UNKNOWN_PROJECT; + case 4: + return PERMISSION_DENIED; + case 5: + return NO_SOURCE_LOCATION; + case 6: + return INVALID_ARGUMENT; + case 7: + return NO_EXTERNAL_IP; + case 8: + return UNINTENDED_DESTINATION; + case 9: + return TRACE_TOO_LONG; + case 10: + return INTERNAL_ERROR; + case 11: + return SOURCE_ENDPOINT_NOT_FOUND; + case 12: + return MISMATCHED_SOURCE_NETWORK; + case 13: + return DESTINATION_ENDPOINT_NOT_FOUND; + case 14: + return MISMATCHED_DESTINATION_NETWORK; + case 15: + return UNSUPPORTED; + case 16: + return MISMATCHED_IP_VERSION; + case 17: + return GKE_KONNECTIVITY_PROXY_UNSUPPORTED; + case 18: + return RESOURCE_CONFIG_NOT_FOUND; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cause findValueByNumber(int number) { + return Cause.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.AbortInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_ = 0; + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause getCause() { + com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause result = + com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.forNumber(cause_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECTS_MISSING_PERMISSION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList projectsMissingPermission_; + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return A list containing the projectsMissingPermission. + */ + public com.google.protobuf.ProtocolStringList getProjectsMissingPermissionList() { + return projectsMissingPermission_; + } + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return The count of projectsMissingPermission. + */ + public int getProjectsMissingPermissionCount() { + return projectsMissingPermission_.size(); + } + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the element to return. + * @return The projectsMissingPermission at the given index. + */ + public java.lang.String getProjectsMissingPermission(int index) { + return projectsMissingPermission_.get(index); + } + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the value to return. + * @return The bytes of the projectsMissingPermission at the given index. + */ + public com.google.protobuf.ByteString getProjectsMissingPermissionBytes(int index) { + return projectsMissingPermission_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cause_ + != com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, cause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + for (int i = 0; i < projectsMissingPermission_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, projectsMissingPermission_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + { + int dataSize = 0; + for (int i = 0; i < projectsMissingPermission_.size(); i++) { + dataSize += computeStringSizeNoTag(projectsMissingPermission_.getRaw(i)); + } + size += dataSize; + size += 1 * getProjectsMissingPermissionList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.AbortInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.AbortInfo other = + (com.google.events.cloud.networkmanagement.v1.AbortInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!getProjectsMissingPermissionList().equals(other.getProjectsMissingPermissionList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + if (getProjectsMissingPermissionCount() > 0) { + hash = (37 * hash) + PROJECTS_MISSING_PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getProjectsMissingPermissionList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.AbortInfo 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; + } + /** + * + * + *
+   * Details of the final state "abort" and associated resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.AbortInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.AbortInfo) + com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.AbortInfo.class, + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.AbortInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cause_ = 0; + resourceUri_ = ""; + projectsMissingPermission_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo build() { + com.google.events.cloud.networkmanagement.v1.AbortInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.AbortInfo result = + new com.google.events.cloud.networkmanagement.v1.AbortInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.AbortInfo result) { + if (((bitField0_ & 0x00000004) != 0)) { + projectsMissingPermission_ = projectsMissingPermission_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.projectsMissingPermission_ = projectsMissingPermission_; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.AbortInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cause_ = cause_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.AbortInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.AbortInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.AbortInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance()) + return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.projectsMissingPermission_.isEmpty()) { + if (projectsMissingPermission_.isEmpty()) { + projectsMissingPermission_ = other.projectsMissingPermission_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureProjectsMissingPermissionIsMutable(); + projectsMissingPermission_.addAll(other.projectsMissingPermission_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + cause_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProjectsMissingPermissionIsMutable(); + projectsMissingPermission_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int cause_ = 0; + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + cause_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause getCause() { + com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause result = + com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.forNumber(cause_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + bitField0_ = (bitField0_ & ~0x00000001); + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList projectsMissingPermission_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureProjectsMissingPermissionIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + projectsMissingPermission_ = + new com.google.protobuf.LazyStringArrayList(projectsMissingPermission_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return A list containing the projectsMissingPermission. + */ + public com.google.protobuf.ProtocolStringList getProjectsMissingPermissionList() { + return projectsMissingPermission_.getUnmodifiableView(); + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return The count of projectsMissingPermission. + */ + public int getProjectsMissingPermissionCount() { + return projectsMissingPermission_.size(); + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the element to return. + * @return The projectsMissingPermission at the given index. + */ + public java.lang.String getProjectsMissingPermission(int index) { + return projectsMissingPermission_.get(index); + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the value to return. + * @return The bytes of the projectsMissingPermission at the given index. + */ + public com.google.protobuf.ByteString getProjectsMissingPermissionBytes(int index) { + return projectsMissingPermission_.getByteString(index); + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index to set the value at. + * @param value The projectsMissingPermission to set. + * @return This builder for chaining. + */ + public Builder setProjectsMissingPermission(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectsMissingPermissionIsMutable(); + projectsMissingPermission_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param value The projectsMissingPermission to add. + * @return This builder for chaining. + */ + public Builder addProjectsMissingPermission(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectsMissingPermissionIsMutable(); + projectsMissingPermission_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param values The projectsMissingPermission to add. + * @return This builder for chaining. + */ + public Builder addAllProjectsMissingPermission(java.lang.Iterable values) { + ensureProjectsMissingPermissionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projectsMissingPermission_); + onChanged(); + return this; + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return This builder for chaining. + */ + public Builder clearProjectsMissingPermission() { + projectsMissingPermission_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * List of project IDs that the user has specified in the request but does
+     * not have permission to access network configs. Analysis is aborted in this
+     * case with the PERMISSION_DENIED cause.
+     * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param value The bytes of the projectsMissingPermission to add. + * @return This builder for chaining. + */ + public Builder addProjectsMissingPermissionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProjectsMissingPermissionIsMutable(); + projectsMissingPermission_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.AbortInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.AbortInfo) + private static final com.google.events.cloud.networkmanagement.v1.AbortInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.AbortInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.AbortInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AbortInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfoOrBuilder.java new file mode 100644 index 00000000..4d84a667 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AbortInfoOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface AbortInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.AbortInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.events.cloud.networkmanagement.v1.AbortInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); + + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return A list containing the projectsMissingPermission. + */ + java.util.List getProjectsMissingPermissionList(); + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @return The count of projectsMissingPermission. + */ + int getProjectsMissingPermissionCount(); + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the element to return. + * @return The projectsMissingPermission at the given index. + */ + java.lang.String getProjectsMissingPermission(int index); + /** + * + * + *
+   * List of project IDs that the user has specified in the request but does
+   * not have permission to access network configs. Analysis is aborted in this
+   * case with the PERMISSION_DENIED cause.
+   * 
+ * + * repeated string projects_missing_permission = 3; + * + * @param index The index of the value to return. + * @return The bytes of the projectsMissingPermission at the given index. + */ + com.google.protobuf.ByteString getProjectsMissingPermissionBytes(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfo.java new file mode 100644 index 00000000..a6a0d75f --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfo.java @@ -0,0 +1,1185 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with an App Engine version.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.AppEngineVersionInfo} + */ +public final class AppEngineVersionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) + AppEngineVersionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppEngineVersionInfo.newBuilder() to construct. + private AppEngineVersionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppEngineVersionInfo() { + displayName_ = ""; + uri_ = ""; + runtime_ = ""; + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppEngineVersionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.class, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of an App Engine version.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of an App Engine version.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of an App Engine version.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of an App Engine version.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object runtime_ = ""; + /** + * + * + *
+   * Runtime of the App Engine version.
+   * 
+ * + * string runtime = 3; + * + * @return The runtime. + */ + @java.lang.Override + public java.lang.String getRuntime() { + java.lang.Object ref = runtime_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtime_ = s; + return s; + } + } + /** + * + * + *
+   * Runtime of the App Engine version.
+   * 
+ * + * string runtime = 3; + * + * @return The bytes for runtime. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeBytes() { + java.lang.Object ref = runtime_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * App Engine execution environment for a version.
+   * 
+ * + * string environment = 4; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * App Engine execution environment for a version.
+   * 
+ * + * string environment = 4; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, runtime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, environment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, runtime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, environment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo other = + (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getRuntime().equals(other.getRuntime())) return false; + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getRuntime().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with an App Engine version.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.AppEngineVersionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.class, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + runtime_ = ""; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo build() { + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo result = + new com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.runtime_ = runtime_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRuntime().isEmpty()) { + runtime_ = other.runtime_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + runtime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of an App Engine version.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of an App Engine version.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of an App Engine version.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of an App Engine version.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of an App Engine version.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of an App Engine version.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of an App Engine version.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of an App Engine version.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of an App Engine version.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of an App Engine version.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object runtime_ = ""; + /** + * + * + *
+     * Runtime of the App Engine version.
+     * 
+ * + * string runtime = 3; + * + * @return The runtime. + */ + public java.lang.String getRuntime() { + java.lang.Object ref = runtime_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtime_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Runtime of the App Engine version.
+     * 
+ * + * string runtime = 3; + * + * @return The bytes for runtime. + */ + public com.google.protobuf.ByteString getRuntimeBytes() { + java.lang.Object ref = runtime_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Runtime of the App Engine version.
+     * 
+ * + * string runtime = 3; + * + * @param value The runtime to set. + * @return This builder for chaining. + */ + public Builder setRuntime(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + runtime_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime of the App Engine version.
+     * 
+ * + * string runtime = 3; + * + * @return This builder for chaining. + */ + public Builder clearRuntime() { + runtime_ = getDefaultInstance().getRuntime(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime of the App Engine version.
+     * 
+ * + * string runtime = 3; + * + * @param value The bytes for runtime to set. + * @return This builder for chaining. + */ + public Builder setRuntimeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + runtime_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * App Engine execution environment for a version.
+     * 
+ * + * string environment = 4; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * App Engine execution environment for a version.
+     * 
+ * + * string environment = 4; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * App Engine execution environment for a version.
+     * 
+ * + * string environment = 4; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine execution environment for a version.
+     * 
+ * + * string environment = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine execution environment for a version.
+     * 
+ * + * string environment = 4; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) + private static final com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppEngineVersionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfoOrBuilder.java new file mode 100644 index 00000000..a5e5ffbb --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/AppEngineVersionInfoOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface AppEngineVersionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of an App Engine version.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of an App Engine version.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of an App Engine version.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of an App Engine version.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Runtime of the App Engine version.
+   * 
+ * + * string runtime = 3; + * + * @return The runtime. + */ + java.lang.String getRuntime(); + /** + * + * + *
+   * Runtime of the App Engine version.
+   * 
+ * + * string runtime = 3; + * + * @return The bytes for runtime. + */ + com.google.protobuf.ByteString getRuntimeBytes(); + + /** + * + * + *
+   * App Engine execution environment for a version.
+   * 
+ * + * string environment = 4; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * App Engine execution environment for a version.
+   * 
+ * + * string environment = 4; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfo.java new file mode 100644 index 00000000..ff9d6693 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfo.java @@ -0,0 +1,1093 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Cloud Function.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudFunctionInfo} + */ +public final class CloudFunctionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.CloudFunctionInfo) + CloudFunctionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudFunctionInfo.newBuilder() to construct. + private CloudFunctionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudFunctionInfo() { + displayName_ = ""; + uri_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudFunctionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Cloud Function.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Cloud Function.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Cloud Function.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud Function.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Location in which the Cloud Function is deployed.
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Location in which the Cloud Function is deployed.
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_ID_FIELD_NUMBER = 4; + private long versionId_ = 0L; + /** + * + * + *
+   * Latest successfully deployed version id of the Cloud Function.
+   * 
+ * + * int64 version_id = 4; + * + * @return The versionId. + */ + @java.lang.Override + public long getVersionId() { + return versionId_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, location_); + } + if (versionId_ != 0L) { + output.writeInt64(4, versionId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, location_); + } + if (versionId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, versionId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo other = + (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (getVersionId() != other.getVersionId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVersionId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Cloud Function.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudFunctionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.CloudFunctionInfo) + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + location_ = ""; + versionId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo build() { + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo result = + new com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.versionId_ = versionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getVersionId() != 0L) { + setVersionId(other.getVersionId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + versionId_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Cloud Function.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Cloud Function.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Cloud Function.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud Function.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud Function.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Cloud Function.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud Function.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud Function.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud Function.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud Function.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Location in which the Cloud Function is deployed.
+     * 
+ * + * string location = 3; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location in which the Cloud Function is deployed.
+     * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location in which the Cloud Function is deployed.
+     * 
+ * + * string location = 3; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which the Cloud Function is deployed.
+     * 
+ * + * string location = 3; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which the Cloud Function is deployed.
+     * 
+ * + * string location = 3; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long versionId_; + /** + * + * + *
+     * Latest successfully deployed version id of the Cloud Function.
+     * 
+ * + * int64 version_id = 4; + * + * @return The versionId. + */ + @java.lang.Override + public long getVersionId() { + return versionId_; + } + /** + * + * + *
+     * Latest successfully deployed version id of the Cloud Function.
+     * 
+ * + * int64 version_id = 4; + * + * @param value The versionId to set. + * @return This builder for chaining. + */ + public Builder setVersionId(long value) { + + versionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Latest successfully deployed version id of the Cloud Function.
+     * 
+ * + * int64 version_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersionId() { + bitField0_ = (bitField0_ & ~0x00000008); + versionId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.CloudFunctionInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.CloudFunctionInfo) + private static final com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudFunctionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfoOrBuilder.java new file mode 100644 index 00000000..7a590cae --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudFunctionInfoOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface CloudFunctionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.CloudFunctionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Cloud Function.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Cloud Function.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Cloud Function.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Cloud Function.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Location in which the Cloud Function is deployed.
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Location in which the Cloud Function is deployed.
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Latest successfully deployed version id of the Cloud Function.
+   * 
+ * + * int64 version_id = 4; + * + * @return The versionId. + */ + long getVersionId(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfo.java new file mode 100644 index 00000000..2e15d93e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfo.java @@ -0,0 +1,1185 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Cloud Run revision.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo} + */ +public final class CloudRunRevisionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) + CloudRunRevisionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudRunRevisionInfo.newBuilder() to construct. + private CloudRunRevisionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudRunRevisionInfo() { + displayName_ = ""; + uri_ = ""; + location_ = ""; + serviceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudRunRevisionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Cloud Run revision.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Cloud Run revision.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Cloud Run revision.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud Run revision.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Location in which this revision is deployed.
+   * 
+ * + * string location = 4; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Location in which this revision is deployed.
+   * 
+ * + * string location = 4; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceUri_ = ""; + /** + * + * + *
+   * URI of Cloud Run service this revision belongs to.
+   * 
+ * + * string service_uri = 5; + * + * @return The serviceUri. + */ + @java.lang.Override + public java.lang.String getServiceUri() { + java.lang.Object ref = serviceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of Cloud Run service this revision belongs to.
+   * 
+ * + * string service_uri = 5; + * + * @return The bytes for serviceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceUriBytes() { + java.lang.Object ref = serviceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo other = + (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getServiceUri().equals(other.getServiceUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + SERVICE_URI_FIELD_NUMBER; + hash = (53 * hash) + getServiceUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Cloud Run revision.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + location_ = ""; + serviceUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo build() { + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo result = + new com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serviceUri_ = serviceUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getServiceUri().isEmpty()) { + serviceUri_ = other.serviceUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + serviceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Cloud Run revision.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Cloud Run revision.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Cloud Run revision.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud Run revision.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud Run revision.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Cloud Run revision.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud Run revision.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud Run revision.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud Run revision.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud Run revision.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Location in which this revision is deployed.
+     * 
+ * + * string location = 4; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location in which this revision is deployed.
+     * 
+ * + * string location = 4; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location in which this revision is deployed.
+     * 
+ * + * string location = 4; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which this revision is deployed.
+     * 
+ * + * string location = 4; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which this revision is deployed.
+     * 
+ * + * string location = 4; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object serviceUri_ = ""; + /** + * + * + *
+     * URI of Cloud Run service this revision belongs to.
+     * 
+ * + * string service_uri = 5; + * + * @return The serviceUri. + */ + public java.lang.String getServiceUri() { + java.lang.Object ref = serviceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of Cloud Run service this revision belongs to.
+     * 
+ * + * string service_uri = 5; + * + * @return The bytes for serviceUri. + */ + public com.google.protobuf.ByteString getServiceUriBytes() { + java.lang.Object ref = serviceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of Cloud Run service this revision belongs to.
+     * 
+ * + * string service_uri = 5; + * + * @param value The serviceUri to set. + * @return This builder for chaining. + */ + public Builder setServiceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of Cloud Run service this revision belongs to.
+     * 
+ * + * string service_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearServiceUri() { + serviceUri_ = getDefaultInstance().getServiceUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of Cloud Run service this revision belongs to.
+     * 
+ * + * string service_uri = 5; + * + * @param value The bytes for serviceUri to set. + * @return This builder for chaining. + */ + public Builder setServiceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) + private static final com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRunRevisionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfoOrBuilder.java new file mode 100644 index 00000000..0cd9494f --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudRunRevisionInfoOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface CloudRunRevisionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Cloud Run revision.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Cloud Run revision.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Cloud Run revision.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Cloud Run revision.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Location in which this revision is deployed.
+   * 
+ * + * string location = 4; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Location in which this revision is deployed.
+   * 
+ * + * string location = 4; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * URI of Cloud Run service this revision belongs to.
+   * 
+ * + * string service_uri = 5; + * + * @return The serviceUri. + */ + java.lang.String getServiceUri(); + /** + * + * + *
+   * URI of Cloud Run service this revision belongs to.
+   * 
+ * + * string service_uri = 5; + * + * @return The bytes for serviceUri. + */ + com.google.protobuf.ByteString getServiceUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java new file mode 100644 index 00000000..cf88050b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java @@ -0,0 +1,1556 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Cloud SQL instance.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo} + */ +public final class CloudSQLInstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + CloudSQLInstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSQLInstanceInfo.newBuilder() to construct. + private CloudSQLInstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSQLInstanceInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSQLInstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object internalIp_ = ""; + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIp_ = ""; + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, region_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, region_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo other = + (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Cloud SQL instance.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.class, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + region_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo build() { + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo result = + new com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.internalIp_ = internalIp_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.externalIp_ = externalIp_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.region_ = region_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + internalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + externalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + internalIp_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + internalIp_ = getDefaultInstance().getInternalIp(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + internalIp_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + externalIp_ = getDefaultInstance().getExternalIp(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + private static final com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSQLInstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java new file mode 100644 index 00000000..2fbd6760 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface CloudSQLInstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTest.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTest.java new file mode 100644 index 00000000..677f359e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTest.java @@ -0,0 +1,3541 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * A Connectivity Test for a network reachability analysis.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ConnectivityTest} + */ +public final class ConnectivityTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.ConnectivityTest) + ConnectivityTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectivityTest.newBuilder() to construct. + private ConnectivityTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectivityTest() { + name_ = ""; + description_ = ""; + protocol_ = ""; + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectivityTest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.class, + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 3; + private com.google.events.cloud.networkmanagement.v1.Endpoint source_; + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return The source. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint getSource() { + return source_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder() { + return source_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } + + public static final int DESTINATION_FIELD_NUMBER = 4; + private com.google.events.cloud.networkmanagement.v1.Endpoint destination_; + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return destination_ != null; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return The destination. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint getDestination() { + return destination_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder getDestinationOrBuilder() { + return destination_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocol_ = ""; + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_PROJECTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList relatedProjects_; + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_; + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int REACHABILITY_DETAILS_FIELD_NUMBER = 12; + private com.google.events.cloud.networkmanagement.v1.ReachabilityDetails reachabilityDetails_; + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return Whether the reachabilityDetails field is set. + */ + @java.lang.Override + public boolean hasReachabilityDetails() { + return reachabilityDetails_ != null; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return The reachabilityDetails. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails getReachabilityDetails() { + return reachabilityDetails_ == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + return reachabilityDetails_ == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (source_ != null) { + output.writeMessage(3, getSource()); + } + if (destination_ != null) { + output.writeMessage(4, getDestination()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + for (int i = 0; i < relatedProjects_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relatedProjects_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + output.writeMessage(12, getReachabilityDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSource()); + } + if (destination_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDestination()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + { + int dataSize = 0; + for (int i = 0; i < relatedProjects_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedProjects_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedProjectsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, getReachabilityDetails()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.ConnectivityTest)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.ConnectivityTest other = + (com.google.events.cloud.networkmanagement.v1.ConnectivityTest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) return false; + } + if (!getProtocol().equals(other.getProtocol())) return false; + if (!getRelatedProjectsList().equals(other.getRelatedProjectsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasReachabilityDetails() != other.hasReachabilityDetails()) return false; + if (hasReachabilityDetails()) { + if (!getReachabilityDetails().equals(other.getReachabilityDetails())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + } + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + if (getRelatedProjectsCount() > 0) { + hash = (37 * hash) + RELATED_PROJECTS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedProjectsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasReachabilityDetails()) { + hash = (37 * hash) + REACHABILITY_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getReachabilityDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Connectivity Test for a network reachability analysis.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ConnectivityTest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.ConnectivityTest) + com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.class, + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.ConnectivityTest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + protocol_ = ""; + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + displayName_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + reachabilityDetails_ = null; + if (reachabilityDetailsBuilder_ != null) { + reachabilityDetailsBuilder_.dispose(); + reachabilityDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest build() { + com.google.events.cloud.networkmanagement.v1.ConnectivityTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest buildPartial() { + com.google.events.cloud.networkmanagement.v1.ConnectivityTest result = + new com.google.events.cloud.networkmanagement.v1.ConnectivityTest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest result) { + if (((bitField0_ & 0x00000020) != 0)) { + relatedProjects_ = relatedProjects_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.relatedProjects_ = relatedProjects_; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.destination_ = + destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.reachabilityDetails_ = + reachabilityDetailsBuilder_ == null + ? reachabilityDetails_ + : reachabilityDetailsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.ConnectivityTest) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.ConnectivityTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.ConnectivityTest other) { + if (other + == com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.relatedProjects_.isEmpty()) { + if (relatedProjects_.isEmpty()) { + relatedProjects_ = other.relatedProjects_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureRelatedProjectsIsMutable(); + relatedProjects_.addAll(other.relatedProjects_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000040; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000080; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasReachabilityDetails()) { + mergeReachabilityDetails(other.getReachabilityDetails()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getDestinationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(s); + break; + } // case 50 + case 58: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 82: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + input.readMessage( + getReachabilityDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.events.cloud.networkmanagement.v1.Endpoint source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return The source. + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public Builder setSource(com.google.events.cloud.networkmanagement.v1.Endpoint value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public Builder setSource( + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public Builder mergeSource(com.google.events.cloud.networkmanagement.v1.Endpoint value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && source_ != null + && source_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000004); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.Builder getSourceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + public com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.events.cloud.networkmanagement.v1.Endpoint destination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder> + destinationBuilder_; + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return The destination. + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public Builder setDestination(com.google.events.cloud.networkmanagement.v1.Endpoint value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + } else { + destinationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public Builder setDestination( + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public Builder mergeDestination(com.google.events.cloud.networkmanagement.v1.Endpoint value) { + if (destinationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && destination_ != null + && destination_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance()) { + getDestinationBuilder().mergeFrom(value); + } else { + destination_ = value; + } + } else { + destinationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public Builder clearDestination() { + bitField0_ = (bitField0_ & ~0x00000008); + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.Builder getDestinationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + public com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder + getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder> + getDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocol_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocol_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList relatedProjects_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelatedProjectsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + relatedProjects_ = new com.google.protobuf.LazyStringArrayList(relatedProjects_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_.getUnmodifiableView(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index to set the value at. + * @param value The relatedProjects to set. + * @return This builder for chaining. + */ + public Builder setRelatedProjects(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjects(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param values The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedProjects(java.lang.Iterable values) { + ensureRelatedProjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedProjects_); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelatedProjects() { + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The bytes of the relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjectsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000080; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.events.cloud.networkmanagement.v1.ReachabilityDetails reachabilityDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder> + reachabilityDetailsBuilder_; + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return Whether the reachabilityDetails field is set. + */ + public boolean hasReachabilityDetails() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return The reachabilityDetails. + */ + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + getReachabilityDetails() { + if (reachabilityDetailsBuilder_ == null) { + return reachabilityDetails_ == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } else { + return reachabilityDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public Builder setReachabilityDetails( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reachabilityDetails_ = value; + } else { + reachabilityDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public Builder setReachabilityDetails( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder builderForValue) { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = builderForValue.build(); + } else { + reachabilityDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public Builder mergeReachabilityDetails( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && reachabilityDetails_ != null + && reachabilityDetails_ + != com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + .getDefaultInstance()) { + getReachabilityDetailsBuilder().mergeFrom(value); + } else { + reachabilityDetails_ = value; + } + } else { + reachabilityDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public Builder clearReachabilityDetails() { + bitField0_ = (bitField0_ & ~0x00000400); + reachabilityDetails_ = null; + if (reachabilityDetailsBuilder_ != null) { + reachabilityDetailsBuilder_.dispose(); + reachabilityDetailsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder + getReachabilityDetailsBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getReachabilityDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + if (reachabilityDetailsBuilder_ != null) { + return reachabilityDetailsBuilder_.getMessageOrBuilder(); + } else { + return reachabilityDetails_ == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder> + getReachabilityDetailsFieldBuilder() { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder>( + getReachabilityDetails(), getParentForChildren(), isClean()); + reachabilityDetails_ = null; + } + return reachabilityDetailsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.ConnectivityTest) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.ConnectivityTest) + private static final com.google.events.cloud.networkmanagement.v1.ConnectivityTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.ConnectivityTest(); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectivityTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventData.java new file mode 100644 index 00000000..b7e8033d --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventData.java @@ -0,0 +1,743 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * The data within all ConnectivityTest events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ConnectivityTestEventData} + */ +public final class ConnectivityTestEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) + ConnectivityTestEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectivityTestEventData.newBuilder() to construct. + private ConnectivityTestEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectivityTestEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectivityTestEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData.class, + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.networkmanagement.v1.ConnectivityTest payload_; + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest getPayload() { + return payload_ == null + ? com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder + getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData other = + (com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData 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 data within all ConnectivityTest events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ConnectivityTestEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData.class, + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData.Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData build() { + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData buildPartial() { + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData result = + new com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) { + return mergeFrom( + (com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData other) { + if (other + == com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + .getDefaultInstance()) return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.networkmanagement.v1.ConnectivityTest payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ConnectivityTest, + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public Builder setPayload(com.google.events.cloud.networkmanagement.v1.ConnectivityTest value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public Builder mergePayload( + com.google.events.cloud.networkmanagement.v1.ConnectivityTest value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ + != com.google.events.cloud.networkmanagement.v1.ConnectivityTest + .getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder + getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder + getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The ConnectivityTest event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ConnectivityTest, + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ConnectivityTest, + com.google.events.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) + private static final com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData(); + } + + public static com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectivityTestEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ConnectivityTestEventData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataOrBuilder.java new file mode 100644 index 00000000..6e8473e4 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface ConnectivityTestEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.ConnectivityTestEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.networkmanagement.v1.ConnectivityTest getPayload(); + /** + * + * + *
+   * Optional. The ConnectivityTest event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.networkmanagement.v1.ConnectivityTest payload = 1; + */ + com.google.events.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java new file mode 100644 index 00000000..84e4f3e0 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java @@ -0,0 +1,514 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface ConnectivityTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.ConnectivityTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + * + * @return The source. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint getSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint source = 3; + */ + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + * + * @return The destination. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint getDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint destination = 4; + */ + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + java.util.List getRelatedProjectsList(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + int getRelatedProjectsCount(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + java.lang.String getRelatedProjects(int index); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + com.google.protobuf.ByteString getRelatedProjectsBytes(int index); + + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return Whether the reachabilityDetails field is set. + */ + boolean hasReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + * + * @return The reachabilityDetails. + */ + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails getReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12; + * + */ + com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Data.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Data.java new file mode 100644 index 00000000..e1061660 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Data.java @@ -0,0 +1,827 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public final class Data { + private Data() {} + + 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_events_cloud_networkmanagement_v1_Trace_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Trace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_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/events/cloud/networkmanagement/" + + "v1/data.proto\022(google.events.cloud.netwo" + + "rkmanagement.v1\032\037google/protobuf/timesta" + + "mp.proto\032\027google/rpc/status.proto\"\225\001\n\005Tr" + + "ace\022M\n\rendpoint_info\030\001 \001(\01326.google.even" + + "ts.cloud.networkmanagement.v1.EndpointIn" + + "fo\022=\n\005steps\030\002 \003(\0132..google.events.cloud." + + "networkmanagement.v1.Step\"\276\023\n\004Step\022\023\n\013de" + + "scription\030\001 \001(\t\022C\n\005state\030\002 \001(\01624.google." + + "events.cloud.networkmanagement.v1.Step.S" + + "tate\022\023\n\013causes_drop\030\003 \001(\010\022\022\n\nproject_id\030" + + "\004 \001(\t\022J\n\010instance\030\005 \001(\01326.google.events." + + "cloud.networkmanagement.v1.InstanceInfoH" + + "\000\022J\n\010firewall\030\006 \001(\01326.google.events.clou" + + "d.networkmanagement.v1.FirewallInfoH\000\022D\n" + + "\005route\030\007 \001(\01323.google.events.cloud.netwo" + + "rkmanagement.v1.RouteInfoH\000\022J\n\010endpoint\030" + + "\010 \001(\01326.google.events.cloud.networkmanag" + + "ement.v1.EndpointInfoH\000\022U\n\016google_servic" + + "e\030\030 \001(\0132;.google.events.cloud.networkman" + + "agement.v1.GoogleServiceInfoH\000\022W\n\017forwar" + + "ding_rule\030\t \001(\0132<.google.events.cloud.ne" + + "tworkmanagement.v1.ForwardingRuleInfoH\000\022" + + "O\n\013vpn_gateway\030\n \001(\01328.google.events.clo" + + "ud.networkmanagement.v1.VpnGatewayInfoH\000" + + "\022M\n\nvpn_tunnel\030\013 \001(\01327.google.events.clo" + + "ud.networkmanagement.v1.VpnTunnelInfoH\000\022" + + "S\n\rvpc_connector\030\025 \001(\0132:.google.events.c" + + "loud.networkmanagement.v1.VpcConnectorIn" + + "foH\000\022H\n\007deliver\030\014 \001(\01325.google.events.cl" + + "oud.networkmanagement.v1.DeliverInfoH\000\022H" + + "\n\007forward\030\r \001(\01325.google.events.cloud.ne" + + "tworkmanagement.v1.ForwardInfoH\000\022D\n\005abor" + + "t\030\016 \001(\01323.google.events.cloud.networkman" + + "agement.v1.AbortInfoH\000\022B\n\004drop\030\017 \001(\01322.g" + + "oogle.events.cloud.networkmanagement.v1." + + "DropInfoH\000\022S\n\rload_balancer\030\020 \001(\0132:.goog" + + "le.events.cloud.networkmanagement.v1.Loa" + + "dBalancerInfoH\000\022H\n\007network\030\021 \001(\01325.googl" + + "e.events.cloud.networkmanagement.v1.Netw" + + "orkInfoH\000\022M\n\ngke_master\030\022 \001(\01327.google.e" + + "vents.cloud.networkmanagement.v1.GKEMast" + + "erInfoH\000\022\\\n\022cloud_sql_instance\030\023 \001(\0132>.g" + + "oogle.events.cloud.networkmanagement.v1." + + "CloudSQLInstanceInfoH\000\022U\n\016cloud_function" + + "\030\024 \001(\0132;.google.events.cloud.networkmana" + + "gement.v1.CloudFunctionInfoH\000\022\\\n\022app_eng" + + "ine_version\030\026 \001(\0132>.google.events.cloud." + + "networkmanagement.v1.AppEngineVersionInf" + + "oH\000\022\\\n\022cloud_run_revision\030\027 \001(\0132>.google" + + ".events.cloud.networkmanagement.v1.Cloud" + + "RunRevisionInfoH\000\"\331\005\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\027\n\023START_FROM_INSTANCE\020\001\022\027\n\023S" + + "TART_FROM_INTERNET\020\002\022\035\n\031START_FROM_GOOGL" + + "E_SERVICE\020\033\022\036\n\032START_FROM_PRIVATE_NETWOR" + + "K\020\003\022\031\n\025START_FROM_GKE_MASTER\020\025\022!\n\035START_" + + "FROM_CLOUD_SQL_INSTANCE\020\026\022\035\n\031START_FROM_" + + "CLOUD_FUNCTION\020\027\022!\n\035START_FROM_APP_ENGIN" + + "E_VERSION\020\031\022!\n\035START_FROM_CLOUD_RUN_REVI" + + "SION\020\032\022\037\n\033APPLY_INGRESS_FIREWALL_RULE\020\004\022" + + "\036\n\032APPLY_EGRESS_FIREWALL_RULE\020\005\022\017\n\013APPLY" + + "_ROUTE\020\006\022\031\n\025APPLY_FORWARDING_RULE\020\007\022\025\n\021S" + + "POOFING_APPROVED\020\010\022\026\n\022ARRIVE_AT_INSTANCE" + + "\020\t\022$\n ARRIVE_AT_INTERNAL_LOAD_BALANCER\020\n" + + "\022$\n ARRIVE_AT_EXTERNAL_LOAD_BALANCER\020\013\022\031" + + "\n\025ARRIVE_AT_VPN_GATEWAY\020\014\022\030\n\024ARRIVE_AT_V" + + "PN_TUNNEL\020\r\022\033\n\027ARRIVE_AT_VPC_CONNECTOR\020\030" + + "\022\007\n\003NAT\020\016\022\024\n\020PROXY_CONNECTION\020\017\022\013\n\007DELIV" + + "ER\020\020\022\010\n\004DROP\020\021\022\013\n\007FORWARD\020\022\022\t\n\005ABORT\020\023\022\035" + + "\n\031VIEWER_PERMISSION_MISSING\020\024B\013\n\tstep_in" + + "fo\"\262\001\n\014InstanceInfo\022\024\n\014display_name\030\001 \001(" + + "\t\022\013\n\003uri\030\002 \001(\t\022\021\n\tinterface\030\003 \001(\t\022\023\n\013net" + + "work_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t\022\023\n\013e" + + "xternal_ip\030\006 \001(\t\022\024\n\014network_tags\030\007 \003(\t\022\027" + + "\n\017service_account\030\010 \001(\t\"J\n\013NetworkInfo\022\024" + + "\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\030\n\020mat" + + "ched_ip_range\030\004 \001(\t\"\217\004\n\014FirewallInfo\022\024\n\014" + + "display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\021\n\tdirec" + + "tion\030\003 \001(\t\022\016\n\006action\030\004 \001(\t\022\020\n\010priority\030\005" + + " \001(\005\022\023\n\013network_uri\030\006 \001(\t\022\023\n\013target_tags" + + "\030\007 \003(\t\022\037\n\027target_service_accounts\030\010 \003(\t\022" + + "\016\n\006policy\030\t \001(\t\022c\n\022firewall_rule_type\030\n " + + "\001(\0162G.google.events.cloud.networkmanagem" + + "ent.v1.FirewallInfo.FirewallRuleType\"\346\001\n" + + "\020FirewallRuleType\022\"\n\036FIREWALL_RULE_TYPE_" + + "UNSPECIFIED\020\000\022%\n!HIERARCHICAL_FIREWALL_P" + + "OLICY_RULE\020\001\022\025\n\021VPC_FIREWALL_RULE\020\002\022\035\n\031I" + + "MPLIED_VPC_FIREWALL_RULE\020\003\022/\n+SERVERLESS" + + "_VPC_ACCESS_MANAGED_FIREWALL_RULE\020\004\022 \n\034N" + + "ETWORK_FIREWALL_POLICY_RULE\020\005\"\363\006\n\tRouteI" + + "nfo\022Q\n\nroute_type\030\010 \001(\0162=.google.events." + + "cloud.networkmanagement.v1.RouteInfo.Rou" + + "teType\022V\n\rnext_hop_type\030\t \001(\0162?.google.e" + + "vents.cloud.networkmanagement.v1.RouteIn" + + "fo.NextHopType\022\024\n\014display_name\030\001 \001(\t\022\013\n\003" + + "uri\030\002 \001(\t\022\025\n\rdest_ip_range\030\003 \001(\t\022\020\n\010next" + + "_hop\030\004 \001(\t\022\023\n\013network_uri\030\005 \001(\t\022\020\n\010prior" + + "ity\030\006 \001(\005\022\025\n\rinstance_tags\030\007 \003(\t\022\024\n\014src_" + + "ip_range\030\n \001(\t\022\030\n\020dest_port_ranges\030\013 \003(\t" + + "\022\027\n\017src_port_ranges\030\014 \003(\t\022\021\n\tprotocols\030\r" + + " \003(\t\"\233\001\n\tRouteType\022\032\n\026ROUTE_TYPE_UNSPECI" + + "FIED\020\000\022\n\n\006SUBNET\020\001\022\n\n\006STATIC\020\002\022\013\n\007DYNAMI" + + "C\020\003\022\022\n\016PEERING_SUBNET\020\004\022\022\n\016PEERING_STATI" + + "C\020\005\022\023\n\017PEERING_DYNAMIC\020\006\022\020\n\014POLICY_BASED" + + "\020\007\"\266\002\n\013NextHopType\022\035\n\031NEXT_HOP_TYPE_UNSP" + + "ECIFIED\020\000\022\017\n\013NEXT_HOP_IP\020\001\022\025\n\021NEXT_HOP_I" + + "NSTANCE\020\002\022\024\n\020NEXT_HOP_NETWORK\020\003\022\024\n\020NEXT_" + + "HOP_PEERING\020\004\022\031\n\025NEXT_HOP_INTERCONNECT\020\005" + + "\022\027\n\023NEXT_HOP_VPN_TUNNEL\020\006\022\030\n\024NEXT_HOP_VP" + + "N_GATEWAY\020\007\022\035\n\031NEXT_HOP_INTERNET_GATEWAY" + + "\020\010\022\026\n\022NEXT_HOP_BLACKHOLE\020\t\022\020\n\014NEXT_HOP_I" + + "LB\020\n\022\035\n\031NEXT_HOP_ROUTER_APPLIANCE\020\013\"\212\002\n\021" + + "GoogleServiceInfo\022\021\n\tsource_ip\030\001 \001(\t\022j\n\023" + + "google_service_type\030\002 \001(\0162M.google.event" + + "s.cloud.networkmanagement.v1.GoogleServi" + + "ceInfo.GoogleServiceType\"v\n\021GoogleServic" + + "eType\022#\n\037GOOGLE_SERVICE_TYPE_UNSPECIFIED" + + "\020\000\022\007\n\003IAP\020\001\022$\n GFE_PROXY_OR_HEALTH_CHECK" + + "_PROBER\020\002\022\r\n\tCLOUD_DNS\020\003\"\237\001\n\022ForwardingR" + + "uleInfo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001" + + "(\t\022\030\n\020matched_protocol\030\003 \001(\t\022\032\n\022matched_" + + "port_range\030\006 \001(\t\022\013\n\003vip\030\004 \001(\t\022\016\n\006target\030" + + "\005 \001(\t\022\023\n\013network_uri\030\007 \001(\t\"\323\004\n\020LoadBalan" + + "cerInfo\022g\n\022load_balancer_type\030\001 \001(\0162K.go" + + "ogle.events.cloud.networkmanagement.v1.L" + + "oadBalancerInfo.LoadBalancerType\022\030\n\020heal" + + "th_check_uri\030\002 \001(\t\022O\n\010backends\030\003 \003(\0132=.g" + + "oogle.events.cloud.networkmanagement.v1." + + "LoadBalancerBackend\022\\\n\014backend_type\030\004 \001(" + + "\0162F.google.events.cloud.networkmanagemen" + + "t.v1.LoadBalancerInfo.BackendType\022\023\n\013bac" + + "kend_uri\030\005 \001(\t\"\217\001\n\020LoadBalancerType\022\"\n\036L" + + "OAD_BALANCER_TYPE_UNSPECIFIED\020\000\022\024\n\020INTER" + + "NAL_TCP_UDP\020\001\022\023\n\017NETWORK_TCP_UDP\020\002\022\016\n\nHT" + + "TP_PROXY\020\003\022\r\n\tTCP_PROXY\020\004\022\r\n\tSSL_PROXY\020\005" + + "\"f\n\013BackendType\022\034\n\030BACKEND_TYPE_UNSPECIF" + + "IED\020\000\022\023\n\017BACKEND_SERVICE\020\001\022\017\n\013TARGET_POO" + + "L\020\002\022\023\n\017TARGET_INSTANCE\020\003\"\375\002\n\023LoadBalance" + + "rBackend\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 " + + "\001(\t\022{\n\033health_check_firewall_state\030\003 \001(\016" + + "2V.google.events.cloud.networkmanagement" + + ".v1.LoadBalancerBackend.HealthCheckFirew" + + "allState\022,\n$health_check_allowing_firewa" + + "ll_rules\030\004 \003(\t\022,\n$health_check_blocking_" + + "firewall_rules\030\005 \003(\t\"j\n\030HealthCheckFirew" + + "allState\022+\n\'HEALTH_CHECK_FIREWALL_STATE_" + + "UNSPECIFIED\020\000\022\016\n\nCONFIGURED\020\001\022\021\n\rMISCONF" + + "IGURED\020\002\"\204\001\n\016VpnGatewayInfo\022\024\n\014display_n" + + "ame\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\023\n\013network_uri\030\003 " + + "\001(\t\022\022\n\nip_address\030\004 \001(\t\022\026\n\016vpn_tunnel_ur" + + "i\030\005 \001(\t\022\016\n\006region\030\006 \001(\t\"\365\002\n\rVpnTunnelInf" + + "o\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\026\n\016" + + "source_gateway\030\003 \001(\t\022\026\n\016remote_gateway\030\004" + + " \001(\t\022\031\n\021remote_gateway_ip\030\005 \001(\t\022\031\n\021sourc" + + "e_gateway_ip\030\006 \001(\t\022\023\n\013network_uri\030\007 \001(\t\022" + + "\016\n\006region\030\010 \001(\t\022Y\n\014routing_type\030\t \001(\0162C." + + "google.events.cloud.networkmanagement.v1" + + ".VpnTunnelInfo.RoutingType\"[\n\013RoutingTyp" + + "e\022\034\n\030ROUTING_TYPE_UNSPECIFIED\020\000\022\017\n\013ROUTE" + + "_BASED\020\001\022\020\n\014POLICY_BASED\020\002\022\013\n\007DYNAMIC\020\003\"" + + "\267\001\n\014EndpointInfo\022\021\n\tsource_ip\030\001 \001(\t\022\026\n\016d" + + "estination_ip\030\002 \001(\t\022\020\n\010protocol\030\003 \001(\t\022\023\n" + + "\013source_port\030\004 \001(\005\022\030\n\020destination_port\030\005" + + " \001(\005\022\032\n\022source_network_uri\030\006 \001(\t\022\037\n\027dest" + + "ination_network_uri\030\007 \001(\t\"\247\002\n\013DeliverInf" + + "o\022L\n\006target\030\001 \001(\0162<.google.events.cloud." + + "networkmanagement.v1.DeliverInfo.Target\022" + + "\024\n\014resource_uri\030\002 \001(\t\"\263\001\n\006Target\022\026\n\022TARG" + + "ET_UNSPECIFIED\020\000\022\014\n\010INSTANCE\020\001\022\014\n\010INTERN" + + "ET\020\002\022\016\n\nGOOGLE_API\020\003\022\016\n\nGKE_MASTER\020\004\022\026\n\022" + + "CLOUD_SQL_INSTANCE\020\005\022\031\n\025PSC_PUBLISHED_SE" + + "RVICE\020\006\022\022\n\016PSC_GOOGLE_API\020\007\022\016\n\nPSC_VPC_S" + + "C\020\010\"\251\002\n\013ForwardInfo\022L\n\006target\030\001 \001(\0162<.go" + + "ogle.events.cloud.networkmanagement.v1.F" + + "orwardInfo.Target\022\024\n\014resource_uri\030\002 \001(\t\"" + + "\265\001\n\006Target\022\026\n\022TARGET_UNSPECIFIED\020\000\022\017\n\013PE" + + "ERING_VPC\020\001\022\017\n\013VPN_GATEWAY\020\002\022\020\n\014INTERCON" + + "NECT\020\003\022\016\n\nGKE_MASTER\020\004\022\"\n\036IMPORTED_CUSTO" + + "M_ROUTE_NEXT_HOP\020\005\022\026\n\022CLOUD_SQL_INSTANCE" + + "\020\006\022\023\n\017ANOTHER_PROJECT\020\007\"\201\005\n\tAbortInfo\022H\n" + + "\005cause\030\001 \001(\01629.google.events.cloud.netwo" + + "rkmanagement.v1.AbortInfo.Cause\022\024\n\014resou" + + "rce_uri\030\002 \001(\t\022#\n\033projects_missing_permis" + + "sion\030\003 \003(\t\"\356\003\n\005Cause\022\025\n\021CAUSE_UNSPECIFIE" + + "D\020\000\022\023\n\017UNKNOWN_NETWORK\020\001\022\016\n\nUNKNOWN_IP\020\002" + + "\022\023\n\017UNKNOWN_PROJECT\020\003\022\025\n\021PERMISSION_DENI" + + "ED\020\004\022\026\n\022NO_SOURCE_LOCATION\020\005\022\024\n\020INVALID_" + + "ARGUMENT\020\006\022\022\n\016NO_EXTERNAL_IP\020\007\022\032\n\026UNINTE" + + "NDED_DESTINATION\020\010\022\022\n\016TRACE_TOO_LONG\020\t\022\022" + + "\n\016INTERNAL_ERROR\020\n\022\035\n\031SOURCE_ENDPOINT_NO" + + "T_FOUND\020\013\022\035\n\031MISMATCHED_SOURCE_NETWORK\020\014" + + "\022\"\n\036DESTINATION_ENDPOINT_NOT_FOUND\020\r\022\"\n\036" + + "MISMATCHED_DESTINATION_NETWORK\020\016\022\017\n\013UNSU" + + "PPORTED\020\017\022\031\n\025MISMATCHED_IP_VERSION\020\020\022&\n\"" + + "GKE_KONNECTIVITY_PROXY_UNSUPPORTED\020\021\022\035\n\031" + + "RESOURCE_CONFIG_NOT_FOUND\020\022\"\314\013\n\010DropInfo" + + "\022G\n\005cause\030\001 \001(\01628.google.events.cloud.ne" + + "tworkmanagement.v1.DropInfo.Cause\022\024\n\014res" + + "ource_uri\030\002 \001(\t\"\340\n\n\005Cause\022\025\n\021CAUSE_UNSPE" + + "CIFIED\020\000\022\034\n\030UNKNOWN_EXTERNAL_ADDRESS\020\001\022\031" + + "\n\025FOREIGN_IP_DISALLOWED\020\002\022\021\n\rFIREWALL_RU" + + "LE\020\003\022\014\n\010NO_ROUTE\020\004\022\023\n\017ROUTE_BLACKHOLE\020\005\022" + + "\027\n\023ROUTE_WRONG_NETWORK\020\006\022\037\n\033PRIVATE_TRAF" + + "FIC_TO_INTERNET\020\007\022$\n PRIVATE_GOOGLE_ACCE" + + "SS_DISALLOWED\020\010\022\027\n\023NO_EXTERNAL_ADDRESS\020\t" + + "\022\034\n\030UNKNOWN_INTERNAL_ADDRESS\020\n\022\034\n\030FORWAR" + + "DING_RULE_MISMATCH\020\013\022#\n\037FORWARDING_RULE_" + + "REGION_MISMATCH\020\031\022 \n\034FORWARDING_RULE_NO_" + + "INSTANCES\020\014\0228\n4FIREWALL_BLOCKING_LOAD_BA" + + "LANCER_BACKEND_HEALTH_CHECK\020\r\022\030\n\024INSTANC" + + "E_NOT_RUNNING\020\016\022\033\n\027GKE_CLUSTER_NOT_RUNNI" + + "NG\020\033\022\"\n\036CLOUD_SQL_INSTANCE_NOT_RUNNING\020\034" + + "\022\030\n\024TRAFFIC_TYPE_BLOCKED\020\017\022\"\n\036GKE_MASTER" + + "_UNAUTHORIZED_ACCESS\020\020\022*\n&CLOUD_SQL_INST" + + "ANCE_UNAUTHORIZED_ACCESS\020\021\022\036\n\032DROPPED_IN" + + "SIDE_GKE_SERVICE\020\022\022$\n DROPPED_INSIDE_CLO" + + "UD_SQL_SERVICE\020\023\022%\n!GOOGLE_MANAGED_SERVI" + + "CE_NO_PEERING\020\024\022*\n&GOOGLE_MANAGED_SERVIC" + + "E_NO_PSC_ENDPOINT\020&\022\034\n\030GKE_PSC_ENDPOINT_" + + "MISSING\020$\022$\n CLOUD_SQL_INSTANCE_NO_IP_AD" + + "DRESS\020\025\022%\n!GKE_CONTROL_PLANE_REGION_MISM" + + "ATCH\020\036\0223\n/PUBLIC_GKE_CONTROL_PLANE_TO_PR" + + "IVATE_DESTINATION\020\037\022\036\n\032GKE_CONTROL_PLANE" + + "_NO_ROUTE\020 \022:\n6CLOUD_SQL_INSTANCE_NOT_CO" + + "NFIGURED_FOR_EXTERNAL_TRAFFIC\020!\0224\n0PUBLI" + + "C_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINAT" + + "ION\020\"\022\037\n\033CLOUD_SQL_INSTANCE_NO_ROUTE\020#\022\035" + + "\n\031CLOUD_FUNCTION_NOT_ACTIVE\020\026\022\031\n\025VPC_CON" + + "NECTOR_NOT_SET\020\027\022\035\n\031VPC_CONNECTOR_NOT_RU" + + "NNING\020\030\022\037\n\033PSC_CONNECTION_NOT_ACCEPTED\020\032" + + "\022 \n\034CLOUD_RUN_REVISION_NOT_READY\020\035\022\'\n#DR" + + "OPPED_INSIDE_PSC_SERVICE_PRODUCER\020%\022%\n!L" + + "OAD_BALANCER_HAS_NO_PROXY_SUBNET\020\'\"k\n\rGK" + + "EMasterInfo\022\023\n\013cluster_uri\030\002 \001(\t\022\033\n\023clus" + + "ter_network_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001" + + "(\t\022\023\n\013external_ip\030\006 \001(\t\"\210\001\n\024CloudSQLInst" + + "anceInfo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 " + + "\001(\t\022\023\n\013network_uri\030\004 \001(\t\022\023\n\013internal_ip\030" + + "\005 \001(\t\022\023\n\013external_ip\030\006 \001(\t\022\016\n\006region\030\007 \001" + + "(\t\"\\\n\021CloudFunctionInfo\022\024\n\014display_name\030" + + "\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010location\030\003 \001(\t\022\022\n\n" + + "version_id\030\004 \001(\003\"`\n\024CloudRunRevisionInfo" + + "\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010l" + + "ocation\030\004 \001(\t\022\023\n\013service_uri\030\005 \001(\t\"_\n\024Ap" + + "pEngineVersionInfo\022\024\n\014display_name\030\001 \001(\t" + + "\022\013\n\003uri\030\002 \001(\t\022\017\n\007runtime\030\003 \001(\t\022\023\n\013enviro" + + "nment\030\004 \001(\t\"G\n\020VpcConnectorInfo\022\024\n\014displ" + + "ay_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010location\030\003" + + " \001(\t\"\312\004\n\020ConnectivityTest\022\014\n\004name\030\001 \001(\t\022" + + "\023\n\013description\030\002 \001(\t\022B\n\006source\030\003 \001(\01322.g" + + "oogle.events.cloud.networkmanagement.v1." + + "Endpoint\022G\n\013destination\030\004 \001(\01322.google.e" + + "vents.cloud.networkmanagement.v1.Endpoin" + + "t\022\020\n\010protocol\030\005 \001(\t\022\030\n\020related_projects\030" + + "\006 \003(\t\022\024\n\014display_name\030\007 \001(\t\022V\n\006labels\030\010 " + + "\003(\0132F.google.events.cloud.networkmanagem" + + "ent.v1.ConnectivityTest.LabelsEntry\022/\n\013c" + + "reate_time\030\n \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\013 \001(\0132\032.google.proto" + + "buf.Timestamp\022[\n\024reachability_details\030\014 " + + "\001(\0132=.google.events.cloud.networkmanagem" + + "ent.v1.ReachabilityDetails\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\360\005\n\010En" + + "dpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030\002 \001(\005" + + "\022\020\n\010instance\030\003 \001(\t\022\032\n\022gke_master_cluster" + + "\030\007 \001(\t\022\032\n\022cloud_sql_instance\030\010 \001(\t\022`\n\016cl" + + "oud_function\030\n \001(\0132H.google.events.cloud" + + ".networkmanagement.v1.Endpoint.CloudFunc" + + "tionEndpoint\022g\n\022app_engine_version\030\013 \001(\013" + + "2K.google.events.cloud.networkmanagement" + + ".v1.Endpoint.AppEngineVersionEndpoint\022g\n" + + "\022cloud_run_revision\030\014 \001(\0132K.google.event" + + "s.cloud.networkmanagement.v1.Endpoint.Cl" + + "oudRunRevisionEndpoint\022\017\n\007network\030\004 \001(\t\022" + + "T\n\014network_type\030\005 \001(\0162>.google.events.cl" + + "oud.networkmanagement.v1.Endpoint.Networ" + + "kType\022\022\n\nproject_id\030\006 \001(\t\032$\n\025CloudFuncti" + + "onEndpoint\022\013\n\003uri\030\001 \001(\t\032\'\n\030AppEngineVers" + + "ionEndpoint\022\013\n\003uri\030\001 \001(\t\032\'\n\030CloudRunRevi" + + "sionEndpoint\022\013\n\003uri\030\001 \001(\t\"Q\n\013NetworkType" + + "\022\034\n\030NETWORK_TYPE_UNSPECIFIED\020\000\022\017\n\013GCP_NE" + + "TWORK\020\001\022\023\n\017NON_GCP_NETWORK\020\002\"\343\002\n\023Reachab" + + "ilityDetails\022T\n\006result\030\001 \001(\0162D.google.ev" + + "ents.cloud.networkmanagement.v1.Reachabi" + + "lityDetails.Result\022/\n\013verify_time\030\002 \001(\0132" + + "\032.google.protobuf.Timestamp\022!\n\005error\030\003 \001" + + "(\0132\022.google.rpc.Status\022?\n\006traces\030\005 \003(\0132/" + + ".google.events.cloud.networkmanagement.v" + + "1.Trace\"a\n\006Result\022\026\n\022RESULT_UNSPECIFIED\020" + + "\000\022\r\n\tREACHABLE\020\001\022\017\n\013UNREACHABLE\020\002\022\r\n\tAMB" + + "IGUOUS\020\004\022\020\n\014UNDETERMINED\020\005\"y\n\031Connectivi" + + "tyTestEventData\022P\n\007payload\030\001 \001(\0132:.googl" + + "e.events.cloud.networkmanagement.v1.Conn" + + "ectivityTestH\000\210\001\001B\n\n\010_payloadB\276\001\n,com.go" + + "ogle.events.cloud.networkmanagement.v1P\001" + + "\252\0021Google.Events.Protobuf.Cloud.NetworkM" + + "anagement.V1\312\002(Google\\Events\\Cloud\\Netwo" + + "rkManagement\\V1\352\002,Google::Events::Cloud:" + + ":NetworkManagement::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_events_cloud_networkmanagement_v1_Trace_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_networkmanagement_v1_Trace_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Trace_descriptor, + new java.lang.String[] { + "EndpointInfo", "Steps", + }); + internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_networkmanagement_v1_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor, + new java.lang.String[] { + "Description", + "State", + "CausesDrop", + "ProjectId", + "Instance", + "Firewall", + "Route", + "Endpoint", + "GoogleService", + "ForwardingRule", + "VpnGateway", + "VpnTunnel", + "VpcConnector", + "Deliver", + "Forward", + "Abort", + "Drop", + "LoadBalancer", + "Network", + "GkeMaster", + "CloudSqlInstance", + "CloudFunction", + "AppEngineVersion", + "CloudRunRevision", + "StepInfo", + }); + internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Interface", + "NetworkUri", + "InternalIp", + "ExternalIp", + "NetworkTags", + "ServiceAccount", + }); + internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "MatchedIpRange", + }); + internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Direction", + "Action", + "Priority", + "NetworkUri", + "TargetTags", + "TargetServiceAccounts", + "Policy", + "FirewallRuleType", + }); + internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor, + new java.lang.String[] { + "RouteType", + "NextHopType", + "DisplayName", + "Uri", + "DestIpRange", + "NextHop", + "NetworkUri", + "Priority", + "InstanceTags", + "SrcIpRange", + "DestPortRanges", + "SrcPortRanges", + "Protocols", + }); + internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor, + new java.lang.String[] { + "SourceIp", "GoogleServiceType", + }); + internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "MatchedProtocol", + "MatchedPortRange", + "Vip", + "Target", + "NetworkUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor, + new java.lang.String[] { + "LoadBalancerType", "HealthCheckUri", "Backends", "BackendType", "BackendUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "HealthCheckFirewallState", + "HealthCheckAllowingFirewallRules", + "HealthCheckBlockingFirewallRules", + }); + internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "IpAddress", "VpnTunnelUri", "Region", + }); + internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "SourceGateway", + "RemoteGateway", + "RemoteGatewayIp", + "SourceGatewayIp", + "NetworkUri", + "Region", + "RoutingType", + }); + internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor, + new java.lang.String[] { + "SourceIp", + "DestinationIp", + "Protocol", + "SourcePort", + "DestinationPort", + "SourceNetworkUri", + "DestinationNetworkUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_AbortInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", "ProjectsMissingPermission", + }); + internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_events_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor, + new java.lang.String[] { + "ClusterUri", "ClusterNetworkUri", "InternalIp", "ExternalIp", + }); + internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "InternalIp", "ExternalIp", "Region", + }); + internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_CloudFunctionInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "Location", "VersionId", + }); + internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_CloudRunRevisionInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "Location", "ServiceUri", + }); + internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_AppEngineVersionInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "Runtime", "Environment", + }); + internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "Location", + }); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor, + new java.lang.String[] { + "Name", + "Description", + "Source", + "Destination", + "Protocol", + "RelatedProjects", + "DisplayName", + "Labels", + "CreateTime", + "UpdateTime", + "ReachabilityDetails", + }); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor = + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor, + new java.lang.String[] { + "IpAddress", + "Port", + "Instance", + "GkeMasterCluster", + "CloudSqlInstance", + "CloudFunction", + "AppEngineVersion", + "CloudRunRevision", + "Network", + "NetworkType", + "ProjectId", + }); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor = + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor, + new java.lang.String[] { + "Uri", + }); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor = + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor + .getNestedTypes() + .get(1); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor, + new java.lang.String[] { + "Uri", + }); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor = + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor + .getNestedTypes() + .get(2); + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor, + new java.lang.String[] { + "Uri", + }); + internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor, + new java.lang.String[] { + "Result", "VerifyTime", "Error", "Traces", + }); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_networkmanagement_v1_ConnectivityTestEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfo.java new file mode 100644 index 00000000..debd73da --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfo.java @@ -0,0 +1,1084 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "deliver" and associated resource.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.DeliverInfo} + */ +public final class DeliverInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.DeliverInfo) + DeliverInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliverInfo.newBuilder() to construct. + private DeliverInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliverInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliverInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.DeliverInfo.class, + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder.class); + } + + /** + * + * + *
+   * Deliver target types:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.DeliverInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + INSTANCE(1), + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + INTERNET(2), + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + GOOGLE_API(3), + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + CLOUD_SQL_INSTANCE(5), + /** + * + * + *
+     * Target is a published service that uses [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
+     * 
+ * + * PSC_PUBLISHED_SERVICE = 6; + */ + PSC_PUBLISHED_SERVICE(6), + /** + * + * + *
+     * Target is all Google APIs that use [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
+     * 
+ * + * PSC_GOOGLE_API = 7; + */ + PSC_GOOGLE_API(7), + /** + * + * + *
+     * Target is a VPC-SC that uses [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
+     * 
+ * + * PSC_VPC_SC = 8; + */ + PSC_VPC_SC(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + public static final int INSTANCE_VALUE = 1; + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + public static final int INTERNET_VALUE = 2; + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + public static final int GOOGLE_API_VALUE = 3; + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + public static final int CLOUD_SQL_INSTANCE_VALUE = 5; + /** + * + * + *
+     * Target is a published service that uses [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
+     * 
+ * + * PSC_PUBLISHED_SERVICE = 6; + */ + public static final int PSC_PUBLISHED_SERVICE_VALUE = 6; + /** + * + * + *
+     * Target is all Google APIs that use [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
+     * 
+ * + * PSC_GOOGLE_API = 7; + */ + public static final int PSC_GOOGLE_API_VALUE = 7; + /** + * + * + *
+     * Target is a VPC-SC that uses [Private Service
+     * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
+     * 
+ * + * PSC_VPC_SC = 8; + */ + public static final int PSC_VPC_SC_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Target valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return INSTANCE; + case 2: + return INTERNET; + case 3: + return GOOGLE_API; + case 4: + return GKE_MASTER; + case 5: + return CLOUD_SQL_INSTANCE; + case 6: + return PSC_PUBLISHED_SERVICE; + case 7: + return PSC_GOOGLE_API; + case 8: + return PSC_VPC_SC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Target findValueByNumber(int number) { + return Target.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.DeliverInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_ = 0; + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target getTarget() { + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target result = + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.forNumber(target_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (target_ + != com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.DeliverInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.DeliverInfo other = + (com.google.events.cloud.networkmanagement.v1.DeliverInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.DeliverInfo 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; + } + /** + * + * + *
+   * Details of the final state "deliver" and associated resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.DeliverInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.DeliverInfo) + com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.DeliverInfo.class, + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.DeliverInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = 0; + resourceUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo build() { + com.google.events.cloud.networkmanagement.v1.DeliverInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.DeliverInfo result = + new com.google.events.cloud.networkmanagement.v1.DeliverInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.DeliverInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.DeliverInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.DeliverInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.DeliverInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + target_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int target_ = 0; + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target getTarget() { + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target result = + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.forNumber(target_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000001); + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.DeliverInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.DeliverInfo) + private static final com.google.events.cloud.networkmanagement.v1.DeliverInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.DeliverInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.DeliverInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliverInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java new file mode 100644 index 00000000..bae2e6c7 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface DeliverInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.DeliverInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfo.java new file mode 100644 index 00000000..8e6c95bd --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfo.java @@ -0,0 +1,1841 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "drop" and associated resource.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.DropInfo} + */ +public final class DropInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.DropInfo) + DropInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DropInfo.newBuilder() to construct. + private DropInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DropInfo() { + cause_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DropInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.DropInfo.class, + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder.class); + } + + /** + * + * + *
+   * Drop cause types:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.DropInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + UNKNOWN_EXTERNAL_ADDRESS(1), + /** + * + * + *
+     * A Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + FOREIGN_IP_DISALLOWED(2), + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + FIREWALL_RULE(3), + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + NO_ROUTE(4), + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + ROUTE_BLACKHOLE(5), + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + ROUTE_WRONG_NETWORK(6), + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + PRIVATE_TRAFFIC_TO_INTERNET(7), + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + PRIVATE_GOOGLE_ACCESS_DISALLOWED(8), + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection.
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + NO_EXTERNAL_ADDRESS(9), + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + UNKNOWN_INTERNAL_ADDRESS(10), + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + FORWARDING_RULE_MISMATCH(11), + /** + * + * + *
+     * Packet could be dropped because it was sent from a different region
+     * to a regional forwarding without global access.
+     * 
+ * + * FORWARDING_RULE_REGION_MISMATCH = 25; + */ + FORWARDING_RULE_REGION_MISMATCH(25), + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + FORWARDING_RULE_NO_INSTANCES(12), + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK(13), + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + INSTANCE_NOT_RUNNING(14), + /** + * + * + *
+     * Packet sent from or to a GKE cluster that is not in running state.
+     * 
+ * + * GKE_CLUSTER_NOT_RUNNING = 27; + */ + GKE_CLUSTER_NOT_RUNNING(27), + /** + * + * + *
+     * Packet sent from or to a Cloud SQL instance that is not in running state.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + */ + CLOUD_SQL_INSTANCE_NOT_RUNNING(28), + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + TRAFFIC_TYPE_BLOCKED(15), + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + GKE_MASTER_UNAUTHORIZED_ACCESS(16), + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS(17), + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + DROPPED_INSIDE_GKE_SERVICE(18), + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + DROPPED_INSIDE_CLOUD_SQL_SERVICE(19), + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + GOOGLE_MANAGED_SERVICE_NO_PEERING(20), + /** + * + * + *
+     * Packet was dropped because the Google-managed service uses Private
+     * Service Connect (PSC), but the PSC endpoint is not found in the project.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + */ + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT(38), + /** + * + * + *
+     * Packet was dropped because the GKE cluster uses Private Service Connect
+     * (PSC), but the PSC endpoint is not found in the project.
+     * 
+ * + * GKE_PSC_ENDPOINT_MISSING = 36; + */ + GKE_PSC_ENDPOINT_MISSING(36), + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS(21), + /** + * + * + *
+     * Packet was dropped because a GKE cluster private endpoint is
+     * unreachable from a region different from the cluster's region.
+     * 
+ * + * GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + */ + GKE_CONTROL_PLANE_REGION_MISMATCH(30), + /** + * + * + *
+     * Packet sent from a public GKE cluster control plane to a private
+     * IP address.
+     * 
+ * + * PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + */ + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION(31), + /** + * + * + *
+     * Packet was dropped because there is no route from a GKE cluster
+     * control plane to a destination network.
+     * 
+ * + * GKE_CONTROL_PLANE_NO_ROUTE = 32; + */ + GKE_CONTROL_PLANE_NO_ROUTE(32), + /** + * + * + *
+     * Packet sent from a Cloud SQL instance to an external IP address is not
+     * allowed. The Cloud SQL instance is not configured to send packets to
+     * external IP addresses.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + */ + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC(33), + /** + * + * + *
+     * Packet sent from a Cloud SQL instance with only a public IP address to a
+     * private IP address.
+     * 
+ * + * PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + */ + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION(34), + /** + * + * + *
+     * Packet was dropped because there is no route from a Cloud SQL
+     * instance to a destination network.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + */ + CLOUD_SQL_INSTANCE_NO_ROUTE(35), + /** + * + * + *
+     * Packet could be dropped because the Cloud Function is not in an active
+     * status.
+     * 
+ * + * CLOUD_FUNCTION_NOT_ACTIVE = 22; + */ + CLOUD_FUNCTION_NOT_ACTIVE(22), + /** + * + * + *
+     * Packet could be dropped because no VPC connector is set.
+     * 
+ * + * VPC_CONNECTOR_NOT_SET = 23; + */ + VPC_CONNECTOR_NOT_SET(23), + /** + * + * + *
+     * Packet could be dropped because the VPC connector is not in a running
+     * state.
+     * 
+ * + * VPC_CONNECTOR_NOT_RUNNING = 24; + */ + VPC_CONNECTOR_NOT_RUNNING(24), + /** + * + * + *
+     * The Private Service Connect endpoint is in a project that is not approved
+     * to connect to the service.
+     * 
+ * + * PSC_CONNECTION_NOT_ACCEPTED = 26; + */ + PSC_CONNECTION_NOT_ACCEPTED(26), + /** + * + * + *
+     * Packet sent from a Cloud Run revision that is not ready.
+     * 
+ * + * CLOUD_RUN_REVISION_NOT_READY = 29; + */ + CLOUD_RUN_REVISION_NOT_READY(29), + /** + * + * + *
+     * Packet was dropped inside Private Service Connect service producer.
+     * 
+ * + * DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + */ + DROPPED_INSIDE_PSC_SERVICE_PRODUCER(37), + /** + * + * + *
+     * Packet sent to a load balancer, which requires a proxy-only subnet and
+     * the subnet is not found.
+     * 
+ * + * LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + */ + LOAD_BALANCER_HAS_NO_PROXY_SUBNET(39), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + public static final int UNKNOWN_EXTERNAL_ADDRESS_VALUE = 1; + /** + * + * + *
+     * A Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + public static final int FOREIGN_IP_DISALLOWED_VALUE = 2; + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + public static final int FIREWALL_RULE_VALUE = 3; + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + public static final int NO_ROUTE_VALUE = 4; + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + public static final int ROUTE_BLACKHOLE_VALUE = 5; + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + public static final int ROUTE_WRONG_NETWORK_VALUE = 6; + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + public static final int PRIVATE_TRAFFIC_TO_INTERNET_VALUE = 7; + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + public static final int PRIVATE_GOOGLE_ACCESS_DISALLOWED_VALUE = 8; + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection.
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + public static final int NO_EXTERNAL_ADDRESS_VALUE = 9; + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + public static final int UNKNOWN_INTERNAL_ADDRESS_VALUE = 10; + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + public static final int FORWARDING_RULE_MISMATCH_VALUE = 11; + /** + * + * + *
+     * Packet could be dropped because it was sent from a different region
+     * to a regional forwarding without global access.
+     * 
+ * + * FORWARDING_RULE_REGION_MISMATCH = 25; + */ + public static final int FORWARDING_RULE_REGION_MISMATCH_VALUE = 25; + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + public static final int FORWARDING_RULE_NO_INSTANCES_VALUE = 12; + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + public static final int FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK_VALUE = 13; + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + public static final int INSTANCE_NOT_RUNNING_VALUE = 14; + /** + * + * + *
+     * Packet sent from or to a GKE cluster that is not in running state.
+     * 
+ * + * GKE_CLUSTER_NOT_RUNNING = 27; + */ + public static final int GKE_CLUSTER_NOT_RUNNING_VALUE = 27; + /** + * + * + *
+     * Packet sent from or to a Cloud SQL instance that is not in running state.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + */ + public static final int CLOUD_SQL_INSTANCE_NOT_RUNNING_VALUE = 28; + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + public static final int TRAFFIC_TYPE_BLOCKED_VALUE = 15; + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + public static final int GKE_MASTER_UNAUTHORIZED_ACCESS_VALUE = 16; + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + public static final int CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS_VALUE = 17; + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + public static final int DROPPED_INSIDE_GKE_SERVICE_VALUE = 18; + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + public static final int DROPPED_INSIDE_CLOUD_SQL_SERVICE_VALUE = 19; + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + public static final int GOOGLE_MANAGED_SERVICE_NO_PEERING_VALUE = 20; + /** + * + * + *
+     * Packet was dropped because the Google-managed service uses Private
+     * Service Connect (PSC), but the PSC endpoint is not found in the project.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + */ + public static final int GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT_VALUE = 38; + /** + * + * + *
+     * Packet was dropped because the GKE cluster uses Private Service Connect
+     * (PSC), but the PSC endpoint is not found in the project.
+     * 
+ * + * GKE_PSC_ENDPOINT_MISSING = 36; + */ + public static final int GKE_PSC_ENDPOINT_MISSING_VALUE = 36; + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + public static final int CLOUD_SQL_INSTANCE_NO_IP_ADDRESS_VALUE = 21; + /** + * + * + *
+     * Packet was dropped because a GKE cluster private endpoint is
+     * unreachable from a region different from the cluster's region.
+     * 
+ * + * GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + */ + public static final int GKE_CONTROL_PLANE_REGION_MISMATCH_VALUE = 30; + /** + * + * + *
+     * Packet sent from a public GKE cluster control plane to a private
+     * IP address.
+     * 
+ * + * PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + */ + public static final int PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION_VALUE = 31; + /** + * + * + *
+     * Packet was dropped because there is no route from a GKE cluster
+     * control plane to a destination network.
+     * 
+ * + * GKE_CONTROL_PLANE_NO_ROUTE = 32; + */ + public static final int GKE_CONTROL_PLANE_NO_ROUTE_VALUE = 32; + /** + * + * + *
+     * Packet sent from a Cloud SQL instance to an external IP address is not
+     * allowed. The Cloud SQL instance is not configured to send packets to
+     * external IP addresses.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + */ + public static final int CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC_VALUE = 33; + /** + * + * + *
+     * Packet sent from a Cloud SQL instance with only a public IP address to a
+     * private IP address.
+     * 
+ * + * PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + */ + public static final int PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION_VALUE = 34; + /** + * + * + *
+     * Packet was dropped because there is no route from a Cloud SQL
+     * instance to a destination network.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + */ + public static final int CLOUD_SQL_INSTANCE_NO_ROUTE_VALUE = 35; + /** + * + * + *
+     * Packet could be dropped because the Cloud Function is not in an active
+     * status.
+     * 
+ * + * CLOUD_FUNCTION_NOT_ACTIVE = 22; + */ + public static final int CLOUD_FUNCTION_NOT_ACTIVE_VALUE = 22; + /** + * + * + *
+     * Packet could be dropped because no VPC connector is set.
+     * 
+ * + * VPC_CONNECTOR_NOT_SET = 23; + */ + public static final int VPC_CONNECTOR_NOT_SET_VALUE = 23; + /** + * + * + *
+     * Packet could be dropped because the VPC connector is not in a running
+     * state.
+     * 
+ * + * VPC_CONNECTOR_NOT_RUNNING = 24; + */ + public static final int VPC_CONNECTOR_NOT_RUNNING_VALUE = 24; + /** + * + * + *
+     * The Private Service Connect endpoint is in a project that is not approved
+     * to connect to the service.
+     * 
+ * + * PSC_CONNECTION_NOT_ACCEPTED = 26; + */ + public static final int PSC_CONNECTION_NOT_ACCEPTED_VALUE = 26; + /** + * + * + *
+     * Packet sent from a Cloud Run revision that is not ready.
+     * 
+ * + * CLOUD_RUN_REVISION_NOT_READY = 29; + */ + public static final int CLOUD_RUN_REVISION_NOT_READY_VALUE = 29; + /** + * + * + *
+     * Packet was dropped inside Private Service Connect service producer.
+     * 
+ * + * DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + */ + public static final int DROPPED_INSIDE_PSC_SERVICE_PRODUCER_VALUE = 37; + /** + * + * + *
+     * Packet sent to a load balancer, which requires a proxy-only subnet and
+     * the subnet is not found.
+     * 
+ * + * LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + */ + public static final int LOAD_BALANCER_HAS_NO_PROXY_SUBNET_VALUE = 39; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Cause valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_EXTERNAL_ADDRESS; + case 2: + return FOREIGN_IP_DISALLOWED; + case 3: + return FIREWALL_RULE; + case 4: + return NO_ROUTE; + case 5: + return ROUTE_BLACKHOLE; + case 6: + return ROUTE_WRONG_NETWORK; + case 7: + return PRIVATE_TRAFFIC_TO_INTERNET; + case 8: + return PRIVATE_GOOGLE_ACCESS_DISALLOWED; + case 9: + return NO_EXTERNAL_ADDRESS; + case 10: + return UNKNOWN_INTERNAL_ADDRESS; + case 11: + return FORWARDING_RULE_MISMATCH; + case 25: + return FORWARDING_RULE_REGION_MISMATCH; + case 12: + return FORWARDING_RULE_NO_INSTANCES; + case 13: + return FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK; + case 14: + return INSTANCE_NOT_RUNNING; + case 27: + return GKE_CLUSTER_NOT_RUNNING; + case 28: + return CLOUD_SQL_INSTANCE_NOT_RUNNING; + case 15: + return TRAFFIC_TYPE_BLOCKED; + case 16: + return GKE_MASTER_UNAUTHORIZED_ACCESS; + case 17: + return CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS; + case 18: + return DROPPED_INSIDE_GKE_SERVICE; + case 19: + return DROPPED_INSIDE_CLOUD_SQL_SERVICE; + case 20: + return GOOGLE_MANAGED_SERVICE_NO_PEERING; + case 38: + return GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT; + case 36: + return GKE_PSC_ENDPOINT_MISSING; + case 21: + return CLOUD_SQL_INSTANCE_NO_IP_ADDRESS; + case 30: + return GKE_CONTROL_PLANE_REGION_MISMATCH; + case 31: + return PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION; + case 32: + return GKE_CONTROL_PLANE_NO_ROUTE; + case 33: + return CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC; + case 34: + return PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION; + case 35: + return CLOUD_SQL_INSTANCE_NO_ROUTE; + case 22: + return CLOUD_FUNCTION_NOT_ACTIVE; + case 23: + return VPC_CONNECTOR_NOT_SET; + case 24: + return VPC_CONNECTOR_NOT_RUNNING; + case 26: + return PSC_CONNECTION_NOT_ACCEPTED; + case 29: + return CLOUD_RUN_REVISION_NOT_READY; + case 37: + return DROPPED_INSIDE_PSC_SERVICE_PRODUCER; + case 39: + return LOAD_BALANCER_HAS_NO_PROXY_SUBNET; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cause findValueByNumber(int number) { + return Cause.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.DropInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_ = 0; + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo.Cause getCause() { + com.google.events.cloud.networkmanagement.v1.DropInfo.Cause result = + com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.forNumber(cause_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cause_ + != com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, cause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.DropInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.DropInfo other = + (com.google.events.cloud.networkmanagement.v1.DropInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.DropInfo 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; + } + /** + * + * + *
+   * Details of the final state "drop" and associated resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.DropInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.DropInfo) + com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.DropInfo.class, + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.DropInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cause_ = 0; + resourceUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo build() { + com.google.events.cloud.networkmanagement.v1.DropInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.DropInfo result = + new com.google.events.cloud.networkmanagement.v1.DropInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.DropInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cause_ = cause_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.DropInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.DropInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.DropInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance()) + return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + cause_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int cause_ = 0; + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + cause_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo.Cause getCause() { + com.google.events.cloud.networkmanagement.v1.DropInfo.Cause result = + com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.forNumber(cause_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.DropInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.events.cloud.networkmanagement.v1.DropInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + bitField0_ = (bitField0_ & ~0x00000001); + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.DropInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.DropInfo) + private static final com.google.events.cloud.networkmanagement.v1.DropInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.DropInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.DropInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DropInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfoOrBuilder.java new file mode 100644 index 00000000..7c0423d9 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/DropInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface DropInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.DropInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.events.cloud.networkmanagement.v1.DropInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Endpoint.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Endpoint.java new file mode 100644 index 00000000..306647b0 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Endpoint.java @@ -0,0 +1,5078 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Source or destination of the Connectivity Test.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Endpoint} + */ +public final class Endpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Endpoint() { + ipAddress_ = ""; + instance_ = ""; + gkeMasterCluster_ = ""; + cloudSqlInstance_ = ""; + network_ = ""; + networkType_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Endpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder.class); + } + + /** + * + * + *
+   * The type definition of an endpoint's network. Use one of the
+   * following choices:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.Endpoint.NetworkType} + */ + public enum NetworkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + NETWORK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A network hosted within Google Cloud.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + GCP_NETWORK(1), + /** + * + * + *
+     * A network hosted outside of Google Cloud.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + NON_GCP_NETWORK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + public static final int NETWORK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A network hosted within Google Cloud.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + public static final int GCP_NETWORK_VALUE = 1; + /** + * + * + *
+     * A network hosted outside of Google Cloud.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + public static final int NON_GCP_NETWORK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NetworkType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NetworkType forNumber(int value) { + switch (value) { + case 0: + return NETWORK_TYPE_UNSPECIFIED; + case 1: + return GCP_NETWORK; + case 2: + return NON_GCP_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NetworkType findValueByNumber(int number) { + return NetworkType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Endpoint.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NetworkType[] VALUES = values(); + + public static NetworkType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NetworkType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.Endpoint.NetworkType) + } + + public interface CloudFunctionEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions) name.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions) name.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * Wrapper for Cloud Function attributes.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} + */ + public static final class CloudFunctionEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + CloudFunctionEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudFunctionEndpoint.newBuilder() to construct. + private CloudFunctionEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudFunctionEndpoint() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudFunctionEndpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions) name.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions) name.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint other = + (com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint 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; + } + /** + * + * + *
+     * Wrapper for Cloud Function attributes.
+     * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder + .class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudFunctionEndpoint_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint build() { + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + buildPartial() { + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint result = + new com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) { + return mergeFrom( + (com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint other) { + if (other + == com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * A [Cloud Function](https://cloud.google.com/functions) name.
+       * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A [Cloud Function](https://cloud.google.com/functions) name.
+       * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A [Cloud Function](https://cloud.google.com/functions) name.
+       * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * A [Cloud Function](https://cloud.google.com/functions) name.
+       * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * A [Cloud Function](https://cloud.google.com/functions) name.
+       * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + private static final com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudFunctionEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AppEngineVersionEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+     * name.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+     * name.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * Wrapper for the App Engine service version attributes.
+   * 
+ * + * Protobuf type {@code + * google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} + */ + public static final class AppEngineVersionEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + AppEngineVersionEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppEngineVersionEndpoint.newBuilder() to construct. + private AppEngineVersionEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppEngineVersionEndpoint() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppEngineVersionEndpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+     * name.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+     * name.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint other = + (com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint 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; + } + /** + * + * + *
+     * Wrapper for the App Engine service version attributes.
+     * 
+ * + * Protobuf type {@code + * google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .class, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_AppEngineVersionEndpoint_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + build() { + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + buildPartial() { + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint result = + new com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) { + return mergeFrom( + (com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint other) { + if (other + == com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * An [App Engine](https://cloud.google.com/appengine) [service
+       * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+       * name.
+       * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An [App Engine](https://cloud.google.com/appengine) [service
+       * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+       * name.
+       * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An [App Engine](https://cloud.google.com/appengine) [service
+       * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+       * name.
+       * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An [App Engine](https://cloud.google.com/appengine) [service
+       * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+       * name.
+       * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * An [App Engine](https://cloud.google.com/appengine) [service
+       * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
+       * name.
+       * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + private static final com.google.events.cloud.networkmanagement.v1.Endpoint + .AppEngineVersionEndpoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppEngineVersionEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CloudRunRevisionEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * URI. The format is:
+     * projects/{project}/locations/{location}/revisions/{revision}
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * URI. The format is:
+     * projects/{project}/locations/{location}/revisions/{revision}
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * Wrapper for Cloud Run revision attributes.
+   * 
+ * + * Protobuf type {@code + * google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} + */ + public static final class CloudRunRevisionEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + CloudRunRevisionEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudRunRevisionEndpoint.newBuilder() to construct. + private CloudRunRevisionEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudRunRevisionEndpoint() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudRunRevisionEndpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * URI. The format is:
+     * projects/{project}/locations/{location}/revisions/{revision}
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * URI. The format is:
+     * projects/{project}/locations/{location}/revisions/{revision}
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint other = + (com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint 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; + } + /** + * + * + *
+     * Wrapper for Cloud Run revision attributes.
+     * 
+ * + * Protobuf type {@code + * google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .class, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .Builder.class); + } + + // Construct using + // com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_CloudRunRevisionEndpoint_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + build() { + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + buildPartial() { + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint result = + new com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) { + return mergeFrom( + (com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint other) { + if (other + == com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * A [Cloud Run](https://cloud.google.com/run)
+       * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+       * URI. The format is:
+       * projects/{project}/locations/{location}/revisions/{revision}
+       * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A [Cloud Run](https://cloud.google.com/run)
+       * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+       * URI. The format is:
+       * projects/{project}/locations/{location}/revisions/{revision}
+       * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A [Cloud Run](https://cloud.google.com/run)
+       * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+       * URI. The format is:
+       * projects/{project}/locations/{location}/revisions/{revision}
+       * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * A [Cloud Run](https://cloud.google.com/run)
+       * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+       * URI. The format is:
+       * projects/{project}/locations/{location}/revisions/{revision}
+       * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * A [Cloud Run](https://cloud.google.com/run)
+       * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+       * URI. The format is:
+       * projects/{project}/locations/{location}/revisions/{revision}
+       * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + private static final com.google.events.cloud.networkmanagement.v1.Endpoint + .CloudRunRevisionEndpoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRunRevisionEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_ = 0; + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object instance_ = ""; + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GKE_MASTER_CLUSTER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object gkeMasterCluster_ = ""; + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + @java.lang.Override + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeMasterCluster_ = s; + return s; + } + } + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object cloudSqlInstance_ = ""; + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlInstance_ = s; + return s; + } + } + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_FUNCTION_FIELD_NUMBER = 10; + private com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + cloudFunction_; + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return Whether the cloudFunction field is set. + */ + @java.lang.Override + public boolean hasCloudFunction() { + return cloudFunction_ != null; + } + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return The cloudFunction. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + getCloudFunction() { + return cloudFunction_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance() + : cloudFunction_; + } + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder + getCloudFunctionOrBuilder() { + return cloudFunction_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance() + : cloudFunction_; + } + + public static final int APP_ENGINE_VERSION_FIELD_NUMBER = 11; + private com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + appEngineVersion_; + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return Whether the appEngineVersion field is set. + */ + @java.lang.Override + public boolean hasAppEngineVersion() { + return appEngineVersion_ != null; + } + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return The appEngineVersion. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getAppEngineVersion() { + return appEngineVersion_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance() + : appEngineVersion_; + } + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder + getAppEngineVersionOrBuilder() { + return appEngineVersion_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance() + : appEngineVersion_; + } + + public static final int CLOUD_RUN_REVISION_FIELD_NUMBER = 12; + private com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + cloudRunRevision_; + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return Whether the cloudRunRevision field is set. + */ + @java.lang.Override + public boolean hasCloudRunRevision() { + return cloudRunRevision_ != null; + } + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return The cloudRunRevision. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getCloudRunRevision() { + return cloudRunRevision_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance() + : cloudRunRevision_; + } + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder + getCloudRunRevisionOrBuilder() { + return cloudRunRevision_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance() + : cloudRunRevision_; + } + + public static final int NETWORK_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TYPE_FIELD_NUMBER = 5; + private int networkType_ = 0; + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType() { + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType result = + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType.forNumber(networkType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a Google
+   * Cloud project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a Google
+   * Cloud project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, network_); + } + if (networkType_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType + .NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, networkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gkeMasterCluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, gkeMasterCluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudSqlInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cloudSqlInstance_); + } + if (cloudFunction_ != null) { + output.writeMessage(10, getCloudFunction()); + } + if (appEngineVersion_ != null) { + output.writeMessage(11, getAppEngineVersion()); + } + if (cloudRunRevision_ != null) { + output.writeMessage(12, getCloudRunRevision()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, network_); + } + if (networkType_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType + .NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, networkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gkeMasterCluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, gkeMasterCluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudSqlInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cloudSqlInstance_); + } + if (cloudFunction_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCloudFunction()); + } + if (appEngineVersion_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getAppEngineVersion()); + } + if (cloudRunRevision_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCloudRunRevision()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.Endpoint)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Endpoint other = + (com.google.events.cloud.networkmanagement.v1.Endpoint) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (getPort() != other.getPort()) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getGkeMasterCluster().equals(other.getGkeMasterCluster())) return false; + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + if (hasCloudFunction() != other.hasCloudFunction()) return false; + if (hasCloudFunction()) { + if (!getCloudFunction().equals(other.getCloudFunction())) return false; + } + if (hasAppEngineVersion() != other.hasAppEngineVersion()) return false; + if (hasAppEngineVersion()) { + if (!getAppEngineVersion().equals(other.getAppEngineVersion())) return false; + } + if (hasCloudRunRevision() != other.hasCloudRunRevision()) return false; + if (hasCloudRunRevision()) { + if (!getCloudRunRevision().equals(other.getCloudRunRevision())) return false; + } + if (!getNetwork().equals(other.getNetwork())) return false; + if (networkType_ != other.networkType_) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + GKE_MASTER_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMasterCluster().hashCode(); + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + if (hasCloudFunction()) { + hash = (37 * hash) + CLOUD_FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getCloudFunction().hashCode(); + } + if (hasAppEngineVersion()) { + hash = (37 * hash) + APP_ENGINE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineVersion().hashCode(); + } + if (hasCloudRunRevision()) { + hash = (37 * hash) + CLOUD_RUN_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getCloudRunRevision().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + NETWORK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + networkType_; + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.Endpoint 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; + } + /** + * + * + *
+   * Source or destination of the Connectivity Test.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Endpoint) + com.google.events.cloud.networkmanagement.v1.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Endpoint.class, + com.google.events.cloud.networkmanagement.v1.Endpoint.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.Endpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipAddress_ = ""; + port_ = 0; + instance_ = ""; + gkeMasterCluster_ = ""; + cloudSqlInstance_ = ""; + cloudFunction_ = null; + if (cloudFunctionBuilder_ != null) { + cloudFunctionBuilder_.dispose(); + cloudFunctionBuilder_ = null; + } + appEngineVersion_ = null; + if (appEngineVersionBuilder_ != null) { + appEngineVersionBuilder_.dispose(); + appEngineVersionBuilder_ = null; + } + cloudRunRevision_ = null; + if (cloudRunRevisionBuilder_ != null) { + cloudRunRevisionBuilder_.dispose(); + cloudRunRevisionBuilder_ = null; + } + network_ = ""; + networkType_ = 0; + projectId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint build() { + com.google.events.cloud.networkmanagement.v1.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint buildPartial() { + com.google.events.cloud.networkmanagement.v1.Endpoint result = + new com.google.events.cloud.networkmanagement.v1.Endpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.Endpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instance_ = instance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.gkeMasterCluster_ = gkeMasterCluster_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cloudSqlInstance_ = cloudSqlInstance_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.cloudFunction_ = + cloudFunctionBuilder_ == null ? cloudFunction_ : cloudFunctionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.appEngineVersion_ = + appEngineVersionBuilder_ == null ? appEngineVersion_ : appEngineVersionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cloudRunRevision_ = + cloudRunRevisionBuilder_ == null ? cloudRunRevision_ : cloudRunRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.networkType_ = networkType_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.projectId_ = projectId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.Endpoint) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.Endpoint other) { + if (other == com.google.events.cloud.networkmanagement.v1.Endpoint.getDefaultInstance()) + return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getGkeMasterCluster().isEmpty()) { + gkeMasterCluster_ = other.gkeMasterCluster_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getCloudSqlInstance().isEmpty()) { + cloudSqlInstance_ = other.cloudSqlInstance_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCloudFunction()) { + mergeCloudFunction(other.getCloudFunction()); + } + if (other.hasAppEngineVersion()) { + mergeAppEngineVersion(other.getAppEngineVersion()); + } + if (other.hasCloudRunRevision()) { + mergeCloudRunRevision(other.getCloudRunRevision()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.networkType_ != 0) { + setNetworkTypeValue(other.getNetworkTypeValue()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 34 + case 40: + { + networkType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 40 + case 50: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 50 + case 58: + { + gkeMasterCluster_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 66: + { + cloudSqlInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 82: + { + input.readMessage(getCloudFunctionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + case 90: + { + input.readMessage( + getAppEngineVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 90 + case 98: + { + input.readMessage( + getCloudRunRevisionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + instance_ = getDefaultInstance().getInstance(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object gkeMasterCluster_ = ""; + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeMasterCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gkeMasterCluster_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return This builder for chaining. + */ + public Builder clearGkeMasterCluster() { + gkeMasterCluster_ = getDefaultInstance().getGkeMasterCluster(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The bytes for gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gkeMasterCluster_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object cloudSqlInstance_ = ""; + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cloudSqlInstance_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlInstance() { + cloudSqlInstance_ = getDefaultInstance().getCloudSqlInstance(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The bytes for cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cloudSqlInstance_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + cloudFunction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder> + cloudFunctionBuilder_; + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return Whether the cloudFunction field is set. + */ + public boolean hasCloudFunction() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return The cloudFunction. + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + getCloudFunction() { + if (cloudFunctionBuilder_ == null) { + return cloudFunction_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance() + : cloudFunction_; + } else { + return cloudFunctionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public Builder setCloudFunction( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint value) { + if (cloudFunctionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudFunction_ = value; + } else { + cloudFunctionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public Builder setCloudFunction( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder + builderForValue) { + if (cloudFunctionBuilder_ == null) { + cloudFunction_ = builderForValue.build(); + } else { + cloudFunctionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public Builder mergeCloudFunction( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint value) { + if (cloudFunctionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && cloudFunction_ != null + && cloudFunction_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance()) { + getCloudFunctionBuilder().mergeFrom(value); + } else { + cloudFunction_ = value; + } + } else { + cloudFunctionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public Builder clearCloudFunction() { + bitField0_ = (bitField0_ & ~0x00000020); + cloudFunction_ = null; + if (cloudFunctionBuilder_ != null) { + cloudFunctionBuilder_.dispose(); + cloudFunctionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder + getCloudFunctionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCloudFunctionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder + getCloudFunctionOrBuilder() { + if (cloudFunctionBuilder_ != null) { + return cloudFunctionBuilder_.getMessageOrBuilder(); + } else { + return cloudFunction_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + .getDefaultInstance() + : cloudFunction_; + } + } + /** + * + * + *
+     * A [Cloud Function](https://cloud.google.com/functions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder> + getCloudFunctionFieldBuilder() { + if (cloudFunctionBuilder_ == null) { + cloudFunctionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint + .CloudFunctionEndpointOrBuilder>( + getCloudFunction(), getParentForChildren(), isClean()); + cloudFunction_ = null; + } + return cloudFunctionBuilder_; + } + + private com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + appEngineVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder> + appEngineVersionBuilder_; + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return Whether the appEngineVersion field is set. + */ + public boolean hasAppEngineVersion() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return The appEngineVersion. + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getAppEngineVersion() { + if (appEngineVersionBuilder_ == null) { + return appEngineVersion_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance() + : appEngineVersion_; + } else { + return appEngineVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public Builder setAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint value) { + if (appEngineVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appEngineVersion_ = value; + } else { + appEngineVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public Builder setAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.Builder + builderForValue) { + if (appEngineVersionBuilder_ == null) { + appEngineVersion_ = builderForValue.build(); + } else { + appEngineVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public Builder mergeAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint value) { + if (appEngineVersionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && appEngineVersion_ != null + && appEngineVersion_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance()) { + getAppEngineVersionBuilder().mergeFrom(value); + } else { + appEngineVersion_ = value; + } + } else { + appEngineVersionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public Builder clearAppEngineVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + appEngineVersion_ = null; + if (appEngineVersionBuilder_ != null) { + appEngineVersionBuilder_.dispose(); + appEngineVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.Builder + getAppEngineVersionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAppEngineVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder + getAppEngineVersionOrBuilder() { + if (appEngineVersionBuilder_ != null) { + return appEngineVersionBuilder_.getMessageOrBuilder(); + } else { + return appEngineVersion_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .getDefaultInstance() + : appEngineVersion_; + } + } + /** + * + * + *
+     * An [App Engine](https://cloud.google.com/appengine) [service
+     * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder> + getAppEngineVersionFieldBuilder() { + if (appEngineVersionBuilder_ == null) { + appEngineVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + .Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint + .AppEngineVersionEndpointOrBuilder>( + getAppEngineVersion(), getParentForChildren(), isClean()); + appEngineVersion_ = null; + } + return appEngineVersionBuilder_; + } + + private com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + cloudRunRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder> + cloudRunRevisionBuilder_; + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return Whether the cloudRunRevision field is set. + */ + public boolean hasCloudRunRevision() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return The cloudRunRevision. + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getCloudRunRevision() { + if (cloudRunRevisionBuilder_ == null) { + return cloudRunRevision_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance() + : cloudRunRevision_; + } else { + return cloudRunRevisionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public Builder setCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint value) { + if (cloudRunRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudRunRevision_ = value; + } else { + cloudRunRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public Builder setCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.Builder + builderForValue) { + if (cloudRunRevisionBuilder_ == null) { + cloudRunRevision_ = builderForValue.build(); + } else { + cloudRunRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public Builder mergeCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint value) { + if (cloudRunRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && cloudRunRevision_ != null + && cloudRunRevision_ + != com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance()) { + getCloudRunRevisionBuilder().mergeFrom(value); + } else { + cloudRunRevision_ = value; + } + } else { + cloudRunRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public Builder clearCloudRunRevision() { + bitField0_ = (bitField0_ & ~0x00000080); + cloudRunRevision_ = null; + if (cloudRunRevisionBuilder_ != null) { + cloudRunRevisionBuilder_.dispose(); + cloudRunRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.Builder + getCloudRunRevisionBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCloudRunRevisionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + public com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder + getCloudRunRevisionOrBuilder() { + if (cloudRunRevisionBuilder_ != null) { + return cloudRunRevisionBuilder_.getMessageOrBuilder(); + } else { + return cloudRunRevision_ == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .getDefaultInstance() + : cloudRunRevision_; + } + } + /** + * + * + *
+     * A [Cloud Run](https://cloud.google.com/run)
+     * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder> + getCloudRunRevisionFieldBuilder() { + if (cloudRunRevisionBuilder_ == null) { + cloudRunRevisionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + .Builder, + com.google.events.cloud.networkmanagement.v1.Endpoint + .CloudRunRevisionEndpointOrBuilder>( + getCloudRunRevision(), getParentForChildren(), isClean()); + cloudRunRevision_ = null; + } + return cloudRunRevisionBuilder_; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int networkType_ = 0; + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @param value The enum numeric value on the wire for networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkTypeValue(int value) { + networkType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType() { + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType result = + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType.forNumber(networkType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @param value The networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkType( + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + networkType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkType() { + bitField0_ = (bitField0_ & ~0x00000200); + networkType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a Google
+     * Cloud project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a Google
+     * Cloud project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a Google
+     * Cloud project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a Google
+     * Cloud project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a Google
+     * Cloud project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Endpoint) + private static final com.google.events.cloud.networkmanagement.v1.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.Endpoint(); + } + + public static com.google.events.cloud.networkmanagement.v1.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfo.java new file mode 100644 index 00000000..e6c1bc94 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfo.java @@ -0,0 +1,1548 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. The specification of the endpoints for the test.
+ * EndpointInfo is derived from source and destination Endpoint and validated
+ * by the backend data plane model.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.EndpointInfo} + */ +public final class EndpointInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.EndpointInfo) + EndpointInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use EndpointInfo.newBuilder() to construct. + private EndpointInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndpointInfo() { + sourceIp_ = ""; + destinationIp_ = ""; + protocol_ = ""; + sourceNetworkUri_ = ""; + destinationNetworkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EndpointInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.EndpointInfo.class, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder.class); + } + + public static final int SOURCE_IP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceIp_ = ""; + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + @java.lang.Override + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_IP_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationIp_ = ""; + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + @java.lang.Override + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationIp_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocol_ = ""; + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 4; + private int sourcePort_ = 0; + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + + public static final int DESTINATION_PORT_FIELD_NUMBER = 5; + private int destinationPort_ = 0; + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + + public static final int SOURCE_NETWORK_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceNetworkUri_ = ""; + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + @java.lang.Override + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_NETWORK_URI_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationNetworkUri_ = ""; + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + @java.lang.Override + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, protocol_); + } + if (sourcePort_ != 0) { + output.writeInt32(4, sourcePort_); + } + if (destinationPort_ != 0) { + output.writeInt32(5, destinationPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNetworkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceNetworkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationNetworkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationNetworkUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, protocol_); + } + if (sourcePort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, sourcePort_); + } + if (destinationPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, destinationPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNetworkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceNetworkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationNetworkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationNetworkUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.EndpointInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.EndpointInfo other = + (com.google.events.cloud.networkmanagement.v1.EndpointInfo) obj; + + if (!getSourceIp().equals(other.getSourceIp())) return false; + if (!getDestinationIp().equals(other.getDestinationIp())) return false; + if (!getProtocol().equals(other.getProtocol())) return false; + if (getSourcePort() != other.getSourcePort()) return false; + if (getDestinationPort() != other.getDestinationPort()) return false; + if (!getSourceNetworkUri().equals(other.getSourceNetworkUri())) return false; + if (!getDestinationNetworkUri().equals(other.getDestinationNetworkUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceIp().hashCode(); + hash = (37 * hash) + DESTINATION_IP_FIELD_NUMBER; + hash = (53 * hash) + getDestinationIp().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSourcePort(); + hash = (37 * hash) + DESTINATION_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPort(); + hash = (37 * hash) + SOURCE_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceNetworkUri().hashCode(); + hash = (37 * hash) + DESTINATION_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationNetworkUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.EndpointInfo 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; + } + /** + * + * + *
+   * For display only. The specification of the endpoints for the test.
+   * EndpointInfo is derived from source and destination Endpoint and validated
+   * by the backend data plane model.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.EndpointInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.EndpointInfo) + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.EndpointInfo.class, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.EndpointInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceIp_ = ""; + destinationIp_ = ""; + protocol_ = ""; + sourcePort_ = 0; + destinationPort_ = 0; + sourceNetworkUri_ = ""; + destinationNetworkUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo build() { + com.google.events.cloud.networkmanagement.v1.EndpointInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.EndpointInfo result = + new com.google.events.cloud.networkmanagement.v1.EndpointInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.EndpointInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sourceIp_ = sourceIp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destinationIp_ = destinationIp_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sourcePort_ = sourcePort_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.destinationPort_ = destinationPort_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sourceNetworkUri_ = sourceNetworkUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.destinationNetworkUri_ = destinationNetworkUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.EndpointInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.EndpointInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.EndpointInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance()) + return this; + if (!other.getSourceIp().isEmpty()) { + sourceIp_ = other.sourceIp_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDestinationIp().isEmpty()) { + destinationIp_ = other.destinationIp_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getSourcePort() != 0) { + setSourcePort(other.getSourcePort()); + } + if (other.getDestinationPort() != 0) { + setDestinationPort(other.getDestinationPort()); + } + if (!other.getSourceNetworkUri().isEmpty()) { + sourceNetworkUri_ = other.sourceNetworkUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDestinationNetworkUri().isEmpty()) { + destinationNetworkUri_ = other.destinationNetworkUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sourceIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + destinationIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + sourcePort_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + destinationPort_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + sourceNetworkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + destinationNetworkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sourceIp_ = ""; + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceIp() { + sourceIp_ = getDefaultInstance().getSourceIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The bytes for sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object destinationIp_ = ""; + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationIp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestinationIp() { + destinationIp_ = getDefaultInstance().getDestinationIp(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The bytes for destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationIp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocol_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocol_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int sourcePort_; + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort(int value) { + + sourcePort_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + bitField0_ = (bitField0_ & ~0x00000008); + sourcePort_ = 0; + onChanged(); + return this; + } + + private int destinationPort_; + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @param value The destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPort(int value) { + + destinationPort_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPort() { + bitField0_ = (bitField0_ & ~0x00000010); + destinationPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceNetworkUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceNetworkUri() { + sourceNetworkUri_ = getDefaultInstance().getSourceNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The bytes for sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceNetworkUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object destinationNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationNetworkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearDestinationNetworkUri() { + destinationNetworkUri_ = getDefaultInstance().getDestinationNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The bytes for destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationNetworkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.EndpointInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.EndpointInfo) + private static final com.google.events.cloud.networkmanagement.v1.EndpointInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.EndpointInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.EndpointInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java new file mode 100644 index 00000000..47267882 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface EndpointInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.EndpointInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + java.lang.String getSourceIp(); + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + com.google.protobuf.ByteString getSourceIpBytes(); + + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + java.lang.String getDestinationIp(); + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + com.google.protobuf.ByteString getDestinationIpBytes(); + + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + int getSourcePort(); + + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + int getDestinationPort(); + + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + java.lang.String getSourceNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + com.google.protobuf.ByteString getSourceNetworkUriBytes(); + + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + java.lang.String getDestinationNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + com.google.protobuf.ByteString getDestinationNetworkUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointOrBuilder.java new file mode 100644 index 00000000..a8fb7cbe --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/EndpointOrBuilder.java @@ -0,0 +1,374 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + java.lang.String getGkeMasterCluster(); + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + com.google.protobuf.ByteString getGkeMasterClusterBytes(); + + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + java.lang.String getCloudSqlInstance(); + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + com.google.protobuf.ByteString getCloudSqlInstanceBytes(); + + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return Whether the cloudFunction field is set. + */ + boolean hasCloudFunction(); + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + * + * @return The cloudFunction. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint getCloudFunction(); + /** + * + * + *
+   * A [Cloud Function](https://cloud.google.com/functions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpointOrBuilder + getCloudFunctionOrBuilder(); + + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return Whether the appEngineVersion field is set. + */ + boolean hasAppEngineVersion(); + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + * + * @return The appEngineVersion. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + getAppEngineVersion(); + /** + * + * + *
+   * An [App Engine](https://cloud.google.com/appengine) [service
+   * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions).
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpointOrBuilder + getAppEngineVersionOrBuilder(); + + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return Whether the cloudRunRevision field is set. + */ + boolean hasCloudRunRevision(); + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + * + * @return The cloudRunRevision. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + getCloudRunRevision(); + /** + * + * + *
+   * A [Cloud Run](https://cloud.google.com/run)
+   * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpointOrBuilder + getCloudRunRevisionOrBuilder(); + + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + int getNetworkTypeValue(); + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + com.google.events.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType(); + + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a Google
+   * Cloud project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a Google
+   * Cloud project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfo.java new file mode 100644 index 00000000..de082f26 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfo.java @@ -0,0 +1,2653 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a VPC firewall rule, an implied
+ * VPC firewall rule, or a hierarchical firewall policy rule.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.FirewallInfo} + */ +public final class FirewallInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.FirewallInfo) + FirewallInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallInfo.newBuilder() to construct. + private FirewallInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallInfo() { + displayName_ = ""; + uri_ = ""; + direction_ = ""; + action_ = ""; + networkUri_ = ""; + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + policy_ = ""; + firewallRuleType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.FirewallInfo.class, + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder.class); + } + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} + */ + public enum FirewallRuleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + FIREWALL_RULE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + HIERARCHICAL_FIREWALL_POLICY_RULE(1), + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + VPC_FIREWALL_RULE(2), + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + IMPLIED_VPC_FIREWALL_RULE(3), + /** + * + * + *
+     * Implicit firewall rules that are managed by serverless VPC access to
+     * allow ingress access. They are not visible in the Google Cloud console.
+     * For details, see [VPC connector's implicit
+     * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).
+     * 
+ * + * SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + */ + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE(4), + /** + * + * + *
+     * Global network firewall policy rule.
+     * For details, see [Network firewall
+     * policies](https://cloud.google.com/vpc/docs/network-firewall-policies).
+     * 
+ * + * NETWORK_FIREWALL_POLICY_RULE = 5; + */ + NETWORK_FIREWALL_POLICY_RULE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + public static final int FIREWALL_RULE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + public static final int HIERARCHICAL_FIREWALL_POLICY_RULE_VALUE = 1; + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + public static final int VPC_FIREWALL_RULE_VALUE = 2; + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + public static final int IMPLIED_VPC_FIREWALL_RULE_VALUE = 3; + /** + * + * + *
+     * Implicit firewall rules that are managed by serverless VPC access to
+     * allow ingress access. They are not visible in the Google Cloud console.
+     * For details, see [VPC connector's implicit
+     * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).
+     * 
+ * + * SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + */ + public static final int SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE_VALUE = 4; + /** + * + * + *
+     * Global network firewall policy rule.
+     * For details, see [Network firewall
+     * policies](https://cloud.google.com/vpc/docs/network-firewall-policies).
+     * 
+ * + * NETWORK_FIREWALL_POLICY_RULE = 5; + */ + public static final int NETWORK_FIREWALL_POLICY_RULE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FirewallRuleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FirewallRuleType forNumber(int value) { + switch (value) { + case 0: + return FIREWALL_RULE_TYPE_UNSPECIFIED; + case 1: + return HIERARCHICAL_FIREWALL_POLICY_RULE; + case 2: + return VPC_FIREWALL_RULE; + case 3: + return IMPLIED_VPC_FIREWALL_RULE; + case 4: + return SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE; + case 5: + return NETWORK_FIREWALL_POLICY_RULE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FirewallRuleType findValueByNumber(int number) { + return FirewallRuleType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FirewallRuleType[] VALUES = values(); + + public static FirewallRuleType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FirewallRuleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object direction_ = ""; + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + @java.lang.Override + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 5; + private int priority_ = 0; + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int NETWORK_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_TAGS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList targetTags_; + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_; + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + + public static final int TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList targetServiceAccounts_; + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_; + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + + public static final int POLICY_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object policy_ = ""; + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } + } + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIREWALL_RULE_TYPE_FIELD_NUMBER = 10; + private int firewallRuleType_ = 0; + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + getFirewallRuleType() { + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType result = + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.forNumber( + firewallRuleType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, direction_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, action_); + } + if (priority_ != 0) { + output.writeInt32(5, priority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, networkUri_); + } + for (int i = 0; i < targetTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetTags_.getRaw(i)); + } + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 8, targetServiceAccounts_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, policy_); + } + if (firewallRuleType_ + != com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, firewallRuleType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, direction_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, action_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, priority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, networkUri_); + } + { + int dataSize = 0; + for (int i = 0; i < targetTags_.size(); i++) { + dataSize += computeStringSizeNoTag(targetTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetTagsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + dataSize += computeStringSizeNoTag(targetServiceAccounts_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetServiceAccountsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, policy_); + } + if (firewallRuleType_ + != com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, firewallRuleType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.FirewallInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.FirewallInfo other = + (com.google.events.cloud.networkmanagement.v1.FirewallInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDirection().equals(other.getDirection())) return false; + if (!getAction().equals(other.getAction())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getTargetTagsList().equals(other.getTargetTagsList())) return false; + if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (firewallRuleType_ != other.firewallRuleType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + getDirection().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + if (getTargetTagsCount() > 0) { + hash = (37 * hash) + TARGET_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTargetTagsList().hashCode(); + } + if (getTargetServiceAccountsCount() > 0) { + hash = (37 * hash) + TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetServiceAccountsList().hashCode(); + } + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + FIREWALL_RULE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + firewallRuleType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.FirewallInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a VPC firewall rule, an implied
+   * VPC firewall rule, or a hierarchical firewall policy rule.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.FirewallInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.FirewallInfo) + com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.FirewallInfo.class, + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.FirewallInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + direction_ = ""; + action_ = ""; + priority_ = 0; + networkUri_ = ""; + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + policy_ = ""; + firewallRuleType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo build() { + com.google.events.cloud.networkmanagement.v1.FirewallInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.FirewallInfo result = + new com.google.events.cloud.networkmanagement.v1.FirewallInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.FirewallInfo result) { + if (((bitField0_ & 0x00000040) != 0)) { + targetTags_ = targetTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.targetTags_ = targetTags_; + if (((bitField0_ & 0x00000080) != 0)) { + targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.targetServiceAccounts_ = targetServiceAccounts_; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.FirewallInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.direction_ = direction_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.policy_ = policy_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.firewallRuleType_ = firewallRuleType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.FirewallInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.FirewallInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.FirewallInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDirection().isEmpty()) { + direction_ = other.direction_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.targetTags_.isEmpty()) { + if (targetTags_.isEmpty()) { + targetTags_ = other.targetTags_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureTargetTagsIsMutable(); + targetTags_.addAll(other.targetTags_); + } + onChanged(); + } + if (!other.targetServiceAccounts_.isEmpty()) { + if (targetServiceAccounts_.isEmpty()) { + targetServiceAccounts_ = other.targetServiceAccounts_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.addAll(other.targetServiceAccounts_); + } + onChanged(); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.firewallRuleType_ != 0) { + setFirewallRuleTypeValue(other.getFirewallRuleTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + direction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetTagsIsMutable(); + targetTags_.add(s); + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(s); + break; + } // case 66 + case 74: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + firewallRuleType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object direction_ = ""; + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The direction. + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The direction to set. + * @return This builder for chaining. + */ + public Builder setDirection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + direction_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return This builder for chaining. + */ + public Builder clearDirection() { + direction_ = getDefaultInstance().getDirection(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The bytes for direction to set. + * @return This builder for chaining. + */ + public Builder setDirectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + direction_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000010); + priority_ = 0; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetTagsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + targetTags_ = new com.google.protobuf.LazyStringArrayList(targetTags_); + bitField0_ |= 0x00000040; + } + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index to set the value at. + * @param value The targetTags to set. + * @return This builder for chaining. + */ + public Builder setTargetTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param values The targetTags to add. + * @return This builder for chaining. + */ + public Builder addAllTargetTags(java.lang.Iterable values) { + ensureTargetTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearTargetTags() { + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The bytes of the targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetServiceAccounts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetServiceAccountsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + targetServiceAccounts_ = + new com.google.protobuf.LazyStringArrayList(targetServiceAccounts_); + bitField0_ |= 0x00000080; + } + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index to set the value at. + * @param value The targetServiceAccounts to set. + * @return This builder for chaining. + */ + public Builder setTargetServiceAccounts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccounts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param values The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addAllTargetServiceAccounts(java.lang.Iterable values) { + ensureTargetServiceAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetServiceAccounts_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return This builder for chaining. + */ + public Builder clearTargetServiceAccounts() { + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The bytes of the targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccountsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + policy_ = getDefaultInstance().getPolicy(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policy_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int firewallRuleType_ = 0; + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The enum numeric value on the wire for firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleTypeValue(int value) { + firewallRuleType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + getFirewallRuleType() { + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType result = + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.forNumber( + firewallRuleType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleType( + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + firewallRuleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return This builder for chaining. + */ + public Builder clearFirewallRuleType() { + bitField0_ = (bitField0_ & ~0x00000200); + firewallRuleType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.FirewallInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.FirewallInfo) + private static final com.google.events.cloud.networkmanagement.v1.FirewallInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.FirewallInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.FirewallInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java new file mode 100644 index 00000000..5ac2f745 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java @@ -0,0 +1,331 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface FirewallInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.FirewallInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + java.lang.String getDirection(); + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + com.google.protobuf.ByteString getDirectionBytes(); + + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + java.util.List getTargetTagsList(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + int getTargetTagsCount(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + java.lang.String getTargetTags(int index); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + com.google.protobuf.ByteString getTargetTagsBytes(int index); + + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + java.util.List getTargetServiceAccountsList(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + int getTargetServiceAccountsCount(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + java.lang.String getTargetServiceAccounts(int index); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index); + + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + java.lang.String getPolicy(); + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + int getFirewallRuleTypeValue(); + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType getFirewallRuleType(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfo.java new file mode 100644 index 00000000..376f0267 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfo.java @@ -0,0 +1,1056 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "forward" and associated resource.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ForwardInfo} + */ +public final class ForwardInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.ForwardInfo) + ForwardInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardInfo.newBuilder() to construct. + private ForwardInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ForwardInfo.class, + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder.class); + } + + /** + * + * + *
+   * Forward target types.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.ForwardInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + PEERING_VPC(1), + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + VPN_GATEWAY(2), + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + INTERCONNECT(3), + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + IMPORTED_CUSTOM_ROUTE_NEXT_HOP(5), + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + CLOUD_SQL_INSTANCE(6), + /** + * + * + *
+     * Forwarded to a VPC network in another project.
+     * 
+ * + * ANOTHER_PROJECT = 7; + */ + ANOTHER_PROJECT(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + public static final int PEERING_VPC_VALUE = 1; + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + public static final int VPN_GATEWAY_VALUE = 2; + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + public static final int INTERCONNECT_VALUE = 3; + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + public static final int IMPORTED_CUSTOM_ROUTE_NEXT_HOP_VALUE = 5; + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + public static final int CLOUD_SQL_INSTANCE_VALUE = 6; + /** + * + * + *
+     * Forwarded to a VPC network in another project.
+     * 
+ * + * ANOTHER_PROJECT = 7; + */ + public static final int ANOTHER_PROJECT_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Target valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return PEERING_VPC; + case 2: + return VPN_GATEWAY; + case 3: + return INTERCONNECT; + case 4: + return GKE_MASTER; + case 5: + return IMPORTED_CUSTOM_ROUTE_NEXT_HOP; + case 6: + return CLOUD_SQL_INSTANCE; + case 7: + return ANOTHER_PROJECT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Target findValueByNumber(int number) { + return Target.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.ForwardInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_ = 0; + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target getTarget() { + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target result = + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.forNumber(target_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (target_ + != com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.ForwardInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.ForwardInfo other = + (com.google.events.cloud.networkmanagement.v1.ForwardInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.ForwardInfo 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; + } + /** + * + * + *
+   * Details of the final state "forward" and associated resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ForwardInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.ForwardInfo) + com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ForwardInfo.class, + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.ForwardInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = 0; + resourceUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo build() { + com.google.events.cloud.networkmanagement.v1.ForwardInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.ForwardInfo result = + new com.google.events.cloud.networkmanagement.v1.ForwardInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.ForwardInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceUri_ = resourceUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.ForwardInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.ForwardInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.ForwardInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + target_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int target_ = 0; + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target getTarget() { + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target result = + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.forNumber(target_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000001); + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.ForwardInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.ForwardInfo) + private static final com.google.events.cloud.networkmanagement.v1.ForwardInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.ForwardInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java new file mode 100644 index 00000000..508aae81 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface ForwardInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.ForwardInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfo.java new file mode 100644 index 00000000..161bfdbc --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfo.java @@ -0,0 +1,1729 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine forwarding rule.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ForwardingRuleInfo} + */ +public final class ForwardingRuleInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) + ForwardingRuleInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardingRuleInfo.newBuilder() to construct. + private ForwardingRuleInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardingRuleInfo() { + displayName_ = ""; + uri_ = ""; + matchedProtocol_ = ""; + matchedPortRange_ = ""; + vip_ = ""; + target_ = ""; + networkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardingRuleInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.class, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PROTOCOL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object matchedProtocol_ = ""; + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + @java.lang.Override + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedProtocol_ = s; + return s; + } + } + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PORT_RANGE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object matchedPortRange_ = ""; + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + @java.lang.Override + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedPortRange_ = s; + return s; + } + } + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIP_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object vip_ = ""; + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + @java.lang.Override + public java.lang.String getVip() { + java.lang.Object ref = vip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vip_ = s; + return s; + } + } + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedProtocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, matchedProtocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vip_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedPortRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, matchedPortRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedProtocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, matchedProtocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vip_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedPortRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, matchedPortRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo other = + (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedProtocol().equals(other.getMatchedProtocol())) return false; + if (!getMatchedPortRange().equals(other.getMatchedPortRange())) return false; + if (!getVip().equals(other.getVip())) return false; + if (!getTarget().equals(other.getTarget())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getMatchedProtocol().hashCode(); + hash = (37 * hash) + MATCHED_PORT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedPortRange().hashCode(); + hash = (37 * hash) + VIP_FIELD_NUMBER; + hash = (53 * hash) + getVip().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine forwarding rule.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ForwardingRuleInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.class, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + matchedProtocol_ = ""; + matchedPortRange_ = ""; + vip_ = ""; + target_ = ""; + networkUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo build() { + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo result = + new com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.matchedProtocol_ = matchedProtocol_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.matchedPortRange_ = matchedPortRange_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.vip_ = vip_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.networkUri_ = networkUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMatchedProtocol().isEmpty()) { + matchedProtocol_ = other.matchedProtocol_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getMatchedPortRange().isEmpty()) { + matchedPortRange_ = other.matchedPortRange_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVip().isEmpty()) { + vip_ = other.vip_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + matchedProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + vip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + matchedPortRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 58: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object matchedProtocol_ = ""; + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedProtocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + matchedProtocol_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearMatchedProtocol() { + matchedProtocol_ = getDefaultInstance().getMatchedProtocol(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The bytes for matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + matchedProtocol_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object matchedPortRange_ = ""; + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedPortRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + matchedPortRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return This builder for chaining. + */ + public Builder clearMatchedPortRange() { + matchedPortRange_ = getDefaultInstance().getMatchedPortRange(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The bytes for matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + matchedPortRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object vip_ = ""; + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The vip. + */ + public java.lang.String getVip() { + java.lang.Object ref = vip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The vip to set. + * @return This builder for chaining. + */ + public Builder setVip(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vip_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return This builder for chaining. + */ + public Builder clearVip() { + vip_ = getDefaultInstance().getVip(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The bytes for vip to set. + * @return This builder for chaining. + */ + public Builder setVipBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vip_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) + private static final com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardingRuleInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java new file mode 100644 index 00000000..6523c2f4 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface ForwardingRuleInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + java.lang.String getMatchedProtocol(); + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + com.google.protobuf.ByteString getMatchedProtocolBytes(); + + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + java.lang.String getMatchedPortRange(); + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + com.google.protobuf.ByteString getMatchedPortRangeBytes(); + + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + java.lang.String getVip(); + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + com.google.protobuf.ByteString getVipBytes(); + + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfo.java new file mode 100644 index 00000000..deba1403 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfo.java @@ -0,0 +1,1178 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+ * cluster master.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.GKEMasterInfo} + */ +public final class GKEMasterInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.GKEMasterInfo) + GKEMasterInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GKEMasterInfo.newBuilder() to construct. + private GKEMasterInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GKEMasterInfo() { + clusterUri_ = ""; + clusterNetworkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GKEMasterInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.class, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder.class); + } + + public static final int CLUSTER_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterUri_ = ""; + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + @java.lang.Override + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_NETWORK_URI_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterNetworkUri_ = ""; + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + @java.lang.Override + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object internalIp_ = ""; + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIp_ = ""; + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterNetworkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterNetworkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterNetworkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterNetworkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.GKEMasterInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo other = + (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) obj; + + if (!getClusterUri().equals(other.getClusterUri())) return false; + if (!getClusterNetworkUri().equals(other.getClusterNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUSTER_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterUri().hashCode(); + hash = (37 * hash) + CLUSTER_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+   * cluster master.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.GKEMasterInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.GKEMasterInfo) + com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.class, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clusterUri_ = ""; + clusterNetworkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo build() { + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo result = + new com.google.events.cloud.networkmanagement.v1.GKEMasterInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.GKEMasterInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clusterUri_ = clusterUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterNetworkUri_ = clusterNetworkUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.internalIp_ = internalIp_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalIp_ = externalIp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.GKEMasterInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance()) + return this; + if (!other.getClusterUri().isEmpty()) { + clusterUri_ = other.clusterUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClusterNetworkUri().isEmpty()) { + clusterNetworkUri_ = other.clusterNetworkUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + clusterUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 34: + { + clusterNetworkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: + { + internalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + externalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object clusterUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearClusterUri() { + clusterUri_ = getDefaultInstance().getClusterUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The bytes for clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clusterNetworkUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterNetworkUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearClusterNetworkUri() { + clusterNetworkUri_ = getDefaultInstance().getClusterNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The bytes for clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterNetworkUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + internalIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + internalIp_ = getDefaultInstance().getInternalIp(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + internalIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIp_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + externalIp_ = getDefaultInstance().getExternalIp(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIp_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.GKEMasterInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.GKEMasterInfo) + private static final com.google.events.cloud.networkmanagement.v1.GKEMasterInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.GKEMasterInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GKEMasterInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java new file mode 100644 index 00000000..54a5617b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface GKEMasterInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.GKEMasterInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + java.lang.String getClusterUri(); + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + com.google.protobuf.ByteString getClusterUriBytes(); + + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + java.lang.String getClusterNetworkUri(); + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + com.google.protobuf.ByteString getClusterNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfo.java new file mode 100644 index 00000000..2ecf5d96 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfo.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Details of a Google Service sending packets to a
+ * VPC network. Although the source IP might be a publicly routable address,
+ * some Google Services use special routes within Google production
+ * infrastructure to reach Compute Engine Instances.
+ * https://cloud.google.com/vpc/docs/routes#special_return_paths
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.GoogleServiceInfo} + */ +public final class GoogleServiceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.GoogleServiceInfo) + GoogleServiceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GoogleServiceInfo.newBuilder() to construct. + private GoogleServiceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleServiceInfo() { + sourceIp_ = ""; + googleServiceType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleServiceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.class, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder.class); + } + + /** + * + * + *
+   * Recognized type of a Google Service.
+   * 
+ * + * Protobuf enum {@code + * google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType} + */ + public enum GoogleServiceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified Google Service. Includes most of Google APIs and services.
+     * 
+ * + * GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + */ + GOOGLE_SERVICE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Identity aware proxy.
+     * https://cloud.google.com/iap/docs/using-tcp-forwarding
+     * 
+ * + * IAP = 1; + */ + IAP(1), + /** + * + * + *
+     * One of two services sharing IP ranges:
+     * * Load Balancer proxy
+     * * Centralized Health Check prober
+     * https://cloud.google.com/load-balancing/docs/firewall-rules
+     * 
+ * + * GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + */ + GFE_PROXY_OR_HEALTH_CHECK_PROBER(2), + /** + * + * + *
+     * Connectivity from Cloud DNS to forwarding targets or alternate name
+     * servers that use private routing.
+     * https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules
+     * https://cloud.google.com/dns/docs/policies#firewall-rules
+     * 
+ * + * CLOUD_DNS = 3; + */ + CLOUD_DNS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified Google Service. Includes most of Google APIs and services.
+     * 
+ * + * GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + */ + public static final int GOOGLE_SERVICE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Identity aware proxy.
+     * https://cloud.google.com/iap/docs/using-tcp-forwarding
+     * 
+ * + * IAP = 1; + */ + public static final int IAP_VALUE = 1; + /** + * + * + *
+     * One of two services sharing IP ranges:
+     * * Load Balancer proxy
+     * * Centralized Health Check prober
+     * https://cloud.google.com/load-balancing/docs/firewall-rules
+     * 
+ * + * GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + */ + public static final int GFE_PROXY_OR_HEALTH_CHECK_PROBER_VALUE = 2; + /** + * + * + *
+     * Connectivity from Cloud DNS to forwarding targets or alternate name
+     * servers that use private routing.
+     * https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules
+     * https://cloud.google.com/dns/docs/policies#firewall-rules
+     * 
+ * + * CLOUD_DNS = 3; + */ + public static final int CLOUD_DNS_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GoogleServiceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static GoogleServiceType forNumber(int value) { + switch (value) { + case 0: + return GOOGLE_SERVICE_TYPE_UNSPECIFIED; + case 1: + return IAP; + case 2: + return GFE_PROXY_OR_HEALTH_CHECK_PROBER; + case 3: + return CLOUD_DNS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GoogleServiceType findValueByNumber(int number) { + return GoogleServiceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoogleServiceType[] VALUES = values(); + + public static GoogleServiceType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GoogleServiceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType) + } + + public static final int SOURCE_IP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceIp_ = ""; + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + @java.lang.Override + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOOGLE_SERVICE_TYPE_FIELD_NUMBER = 2; + private int googleServiceType_ = 0; + /** + * + * + *
+   * Recognized type of a Google Service.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The enum numeric value on the wire for googleServiceType. + */ + @java.lang.Override + public int getGoogleServiceTypeValue() { + return googleServiceType_; + } + /** + * + * + *
+   * Recognized type of a Google Service.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The googleServiceType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + getGoogleServiceType() { + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType result = + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType.forNumber( + googleServiceType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceIp_); + } + if (googleServiceType_ + != com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + .GOOGLE_SERVICE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, googleServiceType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceIp_); + } + if (googleServiceType_ + != com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + .GOOGLE_SERVICE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, googleServiceType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo other = + (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) obj; + + if (!getSourceIp().equals(other.getSourceIp())) return false; + if (googleServiceType_ != other.googleServiceType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceIp().hashCode(); + hash = (37 * hash) + GOOGLE_SERVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + googleServiceType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo 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; + } + /** + * + * + *
+   * For display only. Details of a Google Service sending packets to a
+   * VPC network. Although the source IP might be a publicly routable address,
+   * some Google Services use special routes within Google production
+   * infrastructure to reach Compute Engine Instances.
+   * https://cloud.google.com/vpc/docs/routes#special_return_paths
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.GoogleServiceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.GoogleServiceInfo) + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.class, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceIp_ = ""; + googleServiceType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_GoogleServiceInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo build() { + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo result = + new com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sourceIp_ = sourceIp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.googleServiceType_ = googleServiceType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance()) + return this; + if (!other.getSourceIp().isEmpty()) { + sourceIp_ = other.sourceIp_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.googleServiceType_ != 0) { + setGoogleServiceTypeValue(other.getGoogleServiceTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sourceIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + googleServiceType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sourceIp_ = ""; + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceIp() { + sourceIp_ = getDefaultInstance().getSourceIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The bytes for sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int googleServiceType_ = 0; + /** + * + * + *
+     * Recognized type of a Google Service.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The enum numeric value on the wire for googleServiceType. + */ + @java.lang.Override + public int getGoogleServiceTypeValue() { + return googleServiceType_; + } + /** + * + * + *
+     * Recognized type of a Google Service.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @param value The enum numeric value on the wire for googleServiceType to set. + * @return This builder for chaining. + */ + public Builder setGoogleServiceTypeValue(int value) { + googleServiceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Recognized type of a Google Service.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The googleServiceType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + getGoogleServiceType() { + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType result = + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + .forNumber(googleServiceType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Recognized type of a Google Service.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @param value The googleServiceType to set. + * @return This builder for chaining. + */ + public Builder setGoogleServiceType( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + googleServiceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Recognized type of a Google Service.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearGoogleServiceType() { + bitField0_ = (bitField0_ & ~0x00000002); + googleServiceType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.GoogleServiceInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.GoogleServiceInfo) + private static final com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleServiceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfoOrBuilder.java new file mode 100644 index 00000000..7aac7fc4 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/GoogleServiceInfoOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface GoogleServiceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.GoogleServiceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + java.lang.String getSourceIp(); + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + com.google.protobuf.ByteString getSourceIpBytes(); + + /** + * + * + *
+   * Recognized type of a Google Service.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The enum numeric value on the wire for googleServiceType. + */ + int getGoogleServiceTypeValue(); + /** + * + * + *
+   * Recognized type of a Google Service.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * + * + * @return The googleServiceType. + */ + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + getGoogleServiceType(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfo.java new file mode 100644 index 00000000..eb5c6fc1 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfo.java @@ -0,0 +1,1999 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine instance.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.InstanceInfo} + */ +public final class InstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.InstanceInfo) + InstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceInfo.newBuilder() to construct. + private InstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceInfo() { + displayName_ = ""; + uri_ = ""; + interface_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.InstanceInfo.class, + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object interface_ = ""; + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object internalIp_ = ""; + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIp_ = ""; + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList networkTags_; + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkTags_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getNetworkTagsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.InstanceInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.InstanceInfo other = + (com.google.events.cloud.networkmanagement.v1.InstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.InstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine instance.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.InstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.InstanceInfo) + com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.InstanceInfo.class, + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.InstanceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + interface_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + serviceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo build() { + com.google.events.cloud.networkmanagement.v1.InstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.InstanceInfo result = + new com.google.events.cloud.networkmanagement.v1.InstanceInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.InstanceInfo result) { + if (((bitField0_ & 0x00000040) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.networkTags_ = networkTags_; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.InstanceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interface_ = interface_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.internalIp_ = internalIp_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.externalIp_ = externalIp_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.InstanceInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.InstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.InstanceInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + internalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + externalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 58 + case 66: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interface_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + interface_ = getDefaultInstance().getInterface(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interface_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + internalIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + internalIp_ = getDefaultInstance().getInternalIp(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + internalIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIp_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + externalIp_ = getDefaultInstance().getExternalIp(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIp_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000040; + } + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.InstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.InstanceInfo) + private static final com.google.events.cloud.networkmanagement.v1.InstanceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.InstanceInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.InstanceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java new file mode 100644 index 00000000..1d556ae7 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java @@ -0,0 +1,251 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface InstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.InstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); + + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackend.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackend.java new file mode 100644 index 00000000..f3a51187 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackend.java @@ -0,0 +1,1733 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a specific load balancer backend.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.LoadBalancerBackend} + */ +public final class LoadBalancerBackend extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.LoadBalancerBackend) + LoadBalancerBackendOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerBackend.newBuilder() to construct. + private LoadBalancerBackend(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerBackend() { + displayName_ = ""; + uri_ = ""; + healthCheckFirewallState_ = 0; + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerBackend(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.class, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder.class); + } + + /** + * + * + *
+   * State of a health check firewall configuration:
+   * 
+ * + * Protobuf enum {@code + * google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} + */ + public enum HealthCheckFirewallState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + CONFIGURED(1), + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + MISCONFIGURED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + public static final int CONFIGURED_VALUE = 1; + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + public static final int MISCONFIGURED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthCheckFirewallState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthCheckFirewallState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED; + case 1: + return CONFIGURED; + case 2: + return MISCONFIGURED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthCheckFirewallState findValueByNumber(int number) { + return HealthCheckFirewallState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HealthCheckFirewallState[] VALUES = values(); + + public static HealthCheckFirewallState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthCheckFirewallState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER = 3; + private int healthCheckFirewallState_ = 0; + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + .HealthCheckFirewallState.forNumber(healthCheckFirewallState_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + + public static final int HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (healthCheckFirewallState_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, healthCheckFirewallState_); + } + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, healthCheckAllowingFirewallRules_.getRaw(i)); + } + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, healthCheckBlockingFirewallRules_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (healthCheckFirewallState_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, healthCheckFirewallState_); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckAllowingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckAllowingFirewallRulesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckBlockingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckBlockingFirewallRulesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend other = + (com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (healthCheckFirewallState_ != other.healthCheckFirewallState_) return false; + if (!getHealthCheckAllowingFirewallRulesList() + .equals(other.getHealthCheckAllowingFirewallRulesList())) return false; + if (!getHealthCheckBlockingFirewallRulesList() + .equals(other.getHealthCheckBlockingFirewallRulesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthCheckFirewallState_; + if (getHealthCheckAllowingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckAllowingFirewallRulesList().hashCode(); + } + if (getHealthCheckBlockingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckBlockingFirewallRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a specific load balancer backend.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.LoadBalancerBackend} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.LoadBalancerBackend) + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.class, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + healthCheckFirewallState_ = 0; + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend build() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend buildPartial() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend result = + new com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend result) { + if (((bitField0_ & 0x00000008) != 0)) { + healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_; + if (((bitField0_ & 0x00000010) != 0)) { + healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.healthCheckFirewallState_ = healthCheckFirewallState_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend other) { + if (other + == com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.healthCheckFirewallState_ != 0) { + setHealthCheckFirewallStateValue(other.getHealthCheckFirewallStateValue()); + } + if (!other.healthCheckAllowingFirewallRules_.isEmpty()) { + if (healthCheckAllowingFirewallRules_.isEmpty()) { + healthCheckAllowingFirewallRules_ = other.healthCheckAllowingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.addAll(other.healthCheckAllowingFirewallRules_); + } + onChanged(); + } + if (!other.healthCheckBlockingFirewallRules_.isEmpty()) { + if (healthCheckBlockingFirewallRules_.isEmpty()) { + healthCheckBlockingFirewallRules_ = other.healthCheckBlockingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.addAll(other.healthCheckBlockingFirewallRules_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + healthCheckFirewallState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int healthCheckFirewallState_ = 0; + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The enum numeric value on the wire for healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallStateValue(int value) { + healthCheckFirewallState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + .HealthCheckFirewallState.forNumber(healthCheckFirewallState_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + .HealthCheckFirewallState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallState( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + healthCheckFirewallState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckFirewallState() { + bitField0_ = (bitField0_ & ~0x00000004); + healthCheckFirewallState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckAllowingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + healthCheckAllowingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckAllowingFirewallRules_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index to set the value at. + * @param value The healthCheckAllowingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckAllowingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param values The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckAllowingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckAllowingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckAllowingFirewallRules() { + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The bytes of the healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckBlockingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + healthCheckBlockingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckBlockingFirewallRules_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index to set the value at. + * @param value The healthCheckBlockingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckBlockingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param values The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckBlockingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckBlockingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckBlockingFirewallRules() { + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The bytes of the healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.LoadBalancerBackend) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.LoadBalancerBackend) + private static final com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend(); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerBackend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java new file mode 100644 index 00000000..c52e70c5 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface LoadBalancerBackendOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.LoadBalancerBackend) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + int getHealthCheckFirewallStateValue(); + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState(); + + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + java.util.List getHealthCheckAllowingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + int getHealthCheckAllowingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + java.lang.String getHealthCheckAllowingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index); + + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + java.util.List getHealthCheckBlockingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + int getHealthCheckBlockingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + java.lang.String getHealthCheckBlockingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfo.java new file mode 100644 index 00000000..2bbb48f3 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfo.java @@ -0,0 +1,2121 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a load balancer.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.LoadBalancerInfo} + */ +public final class LoadBalancerInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.LoadBalancerInfo) + LoadBalancerInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerInfo.newBuilder() to construct. + private LoadBalancerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerInfo() { + loadBalancerType_ = 0; + healthCheckUri_ = ""; + backends_ = java.util.Collections.emptyList(); + backendType_ = 0; + backendUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.class, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder.class); + } + + /** + * + * + *
+   * The type definition for a load balancer:
+   * 
+ * + * Protobuf enum {@code + * google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} + */ + public enum LoadBalancerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + LOAD_BALANCER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + INTERNAL_TCP_UDP(1), + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + NETWORK_TCP_UDP(2), + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + HTTP_PROXY(3), + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + TCP_PROXY(4), + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + SSL_PROXY(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + public static final int LOAD_BALANCER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + public static final int INTERNAL_TCP_UDP_VALUE = 1; + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + public static final int NETWORK_TCP_UDP_VALUE = 2; + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + public static final int HTTP_PROXY_VALUE = 3; + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + public static final int TCP_PROXY_VALUE = 4; + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + public static final int SSL_PROXY_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LoadBalancerType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LoadBalancerType forNumber(int value) { + switch (value) { + case 0: + return LOAD_BALANCER_TYPE_UNSPECIFIED; + case 1: + return INTERNAL_TCP_UDP; + case 2: + return NETWORK_TCP_UDP; + case 3: + return HTTP_PROXY; + case 4: + return TCP_PROXY; + case 5: + return SSL_PROXY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LoadBalancerType findValueByNumber(int number) { + return LoadBalancerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LoadBalancerType[] VALUES = values(); + + public static LoadBalancerType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LoadBalancerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType) + } + + /** + * + * + *
+   * The type definition for a load balancer backend configuration:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} + */ + public enum BackendType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + BACKEND_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + BACKEND_SERVICE(1), + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + TARGET_POOL(2), + /** + * + * + *
+     * Target Instance as the load balancer's backend.
+     * 
+ * + * TARGET_INSTANCE = 3; + */ + TARGET_INSTANCE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKEND_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + public static final int BACKEND_SERVICE_VALUE = 1; + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + public static final int TARGET_POOL_VALUE = 2; + /** + * + * + *
+     * Target Instance as the load balancer's backend.
+     * 
+ * + * TARGET_INSTANCE = 3; + */ + public static final int TARGET_INSTANCE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackendType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BackendType forNumber(int value) { + switch (value) { + case 0: + return BACKEND_TYPE_UNSPECIFIED; + case 1: + return BACKEND_SERVICE; + case 2: + return TARGET_POOL; + case 3: + return TARGET_INSTANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BackendType findValueByNumber(int number) { + return BackendType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final BackendType[] VALUES = values(); + + public static BackendType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BackendType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType) + } + + public static final int LOAD_BALANCER_TYPE_FIELD_NUMBER = 1; + private int loadBalancerType_ = 0; + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.forNumber( + loadBalancerType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object healthCheckUri_ = ""; + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + @java.lang.Override + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthCheckUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKENDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + backends_; + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + @java.lang.Override + public java.util.List + getBackendsList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + @java.lang.Override + public int getBackendsCount() { + return backends_.size(); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index) { + return backends_.get(index); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder + getBackendsOrBuilder(int index) { + return backends_.get(index); + } + + public static final int BACKEND_TYPE_FIELD_NUMBER = 4; + private int backendType_ = 0; + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + getBackendType() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.forNumber( + backendType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + + public static final int BACKEND_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object backendUri_ = ""; + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + @java.lang.Override + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backendUri_ = s; + return s; + } + } + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (loadBalancerType_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, loadBalancerType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheckUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + output.writeMessage(3, backends_.get(i)); + } + if (backendType_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, backendType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, backendUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loadBalancerType_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, loadBalancerType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheckUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, backends_.get(i)); + } + if (backendType_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, backendType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, backendUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo other = + (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) obj; + + if (loadBalancerType_ != other.loadBalancerType_) return false; + if (!getHealthCheckUri().equals(other.getHealthCheckUri())) return false; + if (!getBackendsList().equals(other.getBackendsList())) return false; + if (backendType_ != other.backendType_) return false; + if (!getBackendUri().equals(other.getBackendUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOAD_BALANCER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + loadBalancerType_; + hash = (37 * hash) + HEALTH_CHECK_URI_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckUri().hashCode(); + if (getBackendsCount() > 0) { + hash = (37 * hash) + BACKENDS_FIELD_NUMBER; + hash = (53 * hash) + getBackendsList().hashCode(); + } + hash = (37 * hash) + BACKEND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backendType_; + hash = (37 * hash) + BACKEND_URI_FIELD_NUMBER; + hash = (53 * hash) + getBackendUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a load balancer.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.LoadBalancerInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.LoadBalancerInfo) + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.class, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + loadBalancerType_ = 0; + healthCheckUri_ = ""; + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + } else { + backends_ = null; + backendsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + backendType_ = 0; + backendUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo build() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo result = + new com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo result) { + if (backendsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + backends_ = java.util.Collections.unmodifiableList(backends_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.backends_ = backends_; + } else { + result.backends_ = backendsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.loadBalancerType_ = loadBalancerType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.healthCheckUri_ = healthCheckUri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backendType_ = backendType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backendUri_ = backendUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance()) + return this; + if (other.loadBalancerType_ != 0) { + setLoadBalancerTypeValue(other.getLoadBalancerTypeValue()); + } + if (!other.getHealthCheckUri().isEmpty()) { + healthCheckUri_ = other.healthCheckUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (backendsBuilder_ == null) { + if (!other.backends_.isEmpty()) { + if (backends_.isEmpty()) { + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBackendsIsMutable(); + backends_.addAll(other.backends_); + } + onChanged(); + } + } else { + if (!other.backends_.isEmpty()) { + if (backendsBuilder_.isEmpty()) { + backendsBuilder_.dispose(); + backendsBuilder_ = null; + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000004); + backendsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackendsFieldBuilder() + : null; + } else { + backendsBuilder_.addAllMessages(other.backends_); + } + } + } + if (other.backendType_ != 0) { + setBackendTypeValue(other.getBackendTypeValue()); + } + if (!other.getBackendUri().isEmpty()) { + backendUri_ = other.backendUri_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + loadBalancerType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + healthCheckUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend m = + input.readMessage( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.parser(), + extensionRegistry); + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(m); + } else { + backendsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + backendType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + backendUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int loadBalancerType_ = 0; + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The enum numeric value on the wire for loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerTypeValue(int value) { + loadBalancerType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.forNumber( + loadBalancerType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerType( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + loadBalancerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearLoadBalancerType() { + bitField0_ = (bitField0_ & ~0x00000001); + loadBalancerType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object healthCheckUri_ = ""; + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthCheckUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + healthCheckUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckUri() { + healthCheckUri_ = getDefaultInstance().getHealthCheckUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The bytes for healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + healthCheckUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + backends_ = java.util.Collections.emptyList(); + + private void ensureBackendsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + backends_ = + new java.util.ArrayList< + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend>(backends_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + backendsBuilder_; + + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List + getBackendsList() { + if (backendsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backends_); + } else { + return backendsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public int getBackendsCount() { + if (backendsBuilder_ == null) { + return backends_.size(); + } else { + return backendsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder setBackends( + int index, com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.set(index, value); + onChanged(); + } else { + backendsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder setBackends( + int index, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.set(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(value); + onChanged(); + } else { + backendsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + int index, com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(index, value); + onChanged(); + } else { + backendsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + int index, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder addAllBackends( + java.lang.Iterable< + ? extends com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend> + values) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backends_); + onChanged(); + } else { + backendsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder clearBackends() { + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + backendsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public Builder removeBackends(int index) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.remove(index); + onChanged(); + } else { + backendsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder + getBackendsBuilder(int index) { + return getBackendsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder + getBackendsOrBuilder(int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List< + ? extends com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + if (backendsBuilder_ != null) { + return backendsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backends_); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder + addBackendsBuilder() { + return getBackendsFieldBuilder() + .addBuilder( + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + .getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder + addBackendsBuilder(int index) { + return getBackendsFieldBuilder() + .addBuilder( + index, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend + .getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List + getBackendsBuilderList() { + return getBackendsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsFieldBuilder() { + if (backendsBuilder_ == null) { + backendsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder>( + backends_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + backends_ = null; + } + return backendsBuilder_; + } + + private int backendType_ = 0; + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The enum numeric value on the wire for backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendTypeValue(int value) { + backendType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + getBackendType() { + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType result = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.forNumber( + backendType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendType( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + backendType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearBackendType() { + bitField0_ = (bitField0_ & ~0x00000008); + backendType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backendUri_ = ""; + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backendUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backendUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearBackendUri() { + backendUri_ = getDefaultInstance().getBackendUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The bytes for backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backendUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.LoadBalancerInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.LoadBalancerInfo) + private static final com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java new file mode 100644 index 00000000..4ba9771e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface LoadBalancerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.LoadBalancerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + int getLoadBalancerTypeValue(); + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType(); + + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + java.lang.String getHealthCheckUri(); + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + com.google.protobuf.ByteString getHealthCheckUriBytes(); + + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + java.util.List + getBackendsList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + int getBackendsCount(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + java.util.List< + ? extends com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder getBackendsOrBuilder( + int index); + + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + int getBackendTypeValue(); + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType getBackendType(); + + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + java.lang.String getBackendUri(); + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + com.google.protobuf.ByteString getBackendUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfo.java new file mode 100644 index 00000000..8837e18d --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfo.java @@ -0,0 +1,994 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine network.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.NetworkInfo} + */ +public final class NetworkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.NetworkInfo) + NetworkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkInfo.newBuilder() to construct. + private NetworkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkInfo() { + displayName_ = ""; + uri_ = ""; + matchedIpRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.NetworkInfo.class, + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_IP_RANGE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object matchedIpRange_ = ""; + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + @java.lang.Override + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedIpRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, matchedIpRange_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchedIpRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, matchedIpRange_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.NetworkInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.NetworkInfo other = + (com.google.events.cloud.networkmanagement.v1.NetworkInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedIpRange().equals(other.getMatchedIpRange())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedIpRange().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.NetworkInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine network.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.NetworkInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.NetworkInfo) + com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.NetworkInfo.class, + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.NetworkInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + matchedIpRange_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo build() { + com.google.events.cloud.networkmanagement.v1.NetworkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.NetworkInfo result = + new com.google.events.cloud.networkmanagement.v1.NetworkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.NetworkInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.matchedIpRange_ = matchedIpRange_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.NetworkInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.NetworkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.NetworkInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMatchedIpRange().isEmpty()) { + matchedIpRange_ = other.matchedIpRange_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + matchedIpRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object matchedIpRange_ = ""; + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + matchedIpRange_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return This builder for chaining. + */ + public Builder clearMatchedIpRange() { + matchedIpRange_ = getDefaultInstance().getMatchedIpRange(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The bytes for matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + matchedIpRange_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.NetworkInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.NetworkInfo) + private static final com.google.events.cloud.networkmanagement.v1.NetworkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.NetworkInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.NetworkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java new file mode 100644 index 00000000..b1e02ce5 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface NetworkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.NetworkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + java.lang.String getMatchedIpRange(); + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + com.google.protobuf.ByteString getMatchedIpRangeBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetails.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetails.java new file mode 100644 index 00000000..44bd10f1 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetails.java @@ -0,0 +1,1901 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Results of the configuration analysis from the last run of the test.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ReachabilityDetails} + */ +public final class ReachabilityDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.ReachabilityDetails) + ReachabilityDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReachabilityDetails.newBuilder() to construct. + private ReachabilityDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReachabilityDetails() { + result_ = 0; + traces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReachabilityDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.class, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder.class); + } + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result} + */ + public enum Result implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + REACHABLE(1), + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + UNREACHABLE(2), + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + AMBIGUOUS(4), + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + UNDETERMINED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + public static final int REACHABLE_VALUE = 1; + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + public static final int UNREACHABLE_VALUE = 2; + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + public static final int AMBIGUOUS_VALUE = 4; + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + public static final int UNDETERMINED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Result valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Result forNumber(int value) { + switch (value) { + case 0: + return RESULT_UNSPECIFIED; + case 1: + return REACHABLE; + case 2: + return UNREACHABLE; + case 4: + return AMBIGUOUS; + case 5: + return UNDETERMINED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Result findValueByNumber(int number) { + return Result.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Result[] VALUES = values(); + + public static Result valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result) + } + + public static final int RESULT_FIELD_NUMBER = 1; + private int result_ = 0; + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult() { + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result.forNumber(result_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + + public static final int VERIFY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp verifyTime_; + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + @java.lang.Override + public boolean hasVerifyTime() { + return verifyTime_ != null; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVerifyTime() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + + public static final int ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status error_; + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int TRACES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List traces_; + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List getTracesList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List + getTracesOrBuilderList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public int getTracesCount() { + return traces_.size(); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Trace getTraces(int index) { + return traces_.get(index); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder(int index) { + return traces_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (result_ + != com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result + .RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, result_); + } + if (verifyTime_ != null) { + output.writeMessage(2, getVerifyTime()); + } + if (error_ != null) { + output.writeMessage(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + output.writeMessage(5, traces_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ + != com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result + .RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); + } + if (verifyTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVerifyTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, traces_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.ReachabilityDetails)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails other = + (com.google.events.cloud.networkmanagement.v1.ReachabilityDetails) obj; + + if (result_ != other.result_) return false; + if (hasVerifyTime() != other.hasVerifyTime()) return false; + if (hasVerifyTime()) { + if (!getVerifyTime().equals(other.getVerifyTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!getTracesList().equals(other.getTracesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasVerifyTime()) { + hash = (37 * hash) + VERIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVerifyTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (getTracesCount() > 0) { + hash = (37 * hash) + TRACES_FIELD_NUMBER; + hash = (53 * hash) + getTracesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails 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; + } + /** + * + * + *
+   * Results of the configuration analysis from the last run of the test.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.ReachabilityDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.ReachabilityDetails) + com.google.events.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.class, + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + result_ = 0; + verifyTime_ = null; + if (verifyTimeBuilder_ != null) { + verifyTimeBuilder_.dispose(); + verifyTimeBuilder_ = null; + } + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + } else { + traces_ = null; + tracesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails build() { + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails buildPartial() { + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails result = + new com.google.events.cloud.networkmanagement.v1.ReachabilityDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails result) { + if (tracesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.traces_ = traces_; + } else { + result.traces_ = tracesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.result_ = result_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.verifyTime_ = verifyTimeBuilder_ == null ? verifyTime_ : verifyTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.ReachabilityDetails) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.ReachabilityDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails other) { + if (other + == com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance()) + return this; + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasVerifyTime()) { + mergeVerifyTime(other.getVerifyTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (tracesBuilder_ == null) { + if (!other.traces_.isEmpty()) { + if (traces_.isEmpty()) { + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTracesIsMutable(); + traces_.addAll(other.traces_); + } + onChanged(); + } + } else { + if (!other.traces_.isEmpty()) { + if (tracesBuilder_.isEmpty()) { + tracesBuilder_.dispose(); + tracesBuilder_ = null; + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000008); + tracesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTracesFieldBuilder() + : null; + } else { + tracesBuilder_.addAllMessages(other.traces_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + result_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getVerifyTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + com.google.events.cloud.networkmanagement.v1.Trace m = + input.readMessage( + com.google.events.cloud.networkmanagement.v1.Trace.parser(), + extensionRegistry); + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(m); + } else { + tracesBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int result_ = 0; + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + result_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult() { + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result.forNumber( + result_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return This builder for chaining. + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000001); + result_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp verifyTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + verifyTimeBuilder_; + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + public boolean hasVerifyTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + public com.google.protobuf.Timestamp getVerifyTime() { + if (verifyTimeBuilder_ == null) { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } else { + return verifyTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyTime_ = value; + } else { + verifyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (verifyTimeBuilder_ == null) { + verifyTime_ = builderForValue.build(); + } else { + verifyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder mergeVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && verifyTime_ != null + && verifyTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getVerifyTimeBuilder().mergeFrom(value); + } else { + verifyTime_ = value; + } + } else { + verifyTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder clearVerifyTime() { + bitField0_ = (bitField0_ & ~0x00000002); + verifyTime_ = null; + if (verifyTimeBuilder_ != null) { + verifyTimeBuilder_.dispose(); + verifyTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getVerifyTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVerifyTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + if (verifyTimeBuilder_ != null) { + return verifyTimeBuilder_.getMessageOrBuilder(); + } else { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVerifyTimeFieldBuilder() { + if (verifyTimeBuilder_ == null) { + verifyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVerifyTime(), getParentForChildren(), isClean()); + verifyTime_ = null; + } + return verifyTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000004); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.util.List traces_ = + java.util.Collections.emptyList(); + + private void ensureTracesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + traces_ = + new java.util.ArrayList(traces_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Trace, + com.google.events.cloud.networkmanagement.v1.Trace.Builder, + com.google.events.cloud.networkmanagement.v1.TraceOrBuilder> + tracesBuilder_; + + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List getTracesList() { + if (tracesBuilder_ == null) { + return java.util.Collections.unmodifiableList(traces_); + } else { + return tracesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public int getTracesCount() { + if (tracesBuilder_ == null) { + return traces_.size(); + } else { + return tracesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.events.cloud.networkmanagement.v1.Trace getTraces(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder setTraces(int index, com.google.events.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.set(index, value); + onChanged(); + } else { + tracesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder setTraces( + int index, com.google.events.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.set(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces(com.google.events.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(value); + onChanged(); + } else { + tracesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces(int index, com.google.events.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(index, value); + onChanged(); + } else { + tracesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces( + com.google.events.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces( + int index, com.google.events.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addAllTraces( + java.lang.Iterable values) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, traces_); + onChanged(); + } else { + tracesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder clearTraces() { + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + tracesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder removeTraces(int index) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.remove(index); + onChanged(); + } else { + tracesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.events.cloud.networkmanagement.v1.Trace.Builder getTracesBuilder(int index) { + return getTracesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.events.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder( + int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List + getTracesOrBuilderList() { + if (tracesBuilder_ != null) { + return tracesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(traces_); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.events.cloud.networkmanagement.v1.Trace.Builder addTracesBuilder() { + return getTracesFieldBuilder() + .addBuilder(com.google.events.cloud.networkmanagement.v1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.events.cloud.networkmanagement.v1.Trace.Builder addTracesBuilder(int index) { + return getTracesFieldBuilder() + .addBuilder( + index, com.google.events.cloud.networkmanagement.v1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List + getTracesBuilderList() { + return getTracesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Trace, + com.google.events.cloud.networkmanagement.v1.Trace.Builder, + com.google.events.cloud.networkmanagement.v1.TraceOrBuilder> + getTracesFieldBuilder() { + if (tracesBuilder_ == null) { + tracesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Trace, + com.google.events.cloud.networkmanagement.v1.Trace.Builder, + com.google.events.cloud.networkmanagement.v1.TraceOrBuilder>( + traces_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + traces_ = null; + } + return tracesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.ReachabilityDetails) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.ReachabilityDetails) + private static final com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.ReachabilityDetails(); + } + + public static com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReachabilityDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ReachabilityDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java new file mode 100644 index 00000000..71905cbc --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface ReachabilityDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.ReachabilityDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + com.google.events.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult(); + + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + boolean hasVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + com.google.protobuf.Timestamp getVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder(); + + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + java.util.List getTracesList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + com.google.events.cloud.networkmanagement.v1.Trace getTraces(int index); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + int getTracesCount(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + java.util.List + getTracesOrBuilderList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Trace traces = 5; + */ + com.google.events.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfo.java new file mode 100644 index 00000000..e9322b9a --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfo.java @@ -0,0 +1,3709 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine route.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.RouteInfo} + */ +public final class RouteInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.RouteInfo) + RouteInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouteInfo.newBuilder() to construct. + private RouteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouteInfo() { + routeType_ = 0; + nextHopType_ = 0; + displayName_ = ""; + uri_ = ""; + destIpRange_ = ""; + nextHop_ = ""; + networkUri_ = ""; + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + srcIpRange_ = ""; + destPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + srcPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.RouteInfo.class, + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder.class); + } + + /** + * + * + *
+   * Type of route:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.RouteInfo.RouteType} + */ + public enum RouteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + ROUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + SUBNET(1), + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + STATIC(2), + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + PEERING_SUBNET(4), + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + PEERING_STATIC(5), + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + PEERING_DYNAMIC(6), + /** + * + * + *
+     * Policy based route.
+     * 
+ * + * POLICY_BASED = 7; + */ + POLICY_BASED(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + public static final int SUBNET_VALUE = 1; + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + public static final int STATIC_VALUE = 2; + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + public static final int PEERING_SUBNET_VALUE = 4; + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + public static final int PEERING_STATIC_VALUE = 5; + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + public static final int PEERING_DYNAMIC_VALUE = 6; + /** + * + * + *
+     * Policy based route.
+     * 
+ * + * POLICY_BASED = 7; + */ + public static final int POLICY_BASED_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RouteType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RouteType forNumber(int value) { + switch (value) { + case 0: + return ROUTE_TYPE_UNSPECIFIED; + case 1: + return SUBNET; + case 2: + return STATIC; + case 3: + return DYNAMIC; + case 4: + return PEERING_SUBNET; + case 5: + return PEERING_STATIC; + case 6: + return PEERING_DYNAMIC; + case 7: + return POLICY_BASED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RouteType findValueByNumber(int number) { + return RouteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RouteType[] VALUES = values(); + + public static RouteType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RouteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.RouteInfo.RouteType) + } + + /** + * + * + *
+   * Type of next hop:
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType} + */ + public enum NextHopType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + NEXT_HOP_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + NEXT_HOP_IP(1), + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + NEXT_HOP_INSTANCE(2), + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + NEXT_HOP_NETWORK(3), + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + NEXT_HOP_PEERING(4), + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + NEXT_HOP_INTERCONNECT(5), + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + NEXT_HOP_VPN_TUNNEL(6), + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + NEXT_HOP_VPN_GATEWAY(7), + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + NEXT_HOP_INTERNET_GATEWAY(8), + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + NEXT_HOP_BLACKHOLE(9), + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + NEXT_HOP_ILB(10), + /** + * + * + *
+     * Next hop is a
+     * [router appliance
+     * instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).
+     * 
+ * + * NEXT_HOP_ROUTER_APPLIANCE = 11; + */ + NEXT_HOP_ROUTER_APPLIANCE(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + public static final int NEXT_HOP_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + public static final int NEXT_HOP_IP_VALUE = 1; + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + public static final int NEXT_HOP_INSTANCE_VALUE = 2; + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + public static final int NEXT_HOP_NETWORK_VALUE = 3; + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + public static final int NEXT_HOP_PEERING_VALUE = 4; + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + public static final int NEXT_HOP_INTERCONNECT_VALUE = 5; + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + public static final int NEXT_HOP_VPN_TUNNEL_VALUE = 6; + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + public static final int NEXT_HOP_VPN_GATEWAY_VALUE = 7; + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + public static final int NEXT_HOP_INTERNET_GATEWAY_VALUE = 8; + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + public static final int NEXT_HOP_BLACKHOLE_VALUE = 9; + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + public static final int NEXT_HOP_ILB_VALUE = 10; + /** + * + * + *
+     * Next hop is a
+     * [router appliance
+     * instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).
+     * 
+ * + * NEXT_HOP_ROUTER_APPLIANCE = 11; + */ + public static final int NEXT_HOP_ROUTER_APPLIANCE_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NextHopType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NextHopType forNumber(int value) { + switch (value) { + case 0: + return NEXT_HOP_TYPE_UNSPECIFIED; + case 1: + return NEXT_HOP_IP; + case 2: + return NEXT_HOP_INSTANCE; + case 3: + return NEXT_HOP_NETWORK; + case 4: + return NEXT_HOP_PEERING; + case 5: + return NEXT_HOP_INTERCONNECT; + case 6: + return NEXT_HOP_VPN_TUNNEL; + case 7: + return NEXT_HOP_VPN_GATEWAY; + case 8: + return NEXT_HOP_INTERNET_GATEWAY; + case 9: + return NEXT_HOP_BLACKHOLE; + case 10: + return NEXT_HOP_ILB; + case 11: + return NEXT_HOP_ROUTER_APPLIANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NextHopType findValueByNumber(int number) { + return NextHopType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NextHopType[] VALUES = values(); + + public static NextHopType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NextHopType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType) + } + + public static final int ROUTE_TYPE_FIELD_NUMBER = 8; + private int routeType_ = 0; + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType() { + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType result = + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.forNumber(routeType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + + public static final int NEXT_HOP_TYPE_FIELD_NUMBER = 9; + private int nextHopType_ = 0; + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType() { + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType result = + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType.forNumber(nextHopType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEST_IP_RANGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object destIpRange_ = ""; + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + @java.lang.Override + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_HOP_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextHop_ = ""; + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + @java.lang.Override + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextHop_ = s; + return s; + } + } + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 6; + private int priority_ = 0; + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int INSTANCE_TAGS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList instanceTags_; + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_; + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.getByteString(index); + } + + public static final int SRC_IP_RANGE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object srcIpRange_ = ""; + /** + * + * + *
+   * Source IP address range of the route. Policy based routes only.
+   * 
+ * + * string src_ip_range = 10; + * + * @return The srcIpRange. + */ + @java.lang.Override + public java.lang.String getSrcIpRange() { + java.lang.Object ref = srcIpRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address range of the route. Policy based routes only.
+   * 
+ * + * string src_ip_range = 10; + * + * @return The bytes for srcIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcIpRangeBytes() { + java.lang.Object ref = srcIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEST_PORT_RANGES_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList destPortRanges_; + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return A list containing the destPortRanges. + */ + public com.google.protobuf.ProtocolStringList getDestPortRangesList() { + return destPortRanges_; + } + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return The count of destPortRanges. + */ + public int getDestPortRangesCount() { + return destPortRanges_.size(); + } + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the element to return. + * @return The destPortRanges at the given index. + */ + public java.lang.String getDestPortRanges(int index) { + return destPortRanges_.get(index); + } + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the value to return. + * @return The bytes of the destPortRanges at the given index. + */ + public com.google.protobuf.ByteString getDestPortRangesBytes(int index) { + return destPortRanges_.getByteString(index); + } + + public static final int SRC_PORT_RANGES_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList srcPortRanges_; + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @return A list containing the srcPortRanges. + */ + public com.google.protobuf.ProtocolStringList getSrcPortRangesList() { + return srcPortRanges_; + } + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @return The count of srcPortRanges. + */ + public int getSrcPortRangesCount() { + return srcPortRanges_.size(); + } + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the element to return. + * @return The srcPortRanges at the given index. + */ + public java.lang.String getSrcPortRanges(int index) { + return srcPortRanges_.get(index); + } + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the value to return. + * @return The bytes of the srcPortRanges at the given index. + */ + public com.google.protobuf.ByteString getSrcPortRangesBytes(int index) { + return srcPortRanges_.getByteString(index); + } + + public static final int PROTOCOLS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList protocols_; + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList getProtocolsList() { + return protocols_; + } + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destIpRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destIpRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextHop_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, nextHop_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, networkUri_); + } + if (priority_ != 0) { + output.writeInt32(6, priority_); + } + for (int i = 0; i < instanceTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceTags_.getRaw(i)); + } + if (routeType_ + != com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, routeType_); + } + if (nextHopType_ + != com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType + .NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, nextHopType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, srcIpRange_); + } + for (int i = 0; i < destPortRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, destPortRanges_.getRaw(i)); + } + for (int i = 0; i < srcPortRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, srcPortRanges_.getRaw(i)); + } + for (int i = 0; i < protocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, protocols_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destIpRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destIpRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextHop_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, nextHop_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, networkUri_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, priority_); + } + { + int dataSize = 0; + for (int i = 0; i < instanceTags_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceTagsList().size(); + } + if (routeType_ + != com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, routeType_); + } + if (nextHopType_ + != com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType + .NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, nextHopType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, srcIpRange_); + } + { + int dataSize = 0; + for (int i = 0; i < destPortRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(destPortRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getDestPortRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < srcPortRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(srcPortRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getSrcPortRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < protocols_.size(); i++) { + dataSize += computeStringSizeNoTag(protocols_.getRaw(i)); + } + size += dataSize; + size += 1 * getProtocolsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.RouteInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.RouteInfo other = + (com.google.events.cloud.networkmanagement.v1.RouteInfo) obj; + + if (routeType_ != other.routeType_) return false; + if (nextHopType_ != other.nextHopType_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDestIpRange().equals(other.getDestIpRange())) return false; + if (!getNextHop().equals(other.getNextHop())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getInstanceTagsList().equals(other.getInstanceTagsList())) return false; + if (!getSrcIpRange().equals(other.getSrcIpRange())) return false; + if (!getDestPortRangesList().equals(other.getDestPortRangesList())) return false; + if (!getSrcPortRangesList().equals(other.getSrcPortRangesList())) return false; + if (!getProtocolsList().equals(other.getProtocolsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routeType_; + hash = (37 * hash) + NEXT_HOP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nextHopType_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DEST_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDestIpRange().hashCode(); + hash = (37 * hash) + NEXT_HOP_FIELD_NUMBER; + hash = (53 * hash) + getNextHop().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getInstanceTagsCount() > 0) { + hash = (37 * hash) + INSTANCE_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTagsList().hashCode(); + } + hash = (37 * hash) + SRC_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getSrcIpRange().hashCode(); + if (getDestPortRangesCount() > 0) { + hash = (37 * hash) + DEST_PORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDestPortRangesList().hashCode(); + } + if (getSrcPortRangesCount() > 0) { + hash = (37 * hash) + SRC_PORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getSrcPortRangesList().hashCode(); + } + if (getProtocolsCount() > 0) { + hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getProtocolsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.RouteInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine route.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.RouteInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.RouteInfo) + com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.RouteInfo.class, + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.RouteInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + routeType_ = 0; + nextHopType_ = 0; + displayName_ = ""; + uri_ = ""; + destIpRange_ = ""; + nextHop_ = ""; + networkUri_ = ""; + priority_ = 0; + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + srcIpRange_ = ""; + destPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + srcPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000800); + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo build() { + com.google.events.cloud.networkmanagement.v1.RouteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.RouteInfo result = + new com.google.events.cloud.networkmanagement.v1.RouteInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.RouteInfo result) { + if (((bitField0_ & 0x00000100) != 0)) { + instanceTags_ = instanceTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.instanceTags_ = instanceTags_; + if (((bitField0_ & 0x00000400) != 0)) { + destPortRanges_ = destPortRanges_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.destPortRanges_ = destPortRanges_; + if (((bitField0_ & 0x00000800) != 0)) { + srcPortRanges_ = srcPortRanges_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.srcPortRanges_ = srcPortRanges_; + if (((bitField0_ & 0x00001000) != 0)) { + protocols_ = protocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.protocols_ = protocols_; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.RouteInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.routeType_ = routeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextHopType_ = nextHopType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.destIpRange_ = destIpRange_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.nextHop_ = nextHop_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.srcIpRange_ = srcIpRange_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.RouteInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.RouteInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.RouteInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance()) + return this; + if (other.routeType_ != 0) { + setRouteTypeValue(other.getRouteTypeValue()); + } + if (other.nextHopType_ != 0) { + setNextHopTypeValue(other.getNextHopTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDestIpRange().isEmpty()) { + destIpRange_ = other.destIpRange_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getNextHop().isEmpty()) { + nextHop_ = other.nextHop_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.instanceTags_.isEmpty()) { + if (instanceTags_.isEmpty()) { + instanceTags_ = other.instanceTags_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureInstanceTagsIsMutable(); + instanceTags_.addAll(other.instanceTags_); + } + onChanged(); + } + if (!other.getSrcIpRange().isEmpty()) { + srcIpRange_ = other.srcIpRange_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.destPortRanges_.isEmpty()) { + if (destPortRanges_.isEmpty()) { + destPortRanges_ = other.destPortRanges_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureDestPortRangesIsMutable(); + destPortRanges_.addAll(other.destPortRanges_); + } + onChanged(); + } + if (!other.srcPortRanges_.isEmpty()) { + if (srcPortRanges_.isEmpty()) { + srcPortRanges_ = other.srcPortRanges_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureSrcPortRangesIsMutable(); + srcPortRanges_.addAll(other.srcPortRanges_); + } + onChanged(); + } + if (!other.protocols_.isEmpty()) { + if (protocols_.isEmpty()) { + protocols_ = other.protocols_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureProtocolsIsMutable(); + protocols_.addAll(other.protocols_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + destIpRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + nextHop_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 48: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 48 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstanceTagsIsMutable(); + instanceTags_.add(s); + break; + } // case 58 + case 64: + { + routeType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 64 + case 72: + { + nextHopType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 72 + case 82: + { + srcIpRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDestPortRangesIsMutable(); + destPortRanges_.add(s); + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSrcPortRangesIsMutable(); + srcPortRanges_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProtocolsIsMutable(); + protocols_.add(s); + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int routeType_ = 0; + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @param value The enum numeric value on the wire for routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteTypeValue(int value) { + routeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType() { + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType result = + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.forNumber(routeType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @param value The routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteType( + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + routeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearRouteType() { + bitField0_ = (bitField0_ & ~0x00000001); + routeType_ = 0; + onChanged(); + return this; + } + + private int nextHopType_ = 0; + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * + * @param value The enum numeric value on the wire for nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopTypeValue(int value) { + nextHopType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType() { + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType result = + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType.forNumber( + nextHopType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * + * @param value The nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopType( + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nextHopType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearNextHopType() { + bitField0_ = (bitField0_ & ~0x00000002); + nextHopType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object destIpRange_ = ""; + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destIpRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return This builder for chaining. + */ + public Builder clearDestIpRange() { + destIpRange_ = getDefaultInstance().getDestIpRange(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The bytes for destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destIpRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object nextHop_ = ""; + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextHop_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHop(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextHop_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return This builder for chaining. + */ + public Builder clearNextHop() { + nextHop_ = getDefaultInstance().getNextHop(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The bytes for nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHopBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextHop_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000080); + priority_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instanceTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceTagsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + instanceTags_ = new com.google.protobuf.LazyStringArrayList(instanceTags_); + bitField0_ |= 0x00000100; + } + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.getByteString(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index to set the value at. + * @param value The instanceTags to set. + * @return This builder for chaining. + */ + public Builder setInstanceTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param values The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceTags(java.lang.Iterable values) { + ensureInstanceTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTags() { + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The bytes of the instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object srcIpRange_ = ""; + /** + * + * + *
+     * Source IP address range of the route. Policy based routes only.
+     * 
+ * + * string src_ip_range = 10; + * + * @return The srcIpRange. + */ + public java.lang.String getSrcIpRange() { + java.lang.Object ref = srcIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address range of the route. Policy based routes only.
+     * 
+ * + * string src_ip_range = 10; + * + * @return The bytes for srcIpRange. + */ + public com.google.protobuf.ByteString getSrcIpRangeBytes() { + java.lang.Object ref = srcIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address range of the route. Policy based routes only.
+     * 
+ * + * string src_ip_range = 10; + * + * @param value The srcIpRange to set. + * @return This builder for chaining. + */ + public Builder setSrcIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcIpRange_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address range of the route. Policy based routes only.
+     * 
+ * + * string src_ip_range = 10; + * + * @return This builder for chaining. + */ + public Builder clearSrcIpRange() { + srcIpRange_ = getDefaultInstance().getSrcIpRange(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address range of the route. Policy based routes only.
+     * 
+ * + * string src_ip_range = 10; + * + * @param value The bytes for srcIpRange to set. + * @return This builder for chaining. + */ + public Builder setSrcIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcIpRange_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList destPortRanges_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDestPortRangesIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + destPortRanges_ = new com.google.protobuf.LazyStringArrayList(destPortRanges_); + bitField0_ |= 0x00000400; + } + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return A list containing the destPortRanges. + */ + public com.google.protobuf.ProtocolStringList getDestPortRangesList() { + return destPortRanges_.getUnmodifiableView(); + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return The count of destPortRanges. + */ + public int getDestPortRangesCount() { + return destPortRanges_.size(); + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the element to return. + * @return The destPortRanges at the given index. + */ + public java.lang.String getDestPortRanges(int index) { + return destPortRanges_.get(index); + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the value to return. + * @return The bytes of the destPortRanges at the given index. + */ + public com.google.protobuf.ByteString getDestPortRangesBytes(int index) { + return destPortRanges_.getByteString(index); + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index to set the value at. + * @param value The destPortRanges to set. + * @return This builder for chaining. + */ + public Builder setDestPortRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestPortRangesIsMutable(); + destPortRanges_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param value The destPortRanges to add. + * @return This builder for chaining. + */ + public Builder addDestPortRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestPortRangesIsMutable(); + destPortRanges_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param values The destPortRanges to add. + * @return This builder for chaining. + */ + public Builder addAllDestPortRanges(java.lang.Iterable values) { + ensureDestPortRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destPortRanges_); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return This builder for chaining. + */ + public Builder clearDestPortRanges() { + destPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param value The bytes of the destPortRanges to add. + * @return This builder for chaining. + */ + public Builder addDestPortRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDestPortRangesIsMutable(); + destPortRanges_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList srcPortRanges_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSrcPortRangesIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + srcPortRanges_ = new com.google.protobuf.LazyStringArrayList(srcPortRanges_); + bitField0_ |= 0x00000800; + } + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @return A list containing the srcPortRanges. + */ + public com.google.protobuf.ProtocolStringList getSrcPortRangesList() { + return srcPortRanges_.getUnmodifiableView(); + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @return The count of srcPortRanges. + */ + public int getSrcPortRangesCount() { + return srcPortRanges_.size(); + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the element to return. + * @return The srcPortRanges at the given index. + */ + public java.lang.String getSrcPortRanges(int index) { + return srcPortRanges_.get(index); + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the value to return. + * @return The bytes of the srcPortRanges at the given index. + */ + public com.google.protobuf.ByteString getSrcPortRangesBytes(int index) { + return srcPortRanges_.getByteString(index); + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index to set the value at. + * @param value The srcPortRanges to set. + * @return This builder for chaining. + */ + public Builder setSrcPortRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSrcPortRangesIsMutable(); + srcPortRanges_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param value The srcPortRanges to add. + * @return This builder for chaining. + */ + public Builder addSrcPortRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSrcPortRangesIsMutable(); + srcPortRanges_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param values The srcPortRanges to add. + * @return This builder for chaining. + */ + public Builder addAllSrcPortRanges(java.lang.Iterable values) { + ensureSrcPortRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, srcPortRanges_); + onChanged(); + return this; + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @return This builder for chaining. + */ + public Builder clearSrcPortRanges() { + srcPortRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Source port ranges of the route. Policy based routes only.
+     * 
+ * + * repeated string src_port_ranges = 12; + * + * @param value The bytes of the srcPortRanges to add. + * @return This builder for chaining. + */ + public Builder addSrcPortRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSrcPortRangesIsMutable(); + srcPortRanges_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList protocols_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureProtocolsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_); + bitField0_ |= 0x00001000; + } + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList getProtocolsList() { + return protocols_.getUnmodifiableView(); + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param index The index to set the value at. + * @param value The protocols to set. + * @return This builder for chaining. + */ + public Builder setProtocols(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param value The protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocols(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param values The protocols to add. + * @return This builder for chaining. + */ + public Builder addAllProtocols(java.lang.Iterable values) { + ensureProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, protocols_); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @return This builder for chaining. + */ + public Builder clearProtocols() { + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocols of the route. Policy based routes only.
+     * 
+ * + * repeated string protocols = 13; + * + * @param value The bytes of the protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.RouteInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.RouteInfo) + private static final com.google.events.cloud.networkmanagement.v1.RouteInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.RouteInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.RouteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfoOrBuilder.java new file mode 100644 index 00000000..75b8cbca --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/RouteInfoOrBuilder.java @@ -0,0 +1,448 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface RouteInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.RouteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + int getRouteTypeValue(); + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + com.google.events.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType(); + + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + int getNextHopTypeValue(); + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + com.google.events.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType(); + + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + java.lang.String getDestIpRange(); + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + com.google.protobuf.ByteString getDestIpRangeBytes(); + + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + java.lang.String getNextHop(); + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + com.google.protobuf.ByteString getNextHopBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + java.util.List getInstanceTagsList(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + int getInstanceTagsCount(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + java.lang.String getInstanceTags(int index); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + com.google.protobuf.ByteString getInstanceTagsBytes(int index); + + /** + * + * + *
+   * Source IP address range of the route. Policy based routes only.
+   * 
+ * + * string src_ip_range = 10; + * + * @return The srcIpRange. + */ + java.lang.String getSrcIpRange(); + /** + * + * + *
+   * Source IP address range of the route. Policy based routes only.
+   * 
+ * + * string src_ip_range = 10; + * + * @return The bytes for srcIpRange. + */ + com.google.protobuf.ByteString getSrcIpRangeBytes(); + + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return A list containing the destPortRanges. + */ + java.util.List getDestPortRangesList(); + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @return The count of destPortRanges. + */ + int getDestPortRangesCount(); + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the element to return. + * @return The destPortRanges at the given index. + */ + java.lang.String getDestPortRanges(int index); + /** + * + * + *
+   * Destination port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string dest_port_ranges = 11; + * + * @param index The index of the value to return. + * @return The bytes of the destPortRanges at the given index. + */ + com.google.protobuf.ByteString getDestPortRangesBytes(int index); + + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @return A list containing the srcPortRanges. + */ + java.util.List getSrcPortRangesList(); + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @return The count of srcPortRanges. + */ + int getSrcPortRangesCount(); + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the element to return. + * @return The srcPortRanges at the given index. + */ + java.lang.String getSrcPortRanges(int index); + /** + * + * + *
+   * Source port ranges of the route. Policy based routes only.
+   * 
+ * + * repeated string src_port_ranges = 12; + * + * @param index The index of the value to return. + * @return The bytes of the srcPortRanges at the given index. + */ + com.google.protobuf.ByteString getSrcPortRangesBytes(int index); + + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @return A list containing the protocols. + */ + java.util.List getProtocolsList(); + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @return The count of protocols. + */ + int getProtocolsCount(); + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + java.lang.String getProtocols(int index); + /** + * + * + *
+   * Protocols of the route. Policy based routes only.
+   * 
+ * + * repeated string protocols = 13; + * + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + com.google.protobuf.ByteString getProtocolsBytes(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Step.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Step.java new file mode 100644 index 00000000..c92c029e --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Step.java @@ -0,0 +1,7990 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * A simulated forwarding path is composed of multiple steps.
+ * Each step has a well-defined state and an associated configuration.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Step} + */ +public final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + description_ = ""; + state_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Step.class, + com.google.events.cloud.networkmanagement.v1.Step.Builder.class); + } + + /** + * + * + *
+   * Type of states that are defined in the network state machine.
+   * Each step in the packet trace is in a specific state.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.Step.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + START_FROM_INSTANCE(1), + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + START_FROM_INTERNET(2), + /** + * + * + *
+     * Initial state: packet originating from a Google service. Some Google
+     * services, such as health check probers or Identity Aware Proxy use
+     * special routes, outside VPC routing configuration to reach Compute Engine
+     * Instances.
+     * 
+ * + * START_FROM_GOOGLE_SERVICE = 27; + */ + START_FROM_GOOGLE_SERVICE(27), + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + START_FROM_PRIVATE_NETWORK(3), + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + START_FROM_GKE_MASTER(21), + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + START_FROM_CLOUD_SQL_INSTANCE(22), + /** + * + * + *
+     * Initial state: packet originating from a Cloud Function.
+     * A CloudFunctionInfo is populated with starting function information.
+     * 
+ * + * START_FROM_CLOUD_FUNCTION = 23; + */ + START_FROM_CLOUD_FUNCTION(23), + /** + * + * + *
+     * Initial state: packet originating from an App Engine service version.
+     * An AppEngineVersionInfo is populated with starting version information.
+     * 
+ * + * START_FROM_APP_ENGINE_VERSION = 25; + */ + START_FROM_APP_ENGINE_VERSION(25), + /** + * + * + *
+     * Initial state: packet originating from a Cloud Run revision.
+     * A CloudRunRevisionInfo is populated with starting revision information.
+     * 
+ * + * START_FROM_CLOUD_RUN_REVISION = 26; + */ + START_FROM_CLOUD_RUN_REVISION(26), + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + APPLY_INGRESS_FIREWALL_RULE(4), + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + APPLY_EGRESS_FIREWALL_RULE(5), + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + APPLY_ROUTE(6), + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + APPLY_FORWARDING_RULE(7), + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + SPOOFING_APPROVED(8), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + ARRIVE_AT_INSTANCE(9), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + ARRIVE_AT_INTERNAL_LOAD_BALANCER(10), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + ARRIVE_AT_EXTERNAL_LOAD_BALANCER(11), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + ARRIVE_AT_VPN_GATEWAY(12), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + ARRIVE_AT_VPN_TUNNEL(13), + /** + * + * + *
+     * Forwarding state: arriving at a VPC connector.
+     * 
+ * + * ARRIVE_AT_VPC_CONNECTOR = 24; + */ + ARRIVE_AT_VPC_CONNECTOR(24), + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + NAT(14), + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + PROXY_CONNECTION(15), + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + DELIVER(16), + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + DROP(17), + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + FORWARD(18), + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + ABORT(19), + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + VIEWER_PERMISSION_MISSING(20), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + public static final int START_FROM_INSTANCE_VALUE = 1; + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + public static final int START_FROM_INTERNET_VALUE = 2; + /** + * + * + *
+     * Initial state: packet originating from a Google service. Some Google
+     * services, such as health check probers or Identity Aware Proxy use
+     * special routes, outside VPC routing configuration to reach Compute Engine
+     * Instances.
+     * 
+ * + * START_FROM_GOOGLE_SERVICE = 27; + */ + public static final int START_FROM_GOOGLE_SERVICE_VALUE = 27; + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + public static final int START_FROM_PRIVATE_NETWORK_VALUE = 3; + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + public static final int START_FROM_GKE_MASTER_VALUE = 21; + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + public static final int START_FROM_CLOUD_SQL_INSTANCE_VALUE = 22; + /** + * + * + *
+     * Initial state: packet originating from a Cloud Function.
+     * A CloudFunctionInfo is populated with starting function information.
+     * 
+ * + * START_FROM_CLOUD_FUNCTION = 23; + */ + public static final int START_FROM_CLOUD_FUNCTION_VALUE = 23; + /** + * + * + *
+     * Initial state: packet originating from an App Engine service version.
+     * An AppEngineVersionInfo is populated with starting version information.
+     * 
+ * + * START_FROM_APP_ENGINE_VERSION = 25; + */ + public static final int START_FROM_APP_ENGINE_VERSION_VALUE = 25; + /** + * + * + *
+     * Initial state: packet originating from a Cloud Run revision.
+     * A CloudRunRevisionInfo is populated with starting revision information.
+     * 
+ * + * START_FROM_CLOUD_RUN_REVISION = 26; + */ + public static final int START_FROM_CLOUD_RUN_REVISION_VALUE = 26; + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + public static final int APPLY_INGRESS_FIREWALL_RULE_VALUE = 4; + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + public static final int APPLY_EGRESS_FIREWALL_RULE_VALUE = 5; + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + public static final int APPLY_ROUTE_VALUE = 6; + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + public static final int APPLY_FORWARDING_RULE_VALUE = 7; + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + public static final int SPOOFING_APPROVED_VALUE = 8; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + public static final int ARRIVE_AT_INSTANCE_VALUE = 9; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + public static final int ARRIVE_AT_INTERNAL_LOAD_BALANCER_VALUE = 10; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + public static final int ARRIVE_AT_EXTERNAL_LOAD_BALANCER_VALUE = 11; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + public static final int ARRIVE_AT_VPN_GATEWAY_VALUE = 12; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + public static final int ARRIVE_AT_VPN_TUNNEL_VALUE = 13; + /** + * + * + *
+     * Forwarding state: arriving at a VPC connector.
+     * 
+ * + * ARRIVE_AT_VPC_CONNECTOR = 24; + */ + public static final int ARRIVE_AT_VPC_CONNECTOR_VALUE = 24; + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + public static final int NAT_VALUE = 14; + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + public static final int PROXY_CONNECTION_VALUE = 15; + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + public static final int DELIVER_VALUE = 16; + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + public static final int DROP_VALUE = 17; + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + public static final int FORWARD_VALUE = 18; + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + public static final int ABORT_VALUE = 19; + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + public static final int VIEWER_PERMISSION_MISSING_VALUE = 20; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return START_FROM_INSTANCE; + case 2: + return START_FROM_INTERNET; + case 27: + return START_FROM_GOOGLE_SERVICE; + case 3: + return START_FROM_PRIVATE_NETWORK; + case 21: + return START_FROM_GKE_MASTER; + case 22: + return START_FROM_CLOUD_SQL_INSTANCE; + case 23: + return START_FROM_CLOUD_FUNCTION; + case 25: + return START_FROM_APP_ENGINE_VERSION; + case 26: + return START_FROM_CLOUD_RUN_REVISION; + case 4: + return APPLY_INGRESS_FIREWALL_RULE; + case 5: + return APPLY_EGRESS_FIREWALL_RULE; + case 6: + return APPLY_ROUTE; + case 7: + return APPLY_FORWARDING_RULE; + case 8: + return SPOOFING_APPROVED; + case 9: + return ARRIVE_AT_INSTANCE; + case 10: + return ARRIVE_AT_INTERNAL_LOAD_BALANCER; + case 11: + return ARRIVE_AT_EXTERNAL_LOAD_BALANCER; + case 12: + return ARRIVE_AT_VPN_GATEWAY; + case 13: + return ARRIVE_AT_VPN_TUNNEL; + case 24: + return ARRIVE_AT_VPC_CONNECTOR; + case 14: + return NAT; + case 15: + return PROXY_CONNECTION; + case 16: + return DELIVER; + case 17: + return DROP; + case 18: + return FORWARD; + case 19: + return ABORT; + case 20: + return VIEWER_PERMISSION_MISSING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Step.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.Step.State) + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public enum StepInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE(5), + FIREWALL(6), + ROUTE(7), + ENDPOINT(8), + GOOGLE_SERVICE(24), + FORWARDING_RULE(9), + VPN_GATEWAY(10), + VPN_TUNNEL(11), + VPC_CONNECTOR(21), + DELIVER(12), + FORWARD(13), + ABORT(14), + DROP(15), + LOAD_BALANCER(16), + NETWORK(17), + GKE_MASTER(18), + CLOUD_SQL_INSTANCE(19), + CLOUD_FUNCTION(20), + APP_ENGINE_VERSION(22), + CLOUD_RUN_REVISION(23), + STEPINFO_NOT_SET(0); + private final int value; + + private StepInfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StepInfoCase valueOf(int value) { + return forNumber(value); + } + + public static StepInfoCase forNumber(int value) { + switch (value) { + case 5: + return INSTANCE; + case 6: + return FIREWALL; + case 7: + return ROUTE; + case 8: + return ENDPOINT; + case 24: + return GOOGLE_SERVICE; + case 9: + return FORWARDING_RULE; + case 10: + return VPN_GATEWAY; + case 11: + return VPN_TUNNEL; + case 21: + return VPC_CONNECTOR; + case 12: + return DELIVER; + case 13: + return FORWARD; + case 14: + return ABORT; + case 15: + return DROP; + case 16: + return LOAD_BALANCER; + case 17: + return NETWORK; + case 18: + return GKE_MASTER; + case 19: + return CLOUD_SQL_INSTANCE; + case 20: + return CLOUD_FUNCTION; + case 22: + return APP_ENGINE_VERSION; + case 23: + return CLOUD_RUN_REVISION; + case 0: + return STEPINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step.State getState() { + com.google.events.cloud.networkmanagement.v1.Step.State result = + com.google.events.cloud.networkmanagement.v1.Step.State.forNumber(state_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.Step.State.UNRECOGNIZED + : result; + } + + public static final int CAUSES_DROP_FIELD_NUMBER = 3; + private boolean causesDrop_ = false; + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo getInstance() { + if (stepInfoCase_ == 5) { + return (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder getInstanceOrBuilder() { + if (stepInfoCase_ == 5) { + return (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + + public static final int FIREWALL_FIELD_NUMBER = 6; + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo getFirewall() { + if (stepInfoCase_ == 6) { + return (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder getFirewallOrBuilder() { + if (stepInfoCase_ == 6) { + return (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + + public static final int ROUTE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo getRoute() { + if (stepInfoCase_ == 7) { + return (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder() { + if (stepInfoCase_ == 7) { + return (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpoint() { + if (stepInfoCase_ == 8) { + return (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointOrBuilder() { + if (stepInfoCase_ == 8) { + return (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + + public static final int GOOGLE_SERVICE_FIELD_NUMBER = 24; + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return Whether the googleService field is set. + */ + @java.lang.Override + public boolean hasGoogleService() { + return stepInfoCase_ == 24; + } + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return The googleService. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo getGoogleService() { + if (stepInfoCase_ == 24) { + return (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder + getGoogleServiceOrBuilder() { + if (stepInfoCase_ == 24) { + return (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + + public static final int FORWARDING_RULE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule() { + if (stepInfoCase_ == 9) { + return (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if (stepInfoCase_ == 9) { + return (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + + public static final int VPN_GATEWAY_FIELD_NUMBER = 10; + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway() { + if (stepInfoCase_ == 10) { + return (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder + getVpnGatewayOrBuilder() { + if (stepInfoCase_ == 10) { + return (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + + public static final int VPN_TUNNEL_FIELD_NUMBER = 11; + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel() { + if (stepInfoCase_ == 11) { + return (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder + getVpnTunnelOrBuilder() { + if (stepInfoCase_ == 11) { + return (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + + public static final int VPC_CONNECTOR_FIELD_NUMBER = 21; + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return Whether the vpcConnector field is set. + */ + @java.lang.Override + public boolean hasVpcConnector() { + return stepInfoCase_ == 21; + } + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return The vpcConnector. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo getVpcConnector() { + if (stepInfoCase_ == 21) { + return (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder + getVpcConnectorOrBuilder() { + if (stepInfoCase_ == 21) { + return (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + + public static final int DELIVER_FIELD_NUMBER = 12; + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo getDeliver() { + if (stepInfoCase_ == 12) { + return (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if (stepInfoCase_ == 12) { + return (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + + public static final int FORWARD_FIELD_NUMBER = 13; + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo getForward() { + if (stepInfoCase_ == 13) { + return (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder() { + if (stepInfoCase_ == 13) { + return (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + + public static final int ABORT_FIELD_NUMBER = 14; + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo getAbort() { + if (stepInfoCase_ == 14) { + return (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder() { + if (stepInfoCase_ == 14) { + return (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + + public static final int DROP_FIELD_NUMBER = 15; + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo getDrop() { + if (stepInfoCase_ == 15) { + return (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder() { + if (stepInfoCase_ == 15) { + return (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + + public static final int LOAD_BALANCER_FIELD_NUMBER = 16; + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer() { + if (stepInfoCase_ == 16) { + return (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if (stepInfoCase_ == 16) { + return (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + + public static final int NETWORK_FIELD_NUMBER = 17; + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo getNetwork() { + if (stepInfoCase_ == 17) { + return (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if (stepInfoCase_ == 17) { + return (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + + public static final int GKE_MASTER_FIELD_NUMBER = 18; + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster() { + if (stepInfoCase_ == 18) { + return (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder + getGkeMasterOrBuilder() { + if (stepInfoCase_ == 18) { + return (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 19; + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (stepInfoCase_ == 19) { + return (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if (stepInfoCase_ == 19) { + return (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + public static final int CLOUD_FUNCTION_FIELD_NUMBER = 20; + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return Whether the cloudFunction field is set. + */ + @java.lang.Override + public boolean hasCloudFunction() { + return stepInfoCase_ == 20; + } + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return The cloudFunction. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo getCloudFunction() { + if (stepInfoCase_ == 20) { + return (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder + getCloudFunctionOrBuilder() { + if (stepInfoCase_ == 20) { + return (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + + public static final int APP_ENGINE_VERSION_FIELD_NUMBER = 22; + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return Whether the appEngineVersion field is set. + */ + @java.lang.Override + public boolean hasAppEngineVersion() { + return stepInfoCase_ == 22; + } + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return The appEngineVersion. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo getAppEngineVersion() { + if (stepInfoCase_ == 22) { + return (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder + getAppEngineVersionOrBuilder() { + if (stepInfoCase_ == 22) { + return (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.getDefaultInstance(); + } + + public static final int CLOUD_RUN_REVISION_FIELD_NUMBER = 23; + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return Whether the cloudRunRevision field is set. + */ + @java.lang.Override + public boolean hasCloudRunRevision() { + return stepInfoCase_ == 23; + } + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return The cloudRunRevision. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo getCloudRunRevision() { + if (stepInfoCase_ == 23) { + return (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder + getCloudRunRevisionOrBuilder() { + if (stepInfoCase_ == 23) { + return (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (state_ + != com.google.events.cloud.networkmanagement.v1.Step.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (causesDrop_ != false) { + output.writeBool(3, causesDrop_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, projectId_); + } + if (stepInfoCase_ == 5) { + output.writeMessage(5, (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + output.writeMessage(6, (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + output.writeMessage(7, (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + output.writeMessage(8, (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + output.writeMessage( + 9, (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + output.writeMessage( + 10, (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + output.writeMessage( + 11, (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + output.writeMessage(12, (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + output.writeMessage(13, (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + output.writeMessage(14, (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + output.writeMessage(15, (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + output.writeMessage( + 16, (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + output.writeMessage(17, (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + output.writeMessage( + 18, (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + output.writeMessage( + 19, (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 20) { + output.writeMessage( + 20, (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_); + } + if (stepInfoCase_ == 21) { + output.writeMessage( + 21, (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_); + } + if (stepInfoCase_ == 22) { + output.writeMessage( + 22, (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_); + } + if (stepInfoCase_ == 23) { + output.writeMessage( + 23, (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_); + } + if (stepInfoCase_ == 24) { + output.writeMessage( + 24, (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (state_ + != com.google.events.cloud.networkmanagement.v1.Step.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (causesDrop_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, causesDrop_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, projectId_); + } + if (stepInfoCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_); + } + if (stepInfoCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_); + } + if (stepInfoCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_); + } + if (stepInfoCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_); + } + if (stepInfoCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.Step)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Step other = + (com.google.events.cloud.networkmanagement.v1.Step) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (getCausesDrop() != other.getCausesDrop()) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getStepInfoCase().equals(other.getStepInfoCase())) return false; + switch (stepInfoCase_) { + case 5: + if (!getInstance().equals(other.getInstance())) return false; + break; + case 6: + if (!getFirewall().equals(other.getFirewall())) return false; + break; + case 7: + if (!getRoute().equals(other.getRoute())) return false; + break; + case 8: + if (!getEndpoint().equals(other.getEndpoint())) return false; + break; + case 24: + if (!getGoogleService().equals(other.getGoogleService())) return false; + break; + case 9: + if (!getForwardingRule().equals(other.getForwardingRule())) return false; + break; + case 10: + if (!getVpnGateway().equals(other.getVpnGateway())) return false; + break; + case 11: + if (!getVpnTunnel().equals(other.getVpnTunnel())) return false; + break; + case 21: + if (!getVpcConnector().equals(other.getVpcConnector())) return false; + break; + case 12: + if (!getDeliver().equals(other.getDeliver())) return false; + break; + case 13: + if (!getForward().equals(other.getForward())) return false; + break; + case 14: + if (!getAbort().equals(other.getAbort())) return false; + break; + case 15: + if (!getDrop().equals(other.getDrop())) return false; + break; + case 16: + if (!getLoadBalancer().equals(other.getLoadBalancer())) return false; + break; + case 17: + if (!getNetwork().equals(other.getNetwork())) return false; + break; + case 18: + if (!getGkeMaster().equals(other.getGkeMaster())) return false; + break; + case 19: + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + break; + case 20: + if (!getCloudFunction().equals(other.getCloudFunction())) return false; + break; + case 22: + if (!getAppEngineVersion().equals(other.getAppEngineVersion())) return false; + break; + case 23: + if (!getCloudRunRevision().equals(other.getCloudRunRevision())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CAUSES_DROP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCausesDrop()); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + switch (stepInfoCase_) { + case 5: + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + break; + case 6: + hash = (37 * hash) + FIREWALL_FIELD_NUMBER; + hash = (53 * hash) + getFirewall().hashCode(); + break; + case 7: + hash = (37 * hash) + ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getRoute().hashCode(); + break; + case 8: + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + break; + case 24: + hash = (37 * hash) + GOOGLE_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getGoogleService().hashCode(); + break; + case 9: + hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getForwardingRule().hashCode(); + break; + case 10: + hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getVpnGateway().hashCode(); + break; + case 11: + hash = (37 * hash) + VPN_TUNNEL_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnel().hashCode(); + break; + case 21: + hash = (37 * hash) + VPC_CONNECTOR_FIELD_NUMBER; + hash = (53 * hash) + getVpcConnector().hashCode(); + break; + case 12: + hash = (37 * hash) + DELIVER_FIELD_NUMBER; + hash = (53 * hash) + getDeliver().hashCode(); + break; + case 13: + hash = (37 * hash) + FORWARD_FIELD_NUMBER; + hash = (53 * hash) + getForward().hashCode(); + break; + case 14: + hash = (37 * hash) + ABORT_FIELD_NUMBER; + hash = (53 * hash) + getAbort().hashCode(); + break; + case 15: + hash = (37 * hash) + DROP_FIELD_NUMBER; + hash = (53 * hash) + getDrop().hashCode(); + break; + case 16: + hash = (37 * hash) + LOAD_BALANCER_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancer().hashCode(); + break; + case 17: + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + break; + case 18: + hash = (37 * hash) + GKE_MASTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMaster().hashCode(); + break; + case 19: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + break; + case 20: + hash = (37 * hash) + CLOUD_FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getCloudFunction().hashCode(); + break; + case 22: + hash = (37 * hash) + APP_ENGINE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineVersion().hashCode(); + break; + case 23: + hash = (37 * hash) + CLOUD_RUN_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getCloudRunRevision().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Step parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.networkmanagement.v1.Step prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A simulated forwarding path is composed of multiple steps.
+   * Each step has a well-defined state and an associated configuration.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Step} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Step) + com.google.events.cloud.networkmanagement.v1.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Step.class, + com.google.events.cloud.networkmanagement.v1.Step.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.Step.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + state_ = 0; + causesDrop_ = false; + projectId_ = ""; + if (instanceBuilder_ != null) { + instanceBuilder_.clear(); + } + if (firewallBuilder_ != null) { + firewallBuilder_.clear(); + } + if (routeBuilder_ != null) { + routeBuilder_.clear(); + } + if (endpointBuilder_ != null) { + endpointBuilder_.clear(); + } + if (googleServiceBuilder_ != null) { + googleServiceBuilder_.clear(); + } + if (forwardingRuleBuilder_ != null) { + forwardingRuleBuilder_.clear(); + } + if (vpnGatewayBuilder_ != null) { + vpnGatewayBuilder_.clear(); + } + if (vpnTunnelBuilder_ != null) { + vpnTunnelBuilder_.clear(); + } + if (vpcConnectorBuilder_ != null) { + vpcConnectorBuilder_.clear(); + } + if (deliverBuilder_ != null) { + deliverBuilder_.clear(); + } + if (forwardBuilder_ != null) { + forwardBuilder_.clear(); + } + if (abortBuilder_ != null) { + abortBuilder_.clear(); + } + if (dropBuilder_ != null) { + dropBuilder_.clear(); + } + if (loadBalancerBuilder_ != null) { + loadBalancerBuilder_.clear(); + } + if (networkBuilder_ != null) { + networkBuilder_.clear(); + } + if (gkeMasterBuilder_ != null) { + gkeMasterBuilder_.clear(); + } + if (cloudSqlInstanceBuilder_ != null) { + cloudSqlInstanceBuilder_.clear(); + } + if (cloudFunctionBuilder_ != null) { + cloudFunctionBuilder_.clear(); + } + if (appEngineVersionBuilder_ != null) { + appEngineVersionBuilder_.clear(); + } + if (cloudRunRevisionBuilder_ != null) { + cloudRunRevisionBuilder_.clear(); + } + stepInfoCase_ = 0; + stepInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step build() { + com.google.events.cloud.networkmanagement.v1.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step buildPartial() { + com.google.events.cloud.networkmanagement.v1.Step result = + new com.google.events.cloud.networkmanagement.v1.Step(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.Step result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.causesDrop_ = causesDrop_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.projectId_ = projectId_; + } + } + + private void buildPartialOneofs(com.google.events.cloud.networkmanagement.v1.Step result) { + result.stepInfoCase_ = stepInfoCase_; + result.stepInfo_ = this.stepInfo_; + if (stepInfoCase_ == 5 && instanceBuilder_ != null) { + result.stepInfo_ = instanceBuilder_.build(); + } + if (stepInfoCase_ == 6 && firewallBuilder_ != null) { + result.stepInfo_ = firewallBuilder_.build(); + } + if (stepInfoCase_ == 7 && routeBuilder_ != null) { + result.stepInfo_ = routeBuilder_.build(); + } + if (stepInfoCase_ == 8 && endpointBuilder_ != null) { + result.stepInfo_ = endpointBuilder_.build(); + } + if (stepInfoCase_ == 24 && googleServiceBuilder_ != null) { + result.stepInfo_ = googleServiceBuilder_.build(); + } + if (stepInfoCase_ == 9 && forwardingRuleBuilder_ != null) { + result.stepInfo_ = forwardingRuleBuilder_.build(); + } + if (stepInfoCase_ == 10 && vpnGatewayBuilder_ != null) { + result.stepInfo_ = vpnGatewayBuilder_.build(); + } + if (stepInfoCase_ == 11 && vpnTunnelBuilder_ != null) { + result.stepInfo_ = vpnTunnelBuilder_.build(); + } + if (stepInfoCase_ == 21 && vpcConnectorBuilder_ != null) { + result.stepInfo_ = vpcConnectorBuilder_.build(); + } + if (stepInfoCase_ == 12 && deliverBuilder_ != null) { + result.stepInfo_ = deliverBuilder_.build(); + } + if (stepInfoCase_ == 13 && forwardBuilder_ != null) { + result.stepInfo_ = forwardBuilder_.build(); + } + if (stepInfoCase_ == 14 && abortBuilder_ != null) { + result.stepInfo_ = abortBuilder_.build(); + } + if (stepInfoCase_ == 15 && dropBuilder_ != null) { + result.stepInfo_ = dropBuilder_.build(); + } + if (stepInfoCase_ == 16 && loadBalancerBuilder_ != null) { + result.stepInfo_ = loadBalancerBuilder_.build(); + } + if (stepInfoCase_ == 17 && networkBuilder_ != null) { + result.stepInfo_ = networkBuilder_.build(); + } + if (stepInfoCase_ == 18 && gkeMasterBuilder_ != null) { + result.stepInfo_ = gkeMasterBuilder_.build(); + } + if (stepInfoCase_ == 19 && cloudSqlInstanceBuilder_ != null) { + result.stepInfo_ = cloudSqlInstanceBuilder_.build(); + } + if (stepInfoCase_ == 20 && cloudFunctionBuilder_ != null) { + result.stepInfo_ = cloudFunctionBuilder_.build(); + } + if (stepInfoCase_ == 22 && appEngineVersionBuilder_ != null) { + result.stepInfo_ = appEngineVersionBuilder_.build(); + } + if (stepInfoCase_ == 23 && cloudRunRevisionBuilder_ != null) { + result.stepInfo_ = cloudRunRevisionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.Step) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.Step other) { + if (other == com.google.events.cloud.networkmanagement.v1.Step.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getCausesDrop() != false) { + setCausesDrop(other.getCausesDrop()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000008; + onChanged(); + } + switch (other.getStepInfoCase()) { + case INSTANCE: + { + mergeInstance(other.getInstance()); + break; + } + case FIREWALL: + { + mergeFirewall(other.getFirewall()); + break; + } + case ROUTE: + { + mergeRoute(other.getRoute()); + break; + } + case ENDPOINT: + { + mergeEndpoint(other.getEndpoint()); + break; + } + case GOOGLE_SERVICE: + { + mergeGoogleService(other.getGoogleService()); + break; + } + case FORWARDING_RULE: + { + mergeForwardingRule(other.getForwardingRule()); + break; + } + case VPN_GATEWAY: + { + mergeVpnGateway(other.getVpnGateway()); + break; + } + case VPN_TUNNEL: + { + mergeVpnTunnel(other.getVpnTunnel()); + break; + } + case VPC_CONNECTOR: + { + mergeVpcConnector(other.getVpcConnector()); + break; + } + case DELIVER: + { + mergeDeliver(other.getDeliver()); + break; + } + case FORWARD: + { + mergeForward(other.getForward()); + break; + } + case ABORT: + { + mergeAbort(other.getAbort()); + break; + } + case DROP: + { + mergeDrop(other.getDrop()); + break; + } + case LOAD_BALANCER: + { + mergeLoadBalancer(other.getLoadBalancer()); + break; + } + case NETWORK: + { + mergeNetwork(other.getNetwork()); + break; + } + case GKE_MASTER: + { + mergeGkeMaster(other.getGkeMaster()); + break; + } + case CLOUD_SQL_INSTANCE: + { + mergeCloudSqlInstance(other.getCloudSqlInstance()); + break; + } + case CLOUD_FUNCTION: + { + mergeCloudFunction(other.getCloudFunction()); + break; + } + case APP_ENGINE_VERSION: + { + mergeAppEngineVersion(other.getAppEngineVersion()); + break; + } + case CLOUD_RUN_REVISION: + { + mergeCloudRunRevision(other.getCloudRunRevision()); + break; + } + case STEPINFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + causesDrop_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getFirewallFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getRouteFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getEndpointFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getForwardingRuleFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getVpnGatewayFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getVpnTunnelFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage(getDeliverFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(getForwardFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage(getAbortFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage(getDropFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 15; + break; + } // case 122 + case 130: + { + input.readMessage(getLoadBalancerFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage(getGkeMasterFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 18; + break; + } // case 146 + case 154: + { + input.readMessage( + getCloudSqlInstanceFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage(getCloudFunctionFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage(getVpcConnectorFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + getAppEngineVersionFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage( + getCloudRunRevisionFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 23; + break; + } // case 186 + case 194: + { + input.readMessage(getGoogleServiceFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 24; + break; + } // case 194 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public Builder clearStepInfo() { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step.State getState() { + com.google.events.cloud.networkmanagement.v1.Step.State result = + com.google.events.cloud.networkmanagement.v1.Step.State.forNumber(state_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.Step.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.events.cloud.networkmanagement.v1.Step.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private boolean causesDrop_; + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @param value The causesDrop to set. + * @return This builder for chaining. + */ + public Builder setCausesDrop(boolean value) { + + causesDrop_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return This builder for chaining. + */ + public Builder clearCausesDrop() { + bitField0_ = (bitField0_ & ~0x00000004); + causesDrop_ = false; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.InstanceInfo, + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfo getInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + return (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 5) { + return instanceBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder setInstance(com.google.events.cloud.networkmanagement.v1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder setInstance( + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder builderForValue) { + if (instanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder mergeInstance(com.google.events.cloud.networkmanagement.v1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.InstanceInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 5) { + instanceBuilder_.mergeFrom(value); + } else { + instanceBuilder_.setMessage(value); + } + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + instanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder getInstanceBuilder() { + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder + getInstanceOrBuilder() { + if ((stepInfoCase_ == 5) && (instanceBuilder_ != null)) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 5) { + return (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.InstanceInfo, + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + if (!(stepInfoCase_ == 5)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.InstanceInfo, + com.google.events.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.InstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 5; + onChanged(); + return instanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.FirewallInfo, + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder> + firewallBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfo getFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + return (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 6) { + return firewallBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder setFirewall(com.google.events.cloud.networkmanagement.v1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + firewallBuilder_.setMessage(value); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder setFirewall( + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder builderForValue) { + if (firewallBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + firewallBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder mergeFirewall(com.google.events.cloud.networkmanagement.v1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.FirewallInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 6) { + firewallBuilder_.mergeFrom(value); + } else { + firewallBuilder_.setMessage(value); + } + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder clearFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + firewallBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder getFirewallBuilder() { + return getFirewallFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder + getFirewallOrBuilder() { + if ((stepInfoCase_ == 6) && (firewallBuilder_ != null)) { + return firewallBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 6) { + return (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.FirewallInfo, + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder> + getFirewallFieldBuilder() { + if (firewallBuilder_ == null) { + if (!(stepInfoCase_ == 6)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + firewallBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.FirewallInfo, + com.google.events.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.FirewallInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 6; + onChanged(); + return firewallBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.RouteInfo, + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder> + routeBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfo getRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + return (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 7) { + return routeBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder setRoute(com.google.events.cloud.networkmanagement.v1.RouteInfo value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + routeBuilder_.setMessage(value); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder setRoute( + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder builderForValue) { + if (routeBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + routeBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder mergeRoute(com.google.events.cloud.networkmanagement.v1.RouteInfo value) { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.RouteInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 7) { + routeBuilder_.mergeFrom(value); + } else { + routeBuilder_.setMessage(value); + } + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder clearRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + routeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder getRouteBuilder() { + return getRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder() { + if ((stepInfoCase_ == 7) && (routeBuilder_ != null)) { + return routeBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 7) { + return (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.RouteInfo, + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder> + getRouteFieldBuilder() { + if (routeBuilder_ == null) { + if (!(stepInfoCase_ == 7)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + routeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.RouteInfo, + com.google.events.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.RouteInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 7; + onChanged(); + return routeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + endpointBuilder_; + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + return (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 8) { + return endpointBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint(com.google.events.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + endpointBuilder_.setMessage(value); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint( + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder builderForValue) { + if (endpointBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder mergeEndpoint(com.google.events.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.EndpointInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 8) { + endpointBuilder_.mergeFrom(value); + } else { + endpointBuilder_.setMessage(value); + } + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + endpointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder getEndpointBuilder() { + return getEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder + getEndpointOrBuilder() { + if ((stepInfoCase_ == 8) && (endpointBuilder_ != null)) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 8) { + return (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + if (!(stepInfoCase_ == 8)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.EndpointInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 8; + onChanged(); + return endpointBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder> + googleServiceBuilder_; + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return Whether the googleService field is set. + */ + @java.lang.Override + public boolean hasGoogleService() { + return stepInfoCase_ == 24; + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return The googleService. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo getGoogleService() { + if (googleServiceBuilder_ == null) { + if (stepInfoCase_ == 24) { + return (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 24) { + return googleServiceBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + public Builder setGoogleService( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo value) { + if (googleServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + googleServiceBuilder_.setMessage(value); + } + stepInfoCase_ = 24; + return this; + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + public Builder setGoogleService( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder builderForValue) { + if (googleServiceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + googleServiceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 24; + return this; + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + public Builder mergeGoogleService( + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo value) { + if (googleServiceBuilder_ == null) { + if (stepInfoCase_ == 24 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 24) { + googleServiceBuilder_.mergeFrom(value); + } else { + googleServiceBuilder_.setMessage(value); + } + } + stepInfoCase_ = 24; + return this; + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + public Builder clearGoogleService() { + if (googleServiceBuilder_ == null) { + if (stepInfoCase_ == 24) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 24) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + googleServiceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder + getGoogleServiceBuilder() { + return getGoogleServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder + getGoogleServiceOrBuilder() { + if ((stepInfoCase_ == 24) && (googleServiceBuilder_ != null)) { + return googleServiceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 24) { + return (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google service
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder> + getGoogleServiceFieldBuilder() { + if (googleServiceBuilder_ == null) { + if (!(stepInfoCase_ == 24)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.getDefaultInstance(); + } + googleServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 24; + onChanged(); + return googleServiceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder> + forwardingRuleBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + return (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 9) { + return forwardingRuleBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + public Builder setForwardingRule( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(value); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + public Builder setForwardingRule( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder builderForValue) { + if (forwardingRuleBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + public Builder mergeForwardingRule( + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 9) { + forwardingRuleBuilder_.mergeFrom(value); + } else { + forwardingRuleBuilder_.setMessage(value); + } + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + public Builder clearForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardingRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder + getForwardingRuleBuilder() { + return getForwardingRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if ((stepInfoCase_ == 9) && (forwardingRuleBuilder_ != null)) { + return forwardingRuleBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 9) { + return (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder> + getForwardingRuleFieldBuilder() { + if (forwardingRuleBuilder_ == null) { + if (!(stepInfoCase_ == 9)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + forwardingRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 9; + onChanged(); + return forwardingRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder> + vpnGatewayBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + return (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 10) { + return vpnGatewayBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(value); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder builderForValue) { + if (vpnGatewayBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder mergeVpnGateway( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 10) { + vpnGatewayBuilder_.mergeFrom(value); + } else { + vpnGatewayBuilder_.setMessage(value); + } + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder clearVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnGatewayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder + getVpnGatewayBuilder() { + return getVpnGatewayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder + getVpnGatewayOrBuilder() { + if ((stepInfoCase_ == 10) && (vpnGatewayBuilder_ != null)) { + return vpnGatewayBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 10) { + return (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder> + getVpnGatewayFieldBuilder() { + if (vpnGatewayBuilder_ == null) { + if (!(stepInfoCase_ == 10)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + vpnGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 10; + onChanged(); + return vpnGatewayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder> + vpnTunnelBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + return (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 11) { + return vpnTunnelBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel(com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(value); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder builderForValue) { + if (vpnTunnelBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder mergeVpnTunnel( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 11) { + vpnTunnelBuilder_.mergeFrom(value); + } else { + vpnTunnelBuilder_.setMessage(value); + } + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder clearVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnTunnelBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder + getVpnTunnelBuilder() { + return getVpnTunnelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder + getVpnTunnelOrBuilder() { + if ((stepInfoCase_ == 11) && (vpnTunnelBuilder_ != null)) { + return vpnTunnelBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 11) { + return (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder> + getVpnTunnelFieldBuilder() { + if (vpnTunnelBuilder_ == null) { + if (!(stepInfoCase_ == 11)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + vpnTunnelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 11; + onChanged(); + return vpnTunnelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder> + vpcConnectorBuilder_; + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return Whether the vpcConnector field is set. + */ + @java.lang.Override + public boolean hasVpcConnector() { + return stepInfoCase_ == 21; + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return The vpcConnector. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo getVpcConnector() { + if (vpcConnectorBuilder_ == null) { + if (stepInfoCase_ == 21) { + return (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 21) { + return vpcConnectorBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + public Builder setVpcConnector( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo value) { + if (vpcConnectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpcConnectorBuilder_.setMessage(value); + } + stepInfoCase_ = 21; + return this; + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + public Builder setVpcConnector( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder builderForValue) { + if (vpcConnectorBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpcConnectorBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 21; + return this; + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + public Builder mergeVpcConnector( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo value) { + if (vpcConnectorBuilder_ == null) { + if (stepInfoCase_ == 21 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 21) { + vpcConnectorBuilder_.mergeFrom(value); + } else { + vpcConnectorBuilder_.setMessage(value); + } + } + stepInfoCase_ = 21; + return this; + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + public Builder clearVpcConnector() { + if (vpcConnectorBuilder_ == null) { + if (stepInfoCase_ == 21) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 21) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpcConnectorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder + getVpcConnectorBuilder() { + return getVpcConnectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder + getVpcConnectorOrBuilder() { + if ((stepInfoCase_ == 21) && (vpcConnectorBuilder_ != null)) { + return vpcConnectorBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 21) { + return (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a VPC connector.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder> + getVpcConnectorFieldBuilder() { + if (vpcConnectorBuilder_ == null) { + if (!(stepInfoCase_ == 21)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + vpcConnectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 21; + onChanged(); + return vpcConnectorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DeliverInfo, + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder> + deliverBuilder_; + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfo getDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + return (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 12) { + return deliverBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder setDeliver(com.google.events.cloud.networkmanagement.v1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + deliverBuilder_.setMessage(value); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder setDeliver( + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder builderForValue) { + if (deliverBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + deliverBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder mergeDeliver(com.google.events.cloud.networkmanagement.v1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.DeliverInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 12) { + deliverBuilder_.mergeFrom(value); + } else { + deliverBuilder_.setMessage(value); + } + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder clearDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + deliverBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder getDeliverBuilder() { + return getDeliverFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if ((stepInfoCase_ == 12) && (deliverBuilder_ != null)) { + return deliverBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 12) { + return (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DeliverInfo, + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder> + getDeliverFieldBuilder() { + if (deliverBuilder_ == null) { + if (!(stepInfoCase_ == 12)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + deliverBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DeliverInfo, + com.google.events.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.DeliverInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 12; + onChanged(); + return deliverBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardInfo, + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder> + forwardBuilder_; + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfo getForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + return (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 13) { + return forwardBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder setForward(com.google.events.cloud.networkmanagement.v1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardBuilder_.setMessage(value); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder setForward( + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder builderForValue) { + if (forwardBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder mergeForward(com.google.events.cloud.networkmanagement.v1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.ForwardInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 13) { + forwardBuilder_.mergeFrom(value); + } else { + forwardBuilder_.setMessage(value); + } + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder clearForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder getForwardBuilder() { + return getForwardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder() { + if ((stepInfoCase_ == 13) && (forwardBuilder_ != null)) { + return forwardBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 13) { + return (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardInfo, + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder> + getForwardFieldBuilder() { + if (forwardBuilder_ == null) { + if (!(stepInfoCase_ == 13)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + forwardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.ForwardInfo, + com.google.events.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.ForwardInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 13; + onChanged(); + return forwardBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AbortInfo, + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder> + abortBuilder_; + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfo getAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + return (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 14) { + return abortBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder setAbort(com.google.events.cloud.networkmanagement.v1.AbortInfo value) { + if (abortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + abortBuilder_.setMessage(value); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder setAbort( + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder builderForValue) { + if (abortBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + abortBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder mergeAbort(com.google.events.cloud.networkmanagement.v1.AbortInfo value) { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.AbortInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 14) { + abortBuilder_.mergeFrom(value); + } else { + abortBuilder_.setMessage(value); + } + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder clearAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + abortBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder getAbortBuilder() { + return getAbortFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder() { + if ((stepInfoCase_ == 14) && (abortBuilder_ != null)) { + return abortBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 14) { + return (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AbortInfo, + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder> + getAbortFieldBuilder() { + if (abortBuilder_ == null) { + if (!(stepInfoCase_ == 14)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + abortBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AbortInfo, + com.google.events.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.AbortInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 14; + onChanged(); + return abortBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DropInfo, + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder> + dropBuilder_; + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfo getDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + return (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 15) { + return dropBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder setDrop(com.google.events.cloud.networkmanagement.v1.DropInfo value) { + if (dropBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + dropBuilder_.setMessage(value); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder setDrop( + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder builderForValue) { + if (dropBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + dropBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder mergeDrop(com.google.events.cloud.networkmanagement.v1.DropInfo value) { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.DropInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 15) { + dropBuilder_.mergeFrom(value); + } else { + dropBuilder_.setMessage(value); + } + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder clearDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + dropBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public com.google.events.cloud.networkmanagement.v1.DropInfo.Builder getDropBuilder() { + return getDropFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder() { + if ((stepInfoCase_ == 15) && (dropBuilder_ != null)) { + return dropBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 15) { + return (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DropInfo, + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder> + getDropFieldBuilder() { + if (dropBuilder_ == null) { + if (!(stepInfoCase_ == 15)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + dropBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.DropInfo, + com.google.events.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.DropInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 15; + onChanged(); + return dropBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder> + loadBalancerBuilder_; + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + return (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 16) { + return loadBalancerBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + loadBalancerBuilder_.setMessage(value); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder builderForValue) { + if (loadBalancerBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + loadBalancerBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder mergeLoadBalancer( + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 16) { + loadBalancerBuilder_.mergeFrom(value); + } else { + loadBalancerBuilder_.setMessage(value); + } + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder clearLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + loadBalancerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder + getLoadBalancerBuilder() { + return getLoadBalancerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if ((stepInfoCase_ == 16) && (loadBalancerBuilder_ != null)) { + return loadBalancerBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 16) { + return (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder> + getLoadBalancerFieldBuilder() { + if (loadBalancerBuilder_ == null) { + if (!(stepInfoCase_ == 16)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + loadBalancerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 16; + onChanged(); + return loadBalancerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.NetworkInfo, + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfo getNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + return (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 17) { + return networkBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder setNetwork(com.google.events.cloud.networkmanagement.v1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder setNetwork( + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder builderForValue) { + if (networkBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder mergeNetwork(com.google.events.cloud.networkmanagement.v1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.NetworkInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 17) { + networkBuilder_.mergeFrom(value); + } else { + networkBuilder_.setMessage(value); + } + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + networkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder getNetworkBuilder() { + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if ((stepInfoCase_ == 17) && (networkBuilder_ != null)) { + return networkBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 17) { + return (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.NetworkInfo, + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + if (!(stepInfoCase_ == 17)) { + stepInfo_ = com.google.events.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.NetworkInfo, + com.google.events.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.NetworkInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 17; + onChanged(); + return networkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder> + gkeMasterBuilder_; + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + return (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 18) { + return gkeMasterBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster(com.google.events.cloud.networkmanagement.v1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + gkeMasterBuilder_.setMessage(value); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster( + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder builderForValue) { + if (gkeMasterBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + gkeMasterBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder mergeGkeMaster( + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.GKEMasterInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 18) { + gkeMasterBuilder_.mergeFrom(value); + } else { + gkeMasterBuilder_.setMessage(value); + } + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder clearGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + gkeMasterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder + getGkeMasterBuilder() { + return getGkeMasterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder + getGkeMasterOrBuilder() { + if ((stepInfoCase_ == 18) && (gkeMasterBuilder_ != null)) { + return gkeMasterBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 18) { + return (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder> + getGkeMasterFieldBuilder() { + if (gkeMasterBuilder_ == null) { + if (!(stepInfoCase_ == 18)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + gkeMasterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 18; + onChanged(); + return gkeMasterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder> + cloudSqlInstanceBuilder_; + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + return (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance(); + } else { + if (stepInfoCase_ == 19) { + return cloudSqlInstanceBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder setCloudSqlInstance( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(value); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder setCloudSqlInstance( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder builderForValue) { + if (cloudSqlInstanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder mergeCloudSqlInstance( + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 19) { + cloudSqlInstanceBuilder_.mergeFrom(value); + } else { + cloudSqlInstanceBuilder_.setMessage(value); + } + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder clearCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + cloudSqlInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder + getCloudSqlInstanceBuilder() { + return getCloudSqlInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if ((stepInfoCase_ == 19) && (cloudSqlInstanceBuilder_ != null)) { + return cloudSqlInstanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 19) { + return (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder> + getCloudSqlInstanceFieldBuilder() { + if (cloudSqlInstanceBuilder_ == null) { + if (!(stepInfoCase_ == 19)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance(); + } + cloudSqlInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 19; + onChanged(); + return cloudSqlInstanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder> + cloudFunctionBuilder_; + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return Whether the cloudFunction field is set. + */ + @java.lang.Override + public boolean hasCloudFunction() { + return stepInfoCase_ == 20; + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return The cloudFunction. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo getCloudFunction() { + if (cloudFunctionBuilder_ == null) { + if (stepInfoCase_ == 20) { + return (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 20) { + return cloudFunctionBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + public Builder setCloudFunction( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo value) { + if (cloudFunctionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + cloudFunctionBuilder_.setMessage(value); + } + stepInfoCase_ = 20; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + public Builder setCloudFunction( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder builderForValue) { + if (cloudFunctionBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudFunctionBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 20; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + public Builder mergeCloudFunction( + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo value) { + if (cloudFunctionBuilder_ == null) { + if (stepInfoCase_ == 20 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 20) { + cloudFunctionBuilder_.mergeFrom(value); + } else { + cloudFunctionBuilder_.setMessage(value); + } + } + stepInfoCase_ = 20; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + public Builder clearCloudFunction() { + if (cloudFunctionBuilder_ == null) { + if (stepInfoCase_ == 20) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 20) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + cloudFunctionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder + getCloudFunctionBuilder() { + return getCloudFunctionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder + getCloudFunctionOrBuilder() { + if ((stepInfoCase_ == 20) && (cloudFunctionBuilder_ != null)) { + return cloudFunctionBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 20) { + return (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud Function.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder> + getCloudFunctionFieldBuilder() { + if (cloudFunctionBuilder_ == null) { + if (!(stepInfoCase_ == 20)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.getDefaultInstance(); + } + cloudFunctionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 20; + onChanged(); + return cloudFunctionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder> + appEngineVersionBuilder_; + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return Whether the appEngineVersion field is set. + */ + @java.lang.Override + public boolean hasAppEngineVersion() { + return stepInfoCase_ == 22; + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return The appEngineVersion. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo getAppEngineVersion() { + if (appEngineVersionBuilder_ == null) { + if (stepInfoCase_ == 22) { + return (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + .getDefaultInstance(); + } else { + if (stepInfoCase_ == 22) { + return appEngineVersionBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + public Builder setAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo value) { + if (appEngineVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + appEngineVersionBuilder_.setMessage(value); + } + stepInfoCase_ = 22; + return this; + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + public Builder setAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder builderForValue) { + if (appEngineVersionBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + appEngineVersionBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 22; + return this; + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + public Builder mergeAppEngineVersion( + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo value) { + if (appEngineVersionBuilder_ == null) { + if (stepInfoCase_ == 22 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 22) { + appEngineVersionBuilder_.mergeFrom(value); + } else { + appEngineVersionBuilder_.setMessage(value); + } + } + stepInfoCase_ = 22; + return this; + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + public Builder clearAppEngineVersion() { + if (appEngineVersionBuilder_ == null) { + if (stepInfoCase_ == 22) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 22) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + appEngineVersionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder + getAppEngineVersionBuilder() { + return getAppEngineVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder + getAppEngineVersionOrBuilder() { + if ((stepInfoCase_ == 22) && (appEngineVersionBuilder_ != null)) { + return appEngineVersionBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 22) { + return (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of an App Engine service version.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder> + getAppEngineVersionFieldBuilder() { + if (appEngineVersionBuilder_ == null) { + if (!(stepInfoCase_ == 22)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo + .getDefaultInstance(); + } + appEngineVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 22; + onChanged(); + return appEngineVersionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder> + cloudRunRevisionBuilder_; + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return Whether the cloudRunRevision field is set. + */ + @java.lang.Override + public boolean hasCloudRunRevision() { + return stepInfoCase_ == 23; + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return The cloudRunRevision. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo getCloudRunRevision() { + if (cloudRunRevisionBuilder_ == null) { + if (stepInfoCase_ == 23) { + return (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + .getDefaultInstance(); + } else { + if (stepInfoCase_ == 23) { + return cloudRunRevisionBuilder_.getMessage(); + } + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + public Builder setCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo value) { + if (cloudRunRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + cloudRunRevisionBuilder_.setMessage(value); + } + stepInfoCase_ = 23; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + public Builder setCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder builderForValue) { + if (cloudRunRevisionBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudRunRevisionBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 23; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + public Builder mergeCloudRunRevision( + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo value) { + if (cloudRunRevisionBuilder_ == null) { + if (stepInfoCase_ == 23 + && stepInfo_ + != com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.newBuilder( + (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 23) { + cloudRunRevisionBuilder_.mergeFrom(value); + } else { + cloudRunRevisionBuilder_.setMessage(value); + } + } + stepInfoCase_ = 23; + return this; + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + public Builder clearCloudRunRevision() { + if (cloudRunRevisionBuilder_ == null) { + if (stepInfoCase_ == 23) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 23) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + cloudRunRevisionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder + getCloudRunRevisionBuilder() { + return getCloudRunRevisionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder + getCloudRunRevisionOrBuilder() { + if ((stepInfoCase_ == 23) && (cloudRunRevisionBuilder_ != null)) { + return cloudRunRevisionBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 23) { + return (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_; + } + return com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud Run revision.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder> + getCloudRunRevisionFieldBuilder() { + if (cloudRunRevisionBuilder_ == null) { + if (!(stepInfoCase_ == 23)) { + stepInfo_ = + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo + .getDefaultInstance(); + } + cloudRunRevisionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo.Builder, + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder>( + (com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 23; + onChanged(); + return cloudRunRevisionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Step) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Step) + private static final com.google.events.cloud.networkmanagement.v1.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.Step(); + } + + public static com.google.events.cloud.networkmanagement.v1.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/StepOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/StepOrBuilder.java new file mode 100644 index 00000000..2dcffc69 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/StepOrBuilder.java @@ -0,0 +1,839 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + com.google.events.cloud.networkmanagement.v1.Step.State getState(); + + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + boolean getCausesDrop(); + + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + com.google.events.cloud.networkmanagement.v1.InstanceInfo getInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + com.google.events.cloud.networkmanagement.v1.InstanceInfoOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + boolean hasFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + com.google.events.cloud.networkmanagement.v1.FirewallInfo getFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder getFirewallOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + boolean hasRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + com.google.events.cloud.networkmanagement.v1.RouteInfo getRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + com.google.events.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder(); + + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointOrBuilder(); + + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return Whether the googleService field is set. + */ + boolean hasGoogleService(); + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * + * @return The googleService. + */ + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfo getGoogleService(); + /** + * + * + *
+   * Display information of a Google service
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + */ + com.google.events.cloud.networkmanagement.v1.GoogleServiceInfoOrBuilder + getGoogleServiceOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + boolean hasForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + com.google.events.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + boolean hasVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder getVpnGatewayOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + boolean hasVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder(); + + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return Whether the vpcConnector field is set. + */ + boolean hasVpcConnector(); + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * + * @return The vpcConnector. + */ + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo getVpcConnector(); + /** + * + * + *
+   * Display information of a VPC connector.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + */ + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder getVpcConnectorOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + boolean hasDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + com.google.events.cloud.networkmanagement.v1.DeliverInfo getDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + com.google.events.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + boolean hasForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + com.google.events.cloud.networkmanagement.v1.ForwardInfo getForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + com.google.events.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + boolean hasAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + com.google.events.cloud.networkmanagement.v1.AbortInfo getAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + com.google.events.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + boolean hasDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + com.google.events.cloud.networkmanagement.v1.DropInfo getDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + com.google.events.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder(); + + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + boolean hasLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + com.google.events.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder getLoadBalancerOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + com.google.events.cloud.networkmanagement.v1.NetworkInfo getNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + com.google.events.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + boolean hasGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + com.google.events.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + com.google.events.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder(); + + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + boolean hasCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + com.google.events.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder(); + + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return Whether the cloudFunction field is set. + */ + boolean hasCloudFunction(); + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * + * @return The cloudFunction. + */ + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfo getCloudFunction(); + /** + * + * + *
+   * Display information of a Cloud Function.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + */ + com.google.events.cloud.networkmanagement.v1.CloudFunctionInfoOrBuilder + getCloudFunctionOrBuilder(); + + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return Whether the appEngineVersion field is set. + */ + boolean hasAppEngineVersion(); + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + * + * @return The appEngineVersion. + */ + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfo getAppEngineVersion(); + /** + * + * + *
+   * Display information of an App Engine service version.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * + */ + com.google.events.cloud.networkmanagement.v1.AppEngineVersionInfoOrBuilder + getAppEngineVersionOrBuilder(); + + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return Whether the cloudRunRevision field is set. + */ + boolean hasCloudRunRevision(); + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + * + * @return The cloudRunRevision. + */ + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo getCloudRunRevision(); + /** + * + * + *
+   * Display information of a Cloud Run revision.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * + */ + com.google.events.cloud.networkmanagement.v1.CloudRunRevisionInfoOrBuilder + getCloudRunRevisionOrBuilder(); + + public com.google.events.cloud.networkmanagement.v1.Step.StepInfoCase getStepInfoCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Trace.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Trace.java new file mode 100644 index 00000000..208ab3ab --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/Trace.java @@ -0,0 +1,1361 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Trace represents one simulated packet forwarding path.
+ *   * Each trace contains multiple ordered steps.
+ *   * Each step is in a particular state with associated configuration.
+ *   * State is categorized as final or non-final states.
+ *   * Each final state has a reason associated.
+ *   * Each trace must end with a final state (the last step).
+ * ```
+ *   |---------------------Trace----------------------|
+ *   Step1(State) Step2(State) ---  StepN(State(final))
+ * ```
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Trace} + */ +public final class Trace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.Trace) + TraceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trace.newBuilder() to construct. + private Trace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Trace() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Trace(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Trace.class, + com.google.events.cloud.networkmanagement.v1.Trace.Builder.class); + } + + public static final int ENDPOINT_INFO_FIELD_NUMBER = 1; + private com.google.events.cloud.networkmanagement.v1.EndpointInfo endpointInfo_; + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + @java.lang.Override + public boolean hasEndpointInfo() { + return endpointInfo_ != null; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo() { + return endpointInfo_ == null + ? com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + return endpointInfo_ == null + ? com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + + public static final int STEPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List steps_; + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointInfo_ != null) { + output.writeMessage(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (endpointInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.Trace)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.Trace other = + (com.google.events.cloud.networkmanagement.v1.Trace) obj; + + if (hasEndpointInfo() != other.hasEndpointInfo()) return false; + if (hasEndpointInfo()) { + if (!getEndpointInfo().equals(other.getEndpointInfo())) return false; + } + if (!getStepsList().equals(other.getStepsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointInfo()) { + hash = (37 * hash) + ENDPOINT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEndpointInfo().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.networkmanagement.v1.Trace 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; + } + /** + * + * + *
+   * Trace represents one simulated packet forwarding path.
+   *   * Each trace contains multiple ordered steps.
+   *   * Each step is in a particular state with associated configuration.
+   *   * State is categorized as final or non-final states.
+   *   * Each final state has a reason associated.
+   *   * Each trace must end with a final state (the last step).
+   * ```
+   *   |---------------------Trace----------------------|
+   *   Step1(State) Step2(State) ---  StepN(State(final))
+   * ```
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.Trace} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.Trace) + com.google.events.cloud.networkmanagement.v1.TraceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.Trace.class, + com.google.events.cloud.networkmanagement.v1.Trace.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.Trace.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointInfo_ = null; + if (endpointInfoBuilder_ != null) { + endpointInfoBuilder_.dispose(); + endpointInfoBuilder_ = null; + } + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Trace getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.Trace.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Trace build() { + com.google.events.cloud.networkmanagement.v1.Trace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Trace buildPartial() { + com.google.events.cloud.networkmanagement.v1.Trace result = + new com.google.events.cloud.networkmanagement.v1.Trace(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.networkmanagement.v1.Trace result) { + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.Trace result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointInfo_ = + endpointInfoBuilder_ == null ? endpointInfo_ : endpointInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.Trace) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.Trace) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.Trace other) { + if (other == com.google.events.cloud.networkmanagement.v1.Trace.getDefaultInstance()) + return this; + if (other.hasEndpointInfo()) { + mergeEndpointInfo(other.getEndpointInfo()); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.events.cloud.networkmanagement.v1.Step m = + input.readMessage( + com.google.events.cloud.networkmanagement.v1.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.networkmanagement.v1.EndpointInfo endpointInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + endpointInfoBuilder_; + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + public boolean hasEndpointInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + public com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo() { + if (endpointInfoBuilder_ == null) { + return endpointInfo_ == null + ? com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } else { + return endpointInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo( + com.google.events.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointInfo_ = value; + } else { + endpointInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo( + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder builderForValue) { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = builderForValue.build(); + } else { + endpointInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder mergeEndpointInfo( + com.google.events.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && endpointInfo_ != null + && endpointInfo_ + != com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance()) { + getEndpointInfoBuilder().mergeFrom(value); + } else { + endpointInfo_ = value; + } + } else { + endpointInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder clearEndpointInfo() { + bitField0_ = (bitField0_ & ~0x00000001); + endpointInfo_ = null; + if (endpointInfoBuilder_ != null) { + endpointInfoBuilder_.dispose(); + endpointInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder + getEndpointInfoBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEndpointInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + if (endpointInfoBuilder_ != null) { + return endpointInfoBuilder_.getMessageOrBuilder(); + } else { + return endpointInfo_ == null + ? com.google.events.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + getEndpointInfoFieldBuilder() { + if (endpointInfoBuilder_ == null) { + endpointInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.EndpointInfo, + com.google.events.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder>( + getEndpointInfo(), getParentForChildren(), isClean()); + endpointInfo_ = null; + } + return endpointInfoBuilder_; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + steps_ = new java.util.ArrayList(steps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Step, + com.google.events.cloud.networkmanagement.v1.Step.Builder, + com.google.events.cloud.networkmanagement.v1.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.events.cloud.networkmanagement.v1.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder setSteps(int index, com.google.events.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.events.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps(com.google.events.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps(int index, com.google.events.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps( + com.google.events.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.events.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.events.cloud.networkmanagement.v1.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.events.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.events.cloud.networkmanagement.v1.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.events.cloud.networkmanagement.v1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.events.cloud.networkmanagement.v1.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.events.cloud.networkmanagement.v1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Step, + com.google.events.cloud.networkmanagement.v1.Step.Builder, + com.google.events.cloud.networkmanagement.v1.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.networkmanagement.v1.Step, + com.google.events.cloud.networkmanagement.v1.Step.Builder, + com.google.events.cloud.networkmanagement.v1.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.Trace) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.Trace) + private static final com.google.events.cloud.networkmanagement.v1.Trace DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.Trace(); + } + + public static com.google.events.cloud.networkmanagement.v1.Trace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.Trace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/TraceOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/TraceOrBuilder.java new file mode 100644 index 00000000..3db81a23 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/TraceOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface TraceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.Trace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + boolean hasEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + com.google.events.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + com.google.events.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointInfoOrBuilder(); + + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + com.google.events.cloud.networkmanagement.v1.Step getSteps(int index); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.events.cloud.networkmanagement.v1.Step steps = 2; + */ + com.google.events.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfo.java new file mode 100644 index 00000000..24a83709 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfo.java @@ -0,0 +1,998 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a VPC connector.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpcConnectorInfo} + */ +public final class VpcConnectorInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.VpcConnectorInfo) + VpcConnectorInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpcConnectorInfo.newBuilder() to construct. + private VpcConnectorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpcConnectorInfo() { + displayName_ = ""; + uri_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpcConnectorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.class, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a VPC connector.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPC connector.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a VPC connector.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPC connector.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Location in which the VPC connector is deployed.
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Location in which the VPC connector is deployed.
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo other = + (com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a VPC connector.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpcConnectorInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.VpcConnectorInfo) + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.class, + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpcConnectorInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo + getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo build() { + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo result = + new com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo other) { + if (other + == com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPC connector.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPC connector.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPC connector.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPC connector.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPC connector.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPC connector.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPC connector.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPC connector.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPC connector.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPC connector.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Location in which the VPC connector is deployed.
+     * 
+ * + * string location = 3; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location in which the VPC connector is deployed.
+     * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location in which the VPC connector is deployed.
+     * 
+ * + * string location = 3; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which the VPC connector is deployed.
+     * 
+ * + * string location = 3; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Location in which the VPC connector is deployed.
+     * 
+ * + * string location = 3; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.VpcConnectorInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.VpcConnectorInfo) + private static final com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpcConnectorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpcConnectorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfoOrBuilder.java new file mode 100644 index 00000000..7e961e99 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpcConnectorInfoOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface VpcConnectorInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.VpcConnectorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPC connector.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPC connector.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPC connector.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPC connector.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Location in which the VPC connector is deployed.
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Location in which the VPC connector is deployed.
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfo.java new file mode 100644 index 00000000..6fb011f2 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfo.java @@ -0,0 +1,1554 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN gateway.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpnGatewayInfo} + */ +public final class VpnGatewayInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.VpnGatewayInfo) + VpnGatewayInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnGatewayInfo.newBuilder() to construct. + private VpnGatewayInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnGatewayInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + ipAddress_ = ""; + vpnTunnelUri_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnGatewayInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.class, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VPN_TUNNEL_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpnTunnelUri_ = ""; + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + @java.lang.Override + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpnTunnelUri_ = s; + return s; + } + } + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnTunnelUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vpnTunnelUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnTunnelUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vpnTunnelUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo other = + (com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getVpnTunnelUri().equals(other.getVpnTunnelUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + VPN_TUNNEL_URI_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnelUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN gateway.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpnGatewayInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.VpnGatewayInfo) + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.class, + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + ipAddress_ = ""; + vpnTunnelUri_ = ""; + region_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo build() { + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo result = + new com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.vpnTunnelUri_ = vpnTunnelUri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.region_ = region_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVpnTunnelUri().isEmpty()) { + vpnTunnelUri_ = other.vpnTunnelUri_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + vpnTunnelUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object vpnTunnelUri_ = ""; + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpnTunnelUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpnTunnelUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearVpnTunnelUri() { + vpnTunnelUri_ = getDefaultInstance().getVpnTunnelUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The bytes for vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpnTunnelUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.VpnGatewayInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.VpnGatewayInfo) + private static final com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnGatewayInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnGatewayInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java new file mode 100644 index 00000000..dd3fad46 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface VpnGatewayInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.VpnGatewayInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + java.lang.String getVpnTunnelUri(); + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + com.google.protobuf.ByteString getVpnTunnelUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfo.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfo.java new file mode 100644 index 00000000..9a8b1880 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfo.java @@ -0,0 +1,2254 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN tunnel.
+ * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpnTunnelInfo} + */ +public final class VpnTunnelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.networkmanagement.v1.VpnTunnelInfo) + VpnTunnelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnTunnelInfo.newBuilder() to construct. + private VpnTunnelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnTunnelInfo() { + displayName_ = ""; + uri_ = ""; + sourceGateway_ = ""; + remoteGateway_ = ""; + remoteGatewayIp_ = ""; + sourceGatewayIp_ = ""; + networkUri_ = ""; + region_ = ""; + routingType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnTunnelInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.class, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder.class); + } + + /** + * + * + *
+   * Types of VPN routing policy. For details, refer to [Networks and Tunnel
+   * routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/).
+   * 
+ * + * Protobuf enum {@code google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} + */ + public enum RoutingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + ROUTING_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + ROUTE_BASED(1), + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + POLICY_BASED(2), + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTING_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + public static final int ROUTE_BASED_VALUE = 1; + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + public static final int POLICY_BASED_VALUE = 2; + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RoutingType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RoutingType forNumber(int value) { + switch (value) { + case 0: + return ROUTING_TYPE_UNSPECIFIED; + case 1: + return ROUTE_BASED; + case 2: + return POLICY_BASED; + case 3: + return DYNAMIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RoutingType findValueByNumber(int number) { + return RoutingType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RoutingType[] VALUES = values(); + + public static RoutingType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RoutingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceGateway_ = ""; + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + @java.lang.Override + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object remoteGateway_ = ""; + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + @java.lang.Override + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_IP_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object remoteGatewayIp_ = ""; + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + @java.lang.Override + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_IP_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceGatewayIp_ = ""; + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + @java.lang.Override + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkUri_ = ""; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUTING_TYPE_FIELD_NUMBER = 9; + private int routingType_ = 0; + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType() { + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType result = + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.forNumber( + routingType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceGateway_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceGateway_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteGateway_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remoteGateway_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteGatewayIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remoteGatewayIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceGatewayIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceGatewayIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, region_); + } + if (routingType_ + != com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType + .ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, routingType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceGateway_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceGateway_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteGateway_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remoteGateway_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteGatewayIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remoteGatewayIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceGatewayIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceGatewayIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, region_); + } + if (routingType_ + != com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType + .ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, routingType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo)) { + return super.equals(obj); + } + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo other = + (com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getSourceGateway().equals(other.getSourceGateway())) return false; + if (!getRemoteGateway().equals(other.getRemoteGateway())) return false; + if (!getRemoteGatewayIp().equals(other.getRemoteGatewayIp())) return false; + if (!getSourceGatewayIp().equals(other.getSourceGatewayIp())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (routingType_ != other.routingType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getSourceGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGatewayIp().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceGatewayIp().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (37 * hash) + ROUTING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routingType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN tunnel.
+   * 
+ * + * Protobuf type {@code google.events.cloud.networkmanagement.v1.VpnTunnelInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.networkmanagement.v1.VpnTunnelInfo) + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.class, + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.Builder.class); + } + + // Construct using com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + uri_ = ""; + sourceGateway_ = ""; + remoteGateway_ = ""; + remoteGatewayIp_ = ""; + sourceGatewayIp_ = ""; + networkUri_ = ""; + region_ = ""; + routingType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.networkmanagement.v1.Data + .internal_static_google_events_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getDefaultInstanceForType() { + return com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo build() { + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo buildPartial() { + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo result = + new com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceGateway_ = sourceGateway_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.remoteGateway_ = remoteGateway_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remoteGatewayIp_ = remoteGatewayIp_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sourceGatewayIp_ = sourceGatewayIp_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.networkUri_ = networkUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.region_ = region_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.routingType_ = routingType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) { + return mergeFrom((com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo other) { + if (other == com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSourceGateway().isEmpty()) { + sourceGateway_ = other.sourceGateway_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRemoteGateway().isEmpty()) { + remoteGateway_ = other.remoteGateway_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRemoteGatewayIp().isEmpty()) { + remoteGatewayIp_ = other.remoteGatewayIp_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getSourceGatewayIp().isEmpty()) { + sourceGatewayIp_ = other.sourceGatewayIp_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.routingType_ != 0) { + setRoutingTypeValue(other.getRoutingTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + sourceGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + remoteGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + remoteGatewayIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + sourceGatewayIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + networkUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + routingType_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sourceGateway_ = ""; + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceGateway_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceGateway() { + sourceGateway_ = getDefaultInstance().getSourceGateway(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The bytes for sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceGateway_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object remoteGateway_ = ""; + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remoteGateway_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGateway() { + remoteGateway_ = getDefaultInstance().getRemoteGateway(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The bytes for remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remoteGateway_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object remoteGatewayIp_ = ""; + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remoteGatewayIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGatewayIp() { + remoteGatewayIp_ = getDefaultInstance().getRemoteGatewayIp(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The bytes for remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remoteGatewayIp_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object sourceGatewayIp_ = ""; + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceGatewayIp_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceGatewayIp() { + sourceGatewayIp_ = getDefaultInstance().getSourceGatewayIp(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The bytes for sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceGatewayIp_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + networkUri_ = getDefaultInstance().getNetworkUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int routingType_ = 0; + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @param value The enum numeric value on the wire for routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingTypeValue(int value) { + routingType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType() { + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType result = + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.forNumber( + routingType_); + return result == null + ? com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @param value The routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingType( + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + routingType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearRoutingType() { + bitField0_ = (bitField0_ & ~0x00000100); + routingType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.networkmanagement.v1.VpnTunnelInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.networkmanagement.v1.VpnTunnelInfo) + private static final com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo(); + } + + public static com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnTunnelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java new file mode 100644 index 00000000..33567d24 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java @@ -0,0 +1,252 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/networkmanagement/v1/data.proto + +package com.google.events.cloud.networkmanagement.v1; + +public interface VpnTunnelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.networkmanagement.v1.VpnTunnelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + java.lang.String getSourceGateway(); + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + com.google.protobuf.ByteString getSourceGatewayBytes(); + + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + java.lang.String getRemoteGateway(); + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + com.google.protobuf.ByteString getRemoteGatewayBytes(); + + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + java.lang.String getRemoteGatewayIp(); + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + com.google.protobuf.ByteString getRemoteGatewayIpBytes(); + + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + java.lang.String getSourceGatewayIp(); + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + com.google.protobuf.ByteString getSourceGatewayIpBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + int getRoutingTypeValue(); + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + com.google.events.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImage.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImage.java new file mode 100644 index 00000000..5ab2bd41 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImage.java @@ -0,0 +1,827 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a container image for starting a notebook instance with the
+ * environment installed in a container.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ContainerImage} + */ +public final class ContainerImage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ContainerImage) + ContainerImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerImage.newBuilder() to construct. + private ContainerImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerImage() { + repository_ = ""; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ContainerImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ContainerImage.class, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder.class); + } + + public static final int REPOSITORY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object repository_ = ""; + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1; + * + * @return The repository. + */ + @java.lang.Override + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1; + * + * @return The bytes for repository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tag_ = ""; + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } + } + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repository_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, repository_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repository_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, repository_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.ContainerImage)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ContainerImage other = + (com.google.events.cloud.notebooks.v1.ContainerImage) obj; + + if (!getRepository().equals(other.getRepository())) return false; + if (!getTag().equals(other.getTag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.ContainerImage 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; + } + /** + * + * + *
+   * Definition of a container image for starting a notebook instance with the
+   * environment installed in a container.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ContainerImage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ContainerImage) + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ContainerImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ContainerImage.class, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.ContainerImage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repository_ = ""; + tag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage build() { + com.google.events.cloud.notebooks.v1.ContainerImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage buildPartial() { + com.google.events.cloud.notebooks.v1.ContainerImage result = + new com.google.events.cloud.notebooks.v1.ContainerImage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.ContainerImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repository_ = repository_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tag_ = tag_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.ContainerImage) { + return mergeFrom((com.google.events.cloud.notebooks.v1.ContainerImage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.ContainerImage other) { + if (other == com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) + return this; + if (!other.getRepository().isEmpty()) { + repository_ = other.repository_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + repository_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + tag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object repository_ = ""; + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1; + * + * @return The repository. + */ + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1; + * + * @return The bytes for repository. + */ + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1; + * + * @param value The repository to set. + * @return This builder for chaining. + */ + public Builder setRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1; + * + * @return This builder for chaining. + */ + public Builder clearRepository() { + repository_ = getDefaultInstance().getRepository(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1; + * + * @param value The bytes for repository to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + repository_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + tag_ = getDefaultInstance().getTag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ContainerImage) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ContainerImage) + private static final com.google.events.cloud.notebooks.v1.ContainerImage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.ContainerImage(); + } + + public static com.google.events.cloud.notebooks.v1.ContainerImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImageOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImageOrBuilder.java new file mode 100644 index 00000000..d87b8a9b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ContainerImageOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ContainerImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ContainerImage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1; + * + * @return The repository. + */ + java.lang.String getRepository(); + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1; + * + * @return The bytes for repository. + */ + com.google.protobuf.ByteString getRepositoryBytes(); + + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Data.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Data.java new file mode 100644 index 00000000..766ca015 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Data.java @@ -0,0 +1,1060 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public final class Data { + private Data() {} + + 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_events_cloud_notebooks_v1_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VmImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ContainerImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Runtime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_LocalDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Execution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Execution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_Schedule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_InstanceEventData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/events/cloud/notebooks/v1/data." + + "proto\022 google.events.cloud.notebooks.v1\032" + + "\037google/protobuf/timestamp.proto\"\256\002\n\013Env" + + "ironment\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002" + + " \001(\t\022\023\n\013description\030\003 \001(\t\022=\n\010vm_image\030\006 " + + "\001(\0132).google.events.cloud.notebooks.v1.V" + + "mImageH\000\022K\n\017container_image\030\007 \001(\01320.goog" + + "le.events.cloud.notebooks.v1.ContainerIm" + + "ageH\000\022\033\n\023post_startup_script\030\010 \001(\t\022/\n\013cr" + + "eate_time\030\t \001(\0132\032.google.protobuf.Timest" + + "ampB\014\n\nimage_type\"Q\n\007VmImage\022\017\n\007project\030" + + "\001 \001(\t\022\024\n\nimage_name\030\002 \001(\tH\000\022\026\n\014image_fam" + + "ily\030\003 \001(\tH\000B\007\n\005image\"1\n\016ContainerImage\022\022" + + "\n\nrepository\030\001 \001(\t\022\013\n\003tag\030\002 \001(\t\"\314\007\n\007Runt" + + "ime\022\014\n\004name\030\001 \001(\t\022K\n\017virtual_machine\030\002 \001" + + "(\01320.google.events.cloud.notebooks.v1.Vi" + + "rtualMachineH\000\022>\n\005state\030\003 \001(\0162/.google.e" + + "vents.cloud.notebooks.v1.Runtime.State\022K" + + "\n\014health_state\030\004 \001(\01625.google.events.clo" + + "ud.notebooks.v1.Runtime.HealthState\022L\n\ra" + + "ccess_config\030\005 \001(\01325.google.events.cloud" + + ".notebooks.v1.RuntimeAccessConfig\022P\n\017sof" + + "tware_config\030\006 \001(\01327.google.events.cloud" + + ".notebooks.v1.RuntimeSoftwareConfig\022A\n\007m" + + "etrics\030\007 \001(\01320.google.events.cloud.noteb" + + "ooks.v1.RuntimeMetrics\022/\n\013create_time\030\024 " + + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" + + "e_time\030\025 \001(\0132\032.google.protobuf.Timestamp" + + "\022E\n\006labels\030\027 \003(\01325.google.events.cloud.n" + + "otebooks.v1.Runtime.LabelsEntry\032-\n\013Label" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224" + + "\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010START" + + "ING\020\001\022\020\n\014PROVISIONING\020\002\022\n\n\006ACTIVE\020\003\022\014\n\010S" + + "TOPPING\020\004\022\013\n\007STOPPED\020\005\022\014\n\010DELETING\020\006\022\r\n\t" + + "UPGRADING\020\007\022\020\n\014INITIALIZING\020\010\"w\n\013HealthS" + + "tate\022\034\n\030HEALTH_STATE_UNSPECIFIED\020\000\022\013\n\007HE" + + "ALTHY\020\001\022\r\n\tUNHEALTHY\020\002\022\027\n\023AGENT_NOT_INST" + + "ALLED\020\003\022\025\n\021AGENT_NOT_RUNNING\020\004B\016\n\014runtim" + + "e_type\"\250\003\n\030RuntimeAcceleratorConfig\022X\n\004t" + + "ype\030\001 \001(\0162J.google.events.cloud.notebook" + + "s.v1.RuntimeAcceleratorConfig.Accelerato" + + "rType\022\022\n\ncore_count\030\002 \001(\003\"\235\002\n\017Accelerato" + + "rType\022 \n\034ACCELERATOR_TYPE_UNSPECIFIED\020\000\022" + + "\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA_TESLA_P1" + + "00\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017NVIDIA_TE" + + "SLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\025\n\021NVIDIA_" + + "TESLA_A100\020\006\022\n\n\006TPU_V2\020\007\022\n\n\006TPU_V3\020\010\022\027\n\023" + + "NVIDIA_TESLA_T4_VWS\020\t\022\031\n\025NVIDIA_TESLA_P1" + + "00_VWS\020\n\022\027\n\023NVIDIA_TESLA_P4_VWS\020\013\"#\n\020Enc" + + "ryptionConfig\022\017\n\007kms_key\030\001 \001(\t\"\266\002\n\tLocal" + + "Disk\022\023\n\013auto_delete\030\001 \001(\010\022\014\n\004boot\030\002 \001(\010\022" + + "\023\n\013device_name\030\003 \001(\t\022\\\n\021guest_os_feature" + + "s\030\004 \003(\0132A.google.events.cloud.notebooks." + + "v1.LocalDisk.RuntimeGuestOsFeature\022\r\n\005in" + + "dex\030\005 \001(\005\022\021\n\tinterface\030\007 \001(\t\022\014\n\004kind\030\010 \001" + + "(\t\022\020\n\010licenses\030\t \003(\t\022\014\n\004mode\030\n \001(\t\022\016\n\006so" + + "urce\030\013 \001(\t\022\014\n\004type\030\014 \001(\t\032%\n\025RuntimeGuest" + + "OsFeature\022\014\n\004type\030\001 \001(\t\"\306\002\n\031LocalDiskIni" + + "tializeParams\022\023\n\013description\030\001 \001(\t\022\021\n\tdi" + + "sk_name\030\002 \001(\t\022\024\n\014disk_size_gb\030\003 \001(\003\022W\n\006l" + + "abels\030\005 \003(\0132G.google.events.cloud.notebo" + + "oks.v1.LocalDiskInitializeParams.LabelsE" + + "ntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"c\n\010DiskType\022\031\n\025DISK_TYPE_UNS" + + "PECIFIED\020\000\022\017\n\013PD_STANDARD\020\001\022\n\n\006PD_SSD\020\002\022" + + "\017\n\013PD_BALANCED\020\003\022\016\n\nPD_EXTREME\020\004\"\375\001\n\023Run" + + "timeAccessConfig\022\\\n\013access_type\030\001 \001(\0162G." + + "google.events.cloud.notebooks.v1.Runtime" + + "AccessConfig.RuntimeAccessType\022\025\n\rruntim" + + "e_owner\030\002 \001(\t\022\021\n\tproxy_uri\030\003 \001(\t\"^\n\021Runt" + + "imeAccessType\022#\n\037RUNTIME_ACCESS_TYPE_UNS" + + "PECIFIED\020\000\022\017\n\013SINGLE_USER\020\001\022\023\n\017SERVICE_A" + + "CCOUNT\020\002\"\223\006\n\025RuntimeSoftwareConfig\022!\n\031no" + + "tebook_upgrade_schedule\030\001 \001(\t\022%\n\030enable_" + + "health_monitoring\030\002 \001(\010H\000\210\001\001\022\032\n\ridle_shu" + + "tdown\030\003 \001(\010H\001\210\001\001\022\035\n\025idle_shutdown_timeou" + + "t\030\004 \001(\005\022\032\n\022install_gpu_driver\030\005 \001(\010\022\036\n\026c" + + "ustom_gpu_driver_path\030\006 \001(\t\022\033\n\023post_star" + + "tup_script\030\007 \001(\t\022A\n\007kernels\030\010 \003(\01320.goog" + + "le.events.cloud.notebooks.v1.ContainerIm" + + "age\022\030\n\013upgradeable\030\t \001(\010H\002\210\001\001\022w\n\034post_st" + + "artup_script_behavior\030\n \001(\0162Q.google.eve" + + "nts.cloud.notebooks.v1.RuntimeSoftwareCo" + + "nfig.PostStartupScriptBehavior\022\035\n\020disabl" + + "e_terminal\030\013 \001(\010H\003\210\001\001\022\024\n\007version\030\014 \001(\tH\004" + + "\210\001\001\022\033\n\016mixer_disabled\030\r \001(\010H\005\210\001\001\"\200\001\n\031Pos" + + "tStartupScriptBehavior\022,\n(POST_STARTUP_S" + + "CRIPT_BEHAVIOR_UNSPECIFIED\020\000\022\023\n\017RUN_EVER" + + "Y_START\020\001\022 \n\034DOWNLOAD_AND_RUN_EVERY_STAR" + + "T\020\002B\033\n\031_enable_health_monitoringB\020\n\016_idl" + + "e_shutdownB\016\n\014_upgradeableB\023\n\021_disable_t" + + "erminalB\n\n\010_versionB\021\n\017_mixer_disabled\"\243" + + "\001\n\016RuntimeMetrics\022[\n\016system_metrics\030\001 \003(" + + "\0132C.google.events.cloud.notebooks.v1.Run" + + "timeMetrics.SystemMetricsEntry\0324\n\022System" + + "MetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\"u\n\035RuntimeShieldedInstanceConfig\022\032\n" + + "\022enable_secure_boot\030\001 \001(\010\022\023\n\013enable_vtpm" + + "\030\002 \001(\010\022#\n\033enable_integrity_monitoring\030\003 " + + "\001(\010\"\224\001\n\016VirtualMachine\022\025\n\rinstance_name\030" + + "\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022V\n\026virtual_ma" + + "chine_config\030\003 \001(\01326.google.events.cloud" + + ".notebooks.v1.VirtualMachineConfig\"\324\t\n\024V" + + "irtualMachineConfig\022\014\n\004zone\030\001 \001(\t\022\024\n\014mac" + + "hine_type\030\002 \001(\t\022J\n\020container_images\030\003 \003(" + + "\01320.google.events.cloud.notebooks.v1.Con" + + "tainerImage\022>\n\tdata_disk\030\004 \001(\0132+.google." + + "events.cloud.notebooks.v1.LocalDisk\022M\n\021e" + + "ncryption_config\030\005 \001(\01322.google.events.c" + + "loud.notebooks.v1.EncryptionConfig\022a\n\030sh" + + "ielded_instance_config\030\006 \001(\0132?.google.ev" + + "ents.cloud.notebooks.v1.RuntimeShieldedI" + + "nstanceConfig\022V\n\022accelerator_config\030\007 \001(" + + "\0132:.google.events.cloud.notebooks.v1.Run" + + "timeAcceleratorConfig\022\017\n\007network\030\010 \001(\t\022\016" + + "\n\006subnet\030\t \001(\t\022\030\n\020internal_ip_only\030\n \001(\010" + + "\022\014\n\004tags\030\r \003(\t\022e\n\020guest_attributes\030\016 \003(\013" + + "2K.google.events.cloud.notebooks.v1.Virt" + + "ualMachineConfig.GuestAttributesEntry\022V\n" + + "\010metadata\030\017 \003(\0132D.google.events.cloud.no" + + "tebooks.v1.VirtualMachineConfig.Metadata" + + "Entry\022R\n\006labels\030\020 \003(\0132B.google.events.cl" + + "oud.notebooks.v1.VirtualMachineConfig.La" + + "belsEntry\022P\n\010nic_type\030\021 \001(\0162>.google.eve" + + "nts.cloud.notebooks.v1.VirtualMachineCon" + + "fig.NicType\022\031\n\021reserved_ip_range\030\022 \001(\t\022T" + + "\n\nboot_image\030\023 \001(\0132@.google.events.cloud" + + ".notebooks.v1.VirtualMachineConfig.BootI" + + "mage\032\013\n\tBootImage\0326\n\024GuestAttributesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032/\n\rMet" + + "adataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\">\n\007NicType\022\030\n\024UNSPECIFIED_NIC_" + + "TYPE\020\000\022\016\n\nVIRTIO_NET\020\001\022\t\n\005GVNIC\020\002\"\357\014\n\021Ex" + + "ecutionTemplate\022Q\n\nscale_tier\030\001 \001(\0162=.go" + + "ogle.events.cloud.notebooks.v1.Execution" + + "Template.ScaleTier\022\023\n\013master_type\030\002 \001(\t\022" + + "j\n\022accelerator_config\030\003 \001(\0132N.google.eve" + + "nts.cloud.notebooks.v1.ExecutionTemplate" + + ".SchedulerAcceleratorConfig\022O\n\006labels\030\004 " + + "\003(\0132?.google.events.cloud.notebooks.v1.E" + + "xecutionTemplate.LabelsEntry\022\033\n\023input_no" + + "tebook_file\030\005 \001(\t\022\033\n\023container_image_uri" + + "\030\006 \001(\t\022\036\n\026output_notebook_folder\030\007 \001(\t\022\030" + + "\n\020params_yaml_file\030\010 \001(\t\022\022\n\nparameters\030\t" + + " \001(\t\022\027\n\017service_account\030\n \001(\t\022M\n\010job_typ" + + "e\030\013 \001(\0162;.google.events.cloud.notebooks." + + "v1.ExecutionTemplate.JobType\022e\n\023dataproc" + + "_parameters\030\014 \001(\0132F.google.events.cloud." + + "notebooks.v1.ExecutionTemplate.DataprocP" + + "arametersH\000\022f\n\024vertex_ai_parameters\030\r \001(" + + "\0132F.google.events.cloud.notebooks.v1.Exe" + + "cutionTemplate.VertexAIParametersH\000\022\023\n\013k" + + "ernel_spec\030\016 \001(\t\022\023\n\013tensorboard\030\017 \001(\t\032\214\001" + + "\n\032SchedulerAcceleratorConfig\022Z\n\004type\030\001 \001" + + "(\0162L.google.events.cloud.notebooks.v1.Ex" + + "ecutionTemplate.SchedulerAcceleratorType" + + "\022\022\n\ncore_count\030\002 \001(\003\032%\n\022DataprocParamete" + + "rs\022\017\n\007cluster\030\001 \001(\t\032\257\001\n\022VertexAIParamete" + + "rs\022\017\n\007network\030\001 \001(\t\022\\\n\003env\030\002 \003(\0132O.googl" + + "e.events.cloud.notebooks.v1.ExecutionTem" + + "plate.VertexAIParameters.EnvEntry\032*\n\010Env" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n" + + "\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\"{\n\tScaleTier\022\032\n\026SCALE_TIER_UNSPECIF" + + "IED\020\000\022\t\n\005BASIC\020\001\022\016\n\nSTANDARD_1\020\002\022\r\n\tPREM" + + "IUM_1\020\003\022\r\n\tBASIC_GPU\020\004\022\r\n\tBASIC_TPU\020\005\022\n\n" + + "\006CUSTOM\020\006\"\343\001\n\030SchedulerAcceleratorType\022*" + + "\n&SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED" + + "\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA_TESLA" + + "_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017NVIDIA" + + "_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\025\n\021NVID" + + "IA_TESLA_A100\020\n\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007\"" + + "@\n\007JobType\022\030\n\024JOB_TYPE_UNSPECIFIED\020\000\022\r\n\t" + + "VERTEX_AI\020\001\022\014\n\010DATAPROC\020\002B\020\n\016job_paramet" + + "ers\"\212\004\n\tExecution\022O\n\022execution_template\030" + + "\001 \001(\01323.google.events.cloud.notebooks.v1" + + ".ExecutionTemplate\022\014\n\004name\030\002 \001(\t\022\024\n\014disp" + + "lay_name\030\003 \001(\t\022\023\n\013description\030\004 \001(\t\022/\n\013c" + + "reate_time\030\005 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022@\n\005state\030\007 \001(\01621.google.ev" + + "ents.cloud.notebooks.v1.Execution.State\022" + + "\034\n\024output_notebook_file\030\010 \001(\t\022\017\n\007job_uri" + + "\030\t \001(\t\"\237\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\n\n\006QUEUED\020\001\022\r\n\tPREPARING\020\002\022\013\n\007RUNNING\020\003\022" + + "\r\n\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\016\n\nCANCELLING" + + "\020\006\022\r\n\tCANCELLED\020\007\022\013\n\007EXPIRED\020\t\022\020\n\014INITIA" + + "LIZING\020\n\"\361\001\n\023ReservationAffinity\022\\\n\030cons" + + "ume_reservation_type\030\001 \001(\0162:.google.even" + + "ts.cloud.notebooks.v1.ReservationAffinit" + + "y.Type\022\013\n\003key\030\002 \001(\t\022\016\n\006values\030\003 \003(\t\"_\n\004T" + + "ype\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016NO_RESERVAT" + + "ION\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024SPECIFIC_R" + + "ESERVATION\020\003\"\375\030\n\010Instance\022\014\n\004name\030\001 \001(\t\022" + + "=\n\010vm_image\030\002 \001(\0132).google.events.cloud." + + "notebooks.v1.VmImageH\000\022K\n\017container_imag" + + "e\030\003 \001(\01320.google.events.cloud.notebooks." + + "v1.ContainerImageH\000\022\033\n\023post_startup_scri" + + "pt\030\004 \001(\t\022\021\n\tproxy_uri\030\005 \001(\t\022\027\n\017service_a" + + "ccount\030\007 \001(\t\022\036\n\026service_account_scopes\030\037" + + " \003(\t\022\024\n\014machine_type\030\010 \001(\t\022X\n\022accelerato" + + "r_config\030\t \001(\0132<.google.events.cloud.not" + + "ebooks.v1.Instance.AcceleratorConfig\022?\n\005" + + "state\030\n \001(\01620.google.events.cloud.notebo" + + "oks.v1.Instance.State\022\032\n\022install_gpu_dri" + + "ver\030\013 \001(\010\022\036\n\026custom_gpu_driver_path\030\014 \001(" + + "\t\022>\n\005disks\030\034 \003(\0132/.google.events.cloud.n" + + "otebooks.v1.Instance.Disk\022c\n\030shielded_in" + + "stance_config\030\036 \001(\0132A.google.events.clou" + + "d.notebooks.v1.Instance.ShieldedInstance" + + "Config\022\024\n\014no_public_ip\030\021 \001(\010\022\027\n\017no_proxy" + + "_access\030\022 \001(\010\022\017\n\007network\030\023 \001(\t\022\016\n\006subnet" + + "\030\024 \001(\t\022F\n\006labels\030\025 \003(\01326.google.events.c" + + "loud.notebooks.v1.Instance.LabelsEntry\022J" + + "\n\010metadata\030\026 \003(\01328.google.events.cloud.n" + + "otebooks.v1.Instance.MetadataEntry\022\014\n\004ta" + + "gs\030 \003(\t\022W\n\017upgrade_history\030\035 \003(\0132>.goog" + + "le.events.cloud.notebooks.v1.Instance.Up" + + "gradeHistoryEntry\022D\n\010nic_type\030! \001(\01622.go" + + "ogle.events.cloud.notebooks.v1.Instance." + + "NicType\022S\n\024reservation_affinity\030\" \001(\01325." + + "google.events.cloud.notebooks.v1.Reserva" + + "tionAffinity\022\017\n\007creator\030$ \001(\t\022\026\n\016can_ip_" + + "forward\030\' \001(\010\022/\n\013create_time\030\027 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022/\n\013update_time\030\030 " + + "\001(\0132\032.google.protobuf.Timestamp\032q\n\021Accel" + + "eratorConfig\022H\n\004type\030\001 \001(\0162:.google.even" + + "ts.cloud.notebooks.v1.Instance.Accelerat" + + "orType\022\022\n\ncore_count\030\002 \001(\003\032\275\002\n\004Disk\022\023\n\013a" + + "uto_delete\030\001 \001(\010\022\014\n\004boot\030\002 \001(\010\022\023\n\013device" + + "_name\030\003 \001(\t\022\024\n\014disk_size_gb\030\004 \001(\003\022Y\n\021gue" + + "st_os_features\030\005 \003(\0132>.google.events.clo" + + "ud.notebooks.v1.Instance.Disk.GuestOsFea" + + "ture\022\r\n\005index\030\006 \001(\003\022\021\n\tinterface\030\007 \001(\t\022\014" + + "\n\004kind\030\010 \001(\t\022\020\n\010licenses\030\t \003(\t\022\014\n\004mode\030\n" + + " \001(\t\022\016\n\006source\030\013 \001(\t\022\014\n\004type\030\014 \001(\t\032\036\n\016Gu" + + "estOsFeature\022\014\n\004type\030\001 \001(\t\032n\n\026ShieldedIn" + + "stanceConfig\022\032\n\022enable_secure_boot\030\001 \001(\010" + + "\022\023\n\013enable_vtpm\030\002 \001(\010\022#\n\033enable_integrit" + + "y_monitoring\030\003 \001(\010\032\206\004\n\023UpgradeHistoryEnt" + + "ry\022\020\n\010snapshot\030\001 \001(\t\022\020\n\010vm_image\030\002 \001(\t\022\027" + + "\n\017container_image\030\003 \001(\t\022\021\n\tframework\030\004 \001" + + "(\t\022\017\n\007version\030\005 \001(\t\022S\n\005state\030\006 \001(\0162D.goo" + + "gle.events.cloud.notebooks.v1.Instance.U" + + "pgradeHistoryEntry.State\022/\n\013create_time\030" + + "\007 \001(\0132\032.google.protobuf.Timestamp\022\024\n\014tar" + + "get_image\030\010 \001(\t\022U\n\006action\030\t \001(\0162E.google" + + ".events.cloud.notebooks.v1.Instance.Upgr" + + "adeHistoryEntry.Action\022\026\n\016target_version" + + "\030\n \001(\t\"F\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013" + + "\n\007STARTED\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\";" + + "\n\006Action\022\026\n\022ACTION_UNSPECIFIED\020\000\022\013\n\007UPGR" + + "ADE\020\001\022\014\n\010ROLLBACK\020\002\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032/\n\rMetadataEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\235\002\n\017" + + "AcceleratorType\022 \n\034ACCELERATOR_TYPE_UNSP" + + "ECIFIED\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDI" + + "A_TESLA_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n" + + "\017NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022" + + "\025\n\021NVIDIA_TESLA_A100\020\013\022\027\n\023NVIDIA_TESLA_T" + + "4_VWS\020\010\022\031\n\025NVIDIA_TESLA_P100_VWS\020\t\022\027\n\023NV" + + "IDIA_TESLA_P4_VWS\020\n\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V" + + "3\020\007\"\303\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010" + + "STARTING\020\001\022\020\n\014PROVISIONING\020\002\022\n\n\006ACTIVE\020\003" + + "\022\014\n\010STOPPING\020\004\022\013\n\007STOPPED\020\005\022\013\n\007DELETED\020\006" + + "\022\r\n\tUPGRADING\020\007\022\020\n\014INITIALIZING\020\010\022\017\n\013REG" + + "ISTERING\020\t\022\016\n\nSUSPENDING\020\n\022\r\n\tSUSPENDED\020" + + "\013\"c\n\010DiskType\022\031\n\025DISK_TYPE_UNSPECIFIED\020\000" + + "\022\017\n\013PD_STANDARD\020\001\022\n\n\006PD_SSD\020\002\022\017\n\013PD_BALA" + + "NCED\020\003\022\016\n\nPD_EXTREME\020\004\"E\n\016DiskEncryption" + + "\022\037\n\033DISK_ENCRYPTION_UNSPECIFIED\020\000\022\010\n\004GME" + + "K\020\001\022\010\n\004CMEK\020\002\">\n\007NicType\022\030\n\024UNSPECIFIED_" + + "NIC_TYPE\020\000\022\016\n\nVIRTIO_NET\020\001\022\t\n\005GVNIC\020\002B\r\n" + + "\013environment\"\243\004\n\010Schedule\022\014\n\004name\030\001 \001(\t\022" + + "\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 \001" + + "(\t\022?\n\005state\030\004 \001(\01620.google.events.cloud." + + "notebooks.v1.Schedule.State\022\025\n\rcron_sche" + + "dule\030\005 \001(\t\022\021\n\ttime_zone\030\006 \001(\t\022/\n\013create_" + + "time\030\007 \001(\0132\032.google.protobuf.Timestamp\022/" + + "\n\013update_time\030\010 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022O\n\022execution_template\030\t \001(\01323.go" + + "ogle.events.cloud.notebooks.v1.Execution" + + "Template\022F\n\021recent_executions\030\n \003(\0132+.go" + + "ogle.events.cloud.notebooks.v1.Execution" + + "\"x\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENAB" + + "LED\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED\020\003\022\021\n\rUPDAT" + + "E_FAILED\020\004\022\020\n\014INITIALIZING\020\005\022\014\n\010DELETING" + + "\020\006\"_\n\020RuntimeEventData\022?\n\007payload\030\001 \001(\0132" + + ").google.events.cloud.notebooks.v1.Runti" + + "meH\000\210\001\001B\n\n\010_payload\"c\n\022ExecutionEventDat" + + "a\022A\n\007payload\030\001 \001(\0132+.google.events.cloud" + + ".notebooks.v1.ExecutionH\000\210\001\001B\n\n\010_payload" + + "\"a\n\021InstanceEventData\022@\n\007payload\030\001 \001(\0132*" + + ".google.events.cloud.notebooks.v1.Instan" + + "ceH\000\210\001\001B\n\n\010_payload\"a\n\021ScheduleEventData" + + "\022@\n\007payload\030\001 \001(\0132*.google.events.cloud." + + "notebooks.v1.ScheduleH\000\210\001\001B\n\n\010_payload\"g" + + "\n\024EnvironmentEventData\022C\n\007payload\030\001 \001(\0132" + + "-.google.events.cloud.notebooks.v1.Envir" + + "onmentH\000\210\001\001B\n\n\010_payloadB\236\001\n$com.google.e" + + "vents.cloud.notebooks.v1P\001\252\002)Google.Even" + + "ts.Protobuf.Cloud.Notebooks.V1\312\002 Google\\" + + "Events\\Cloud\\Notebooks\\V1\352\002$Google::Even" + + "ts::Cloud::Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_events_cloud_notebooks_v1_Environment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_notebooks_v1_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Environment_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "VmImage", + "ContainerImage", + "PostStartupScript", + "CreateTime", + "ImageType", + }); + internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_notebooks_v1_VmImage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor, + new java.lang.String[] { + "Project", "ImageName", "ImageFamily", "Image", + }); + internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_events_cloud_notebooks_v1_ContainerImage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ContainerImage_descriptor, + new java.lang.String[] { + "Repository", "Tag", + }); + internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_events_cloud_notebooks_v1_Runtime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor, + new java.lang.String[] { + "Name", + "VirtualMachine", + "State", + "HealthState", + "AccessConfig", + "SoftwareConfig", + "Metrics", + "CreateTime", + "UpdateTime", + "Labels", + "RuntimeType", + }); + internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKey", + }); + internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_events_cloud_notebooks_v1_LocalDisk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor, + new java.lang.String[] { + "AutoDelete", + "Boot", + "DeviceName", + "GuestOsFeatures", + "Index", + "Interface", + "Kind", + "Licenses", + "Mode", + "Source", + "Type", + }); + internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor = + internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor, + new java.lang.String[] { + "Type", + }); + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor, + new java.lang.String[] { + "Description", "DiskName", "DiskSizeGb", "Labels", + }); + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor, + new java.lang.String[] { + "AccessType", "RuntimeOwner", "ProxyUri", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor, + new java.lang.String[] { + "NotebookUpgradeSchedule", + "EnableHealthMonitoring", + "IdleShutdown", + "IdleShutdownTimeout", + "InstallGpuDriver", + "CustomGpuDriverPath", + "PostStartupScript", + "Kernels", + "Upgradeable", + "PostStartupScriptBehavior", + "DisableTerminal", + "Version", + "MixerDisabled", + "EnableHealthMonitoring", + "IdleShutdown", + "Upgradeable", + "DisableTerminal", + "Version", + "MixerDisabled", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor, + new java.lang.String[] { + "SystemMetrics", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", "EnableVtpm", "EnableIntegrityMonitoring", + }); + internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_events_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor, + new java.lang.String[] { + "InstanceName", "InstanceId", "VirtualMachineConfig", + }); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor, + new java.lang.String[] { + "Zone", + "MachineType", + "ContainerImages", + "DataDisk", + "EncryptionConfig", + "ShieldedInstanceConfig", + "AcceleratorConfig", + "Network", + "Subnet", + "InternalIpOnly", + "Tags", + "GuestAttributes", + "Metadata", + "Labels", + "NicType", + "ReservedIpRange", + "BootImage", + }); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor = + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor, + new java.lang.String[] {}); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(3); + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor, + new java.lang.String[] { + "ScaleTier", + "MasterType", + "AcceleratorConfig", + "Labels", + "InputNotebookFile", + "ContainerImageUri", + "OutputNotebookFolder", + "ParamsYamlFile", + "Parameters", + "ServiceAccount", + "JobType", + "DataprocParameters", + "VertexAiParameters", + "KernelSpec", + "Tensorboard", + "JobParameters", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor = + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor = + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(1); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor, + new java.lang.String[] { + "Cluster", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor = + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(2); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor, + new java.lang.String[] { + "Network", "Env", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(3); + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_Execution_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_events_cloud_notebooks_v1_Execution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Execution_descriptor, + new java.lang.String[] { + "ExecutionTemplate", + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "State", + "OutputNotebookFile", + "JobUri", + }); + internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor, + new java.lang.String[] { + "ConsumeReservationType", "Key", "Values", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_events_cloud_notebooks_v1_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor, + new java.lang.String[] { + "Name", + "VmImage", + "ContainerImage", + "PostStartupScript", + "ProxyUri", + "ServiceAccount", + "ServiceAccountScopes", + "MachineType", + "AcceleratorConfig", + "State", + "InstallGpuDriver", + "CustomGpuDriverPath", + "Disks", + "ShieldedInstanceConfig", + "NoPublicIp", + "NoProxyAccess", + "Network", + "Subnet", + "Labels", + "Metadata", + "Tags", + "UpgradeHistory", + "NicType", + "ReservationAffinity", + "Creator", + "CanIpForward", + "CreateTime", + "UpdateTime", + "Environment", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(1); + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor, + new java.lang.String[] { + "AutoDelete", + "Boot", + "DeviceName", + "DiskSizeGb", + "GuestOsFeatures", + "Index", + "Interface", + "Kind", + "Licenses", + "Mode", + "Source", + "Type", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor + .getNestedTypes() + .get(0); + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor, + new java.lang.String[] { + "Type", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(2); + internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", "EnableVtpm", "EnableIntegrityMonitoring", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(3); + internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor, + new java.lang.String[] { + "Snapshot", + "VmImage", + "ContainerImage", + "Framework", + "Version", + "State", + "CreateTime", + "TargetImage", + "Action", + "TargetVersion", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(4); + internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_descriptor = + internal_static_google_events_cloud_notebooks_v1_Instance_descriptor + .getNestedTypes() + .get(5); + internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_events_cloud_notebooks_v1_Schedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "State", + "CronSchedule", + "TimeZone", + "CreateTime", + "UpdateTime", + "ExecutionTemplate", + "RecentExecutions", + }); + internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_events_cloud_notebooks_v1_InstanceEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor, + new java.lang.String[] { + "Payload", "Payload", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpec.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfig.java similarity index 51% rename from google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpec.java rename to google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfig.java index 81f6b764..64bcd3e8 100644 --- a/google-cloudevent-types/src/main/java/com/google/events/cloud/gkehub/v1/MembershipFeatureSpec.java +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfig.java @@ -14,36 +14,38 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/events/cloud/gkehub/v1/data.proto +// source: google/events/cloud/notebooks/v1/data.proto -package com.google.events.cloud.gkehub.v1; +package com.google.events.cloud.notebooks.v1; /** * * *
- * MembershipFeatureSpec contains configuration information for a single
- * Membership.
+ * Represents a custom encryption key configuration that can be applied to
+ * a resource. This will encrypt all disks in Virtual Machine.
  * 
* - * Protobuf type {@code google.events.cloud.gkehub.v1.MembershipFeatureSpec} + * Protobuf type {@code google.events.cloud.notebooks.v1.EncryptionConfig} */ -public final class MembershipFeatureSpec extends com.google.protobuf.GeneratedMessageV3 +public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.events.cloud.gkehub.v1.MembershipFeatureSpec) - MembershipFeatureSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.EncryptionConfig) + EncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use MembershipFeatureSpec.newBuilder() to construct. - private MembershipFeatureSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private MembershipFeatureSpec() {} + private EncryptionConfig() { + kmsKey_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MembershipFeatureSpec(); + return new EncryptionConfig(); } @java.lang.Override @@ -52,36 +54,75 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor; + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_fieldAccessorTable + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.class, - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.Builder.class); + com.google.events.cloud.notebooks.v1.EncryptionConfig.class, + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder.class); } - public static final int FLEET_INHERITED_FIELD_NUMBER = 1; - private boolean fleetInherited_ = false; + public static final int KMS_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; /** * * *
-   * True if value of `feature_spec` was inherited from a fleet-level default.
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
    * 
* - * bool fleet_inherited = 1; + * string kms_key = 1; * - * @return The fleetInherited. + * @return The kmsKey. */ @java.lang.Override - public boolean getFleetInherited() { - return fleetInherited_; + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -98,8 +139,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (fleetInherited_ != false) { - output.writeBool(1, fleetInherited_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); } getUnknownFields().writeTo(output); } @@ -110,8 +151,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (fleetInherited_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, fleetInherited_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,13 +164,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.events.cloud.gkehub.v1.MembershipFeatureSpec)) { + if (!(obj instanceof com.google.events.cloud.notebooks.v1.EncryptionConfig)) { return super.equals(obj); } - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec other = - (com.google.events.cloud.gkehub.v1.MembershipFeatureSpec) obj; + com.google.events.cloud.notebooks.v1.EncryptionConfig other = + (com.google.events.cloud.notebooks.v1.EncryptionConfig) obj; - if (getFleetInherited() != other.getFleetInherited()) return false; + if (!getKmsKey().equals(other.getKmsKey())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -141,78 +182,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FLEET_INHERITED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFleetInherited()); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom(byte[] data) + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseDelimitedFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseDelimitedFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec parseFrom( + public static com.google.events.cloud.notebooks.v1.EncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -230,7 +271,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec prototype) { + com.google.events.cloud.notebooks.v1.EncryptionConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -248,32 +289,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * MembershipFeatureSpec contains configuration information for a single
-   * Membership.
+   * Represents a custom encryption key configuration that can be applied to
+   * a resource. This will encrypt all disks in Virtual Machine.
    * 
* - * Protobuf type {@code google.events.cloud.gkehub.v1.MembershipFeatureSpec} + * Protobuf type {@code google.events.cloud.notebooks.v1.EncryptionConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.events.cloud.gkehub.v1.MembershipFeatureSpec) - com.google.events.cloud.gkehub.v1.MembershipFeatureSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.EncryptionConfig) + com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor; + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_fieldAccessorTable + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.class, - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.Builder.class); + com.google.events.cloud.notebooks.v1.EncryptionConfig.class, + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder.class); } - // Construct using com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.newBuilder() + // Construct using com.google.events.cloud.notebooks.v1.EncryptionConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -284,24 +325,24 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - fleetInherited_ = false; + kmsKey_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.events.cloud.gkehub.v1.Data - .internal_static_google_events_cloud_gkehub_v1_MembershipFeatureSpec_descriptor; + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EncryptionConfig_descriptor; } @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getDefaultInstanceForType() { - return com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.getDefaultInstance(); + public com.google.events.cloud.notebooks.v1.EncryptionConfig getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance(); } @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec build() { - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec result = buildPartial(); + public com.google.events.cloud.notebooks.v1.EncryptionConfig build() { + com.google.events.cloud.notebooks.v1.EncryptionConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -309,9 +350,9 @@ public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec build() { } @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec buildPartial() { - com.google.events.cloud.gkehub.v1.MembershipFeatureSpec result = - new com.google.events.cloud.gkehub.v1.MembershipFeatureSpec(this); + public com.google.events.cloud.notebooks.v1.EncryptionConfig buildPartial() { + com.google.events.cloud.notebooks.v1.EncryptionConfig result = + new com.google.events.cloud.notebooks.v1.EncryptionConfig(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -319,10 +360,10 @@ public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec buildPartial() { return result; } - private void buildPartial0(com.google.events.cloud.gkehub.v1.MembershipFeatureSpec result) { + private void buildPartial0(com.google.events.cloud.notebooks.v1.EncryptionConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.fleetInherited_ = fleetInherited_; + result.kmsKey_ = kmsKey_; } } @@ -361,19 +402,21 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.events.cloud.gkehub.v1.MembershipFeatureSpec) { - return mergeFrom((com.google.events.cloud.gkehub.v1.MembershipFeatureSpec) other); + if (other instanceof com.google.events.cloud.notebooks.v1.EncryptionConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.EncryptionConfig) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.events.cloud.gkehub.v1.MembershipFeatureSpec other) { - if (other == com.google.events.cloud.gkehub.v1.MembershipFeatureSpec.getDefaultInstance()) + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.EncryptionConfig other) { + if (other == com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance()) return this; - if (other.getFleetInherited() != false) { - setFleetInherited(other.getFleetInherited()); + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -401,12 +444,12 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: + case 10: { - fleetInherited_ = input.readBool(); + kmsKey_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; - } // case 8 + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -426,37 +469,77 @@ public Builder mergeFrom( private int bitField0_; - private boolean fleetInherited_; + private java.lang.Object kmsKey_ = ""; /** * * *
-     * True if value of `feature_spec` was inherited from a fleet-level default.
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
      * 
* - * bool fleet_inherited = 1; + * string kms_key = 1; * - * @return The fleetInherited. + * @return The kmsKey. */ - @java.lang.Override - public boolean getFleetInherited() { - return fleetInherited_; + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * True if value of `feature_spec` was inherited from a fleet-level default.
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
      * 
* - * bool fleet_inherited = 1; + * string kms_key = 1; * - * @param value The fleetInherited to set. + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @param value The kmsKey to set. * @return This builder for chaining. */ - public Builder setFleetInherited(boolean value) { - - fleetInherited_ = value; + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -465,16 +548,44 @@ public Builder setFleetInherited(boolean value) { * * *
-     * True if value of `feature_spec` was inherited from a fleet-level default.
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
      * 
* - * bool fleet_inherited = 1; + * string kms_key = 1; * * @return This builder for chaining. */ - public Builder clearFleetInherited() { + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); bitField0_ = (bitField0_ & ~0x00000001); - fleetInherited_ = false; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -490,24 +601,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.events.cloud.gkehub.v1.MembershipFeatureSpec) + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.EncryptionConfig) } - // @@protoc_insertion_point(class_scope:google.events.cloud.gkehub.v1.MembershipFeatureSpec) - private static final com.google.events.cloud.gkehub.v1.MembershipFeatureSpec DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.EncryptionConfig) + private static final com.google.events.cloud.notebooks.v1.EncryptionConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.events.cloud.gkehub.v1.MembershipFeatureSpec(); + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.EncryptionConfig(); } - public static com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getDefaultInstance() { + public static com.google.events.cloud.notebooks.v1.EncryptionConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public MembershipFeatureSpec parsePartialFrom( + public EncryptionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -526,17 +637,17 @@ public MembershipFeatureSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.events.cloud.gkehub.v1.MembershipFeatureSpec getDefaultInstanceForType() { + public com.google.events.cloud.notebooks.v1.EncryptionConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfigOrBuilder.java new file mode 100644 index 00000000..aed6174b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EncryptionConfigOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Environment.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Environment.java new file mode 100644 index 00000000..d03814e3 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Environment.java @@ -0,0 +1,2135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a software environment that is used to start a notebook
+ * instance.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + displayName_ = ""; + description_ = ""; + postStartupScript_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Environment.class, + com.google.events.cloud.notebooks.v1.Environment.Builder.class); + } + + private int imageTypeCase_ = 0; + private java.lang.Object imageType_; + + public enum ImageTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VM_IMAGE(6), + CONTAINER_IMAGE(7), + IMAGETYPE_NOT_SET(0); + private final int value; + + private ImageTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ImageTypeCase forNumber(int value) { + switch (value) { + case 6: + return VM_IMAGE; + case 7: + return CONTAINER_IMAGE; + case 0: + return IMAGETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageTypeCase getImageTypeCase() { + return ImageTypeCase.forNumber(imageTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return imageTypeCase_ == 6; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getVmImage() { + if (imageTypeCase_ == 6) { + return (com.google.events.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if (imageTypeCase_ == 6) { + return (com.google.events.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return imageTypeCase_ == 7; + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (imageTypeCase_ == 7) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if (imageTypeCase_ == 7) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (imageTypeCase_ == 6) { + output.writeMessage(6, (com.google.events.cloud.notebooks.v1.VmImage) imageType_); + } + if (imageTypeCase_ == 7) { + output.writeMessage(7, (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, postStartupScript_); + } + if (createTime_ != null) { + output.writeMessage(9, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (imageTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.events.cloud.notebooks.v1.VmImage) imageType_); + } + if (imageTypeCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, postStartupScript_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Environment)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Environment other = + (com.google.events.cloud.notebooks.v1.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getImageTypeCase().equals(other.getImageTypeCase())) return false; + switch (imageTypeCase_) { + case 6: + if (!getVmImage().equals(other.getVmImage())) return false; + break; + case 7: + if (!getContainerImage().equals(other.getContainerImage())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + switch (imageTypeCase_) { + case 6: + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + break; + case 7: + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Environment 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; + } + /** + * + * + *
+   * Definition of a software environment that is used to start a notebook
+   * instance.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Environment) + com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Environment.class, + com.google.events.cloud.notebooks.v1.Environment.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Environment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + if (vmImageBuilder_ != null) { + vmImageBuilder_.clear(); + } + if (containerImageBuilder_ != null) { + containerImageBuilder_.clear(); + } + postStartupScript_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + imageTypeCase_ = 0; + imageType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Environment getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Environment build() { + com.google.events.cloud.notebooks.v1.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Environment buildPartial() { + com.google.events.cloud.notebooks.v1.Environment result = + new com.google.events.cloud.notebooks.v1.Environment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Environment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.postStartupScript_ = postStartupScript_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.events.cloud.notebooks.v1.Environment result) { + result.imageTypeCase_ = imageTypeCase_; + result.imageType_ = this.imageType_; + if (imageTypeCase_ == 6 && vmImageBuilder_ != null) { + result.imageType_ = vmImageBuilder_.build(); + } + if (imageTypeCase_ == 7 && containerImageBuilder_ != null) { + result.imageType_ = containerImageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Environment) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Environment other) { + if (other == com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + switch (other.getImageTypeCase()) { + case VM_IMAGE: + { + mergeVmImage(other.getVmImage()); + break; + } + case CONTAINER_IMAGE: + { + mergeContainerImage(other.getContainerImage()); + break; + } + case IMAGETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 50: + { + input.readMessage(getVmImageFieldBuilder().getBuilder(), extensionRegistry); + imageTypeCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getContainerImageFieldBuilder().getBuilder(), extensionRegistry); + imageTypeCase_ = 7; + break; + } // case 58 + case 66: + { + postStartupScript_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 74: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int imageTypeCase_ = 0; + private java.lang.Object imageType_; + + public ImageTypeCase getImageTypeCase() { + return ImageTypeCase.forNumber(imageTypeCase_); + } + + public Builder clearImageType() { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder> + vmImageBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return imageTypeCase_ == 6; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getVmImage() { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6) { + return (com.google.events.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } else { + if (imageTypeCase_ == 6) { + return vmImageBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder setVmImage(com.google.events.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageType_ = value; + onChanged(); + } else { + vmImageBuilder_.setMessage(value); + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder setVmImage( + com.google.events.cloud.notebooks.v1.VmImage.Builder builderForValue) { + if (vmImageBuilder_ == null) { + imageType_ = builderForValue.build(); + onChanged(); + } else { + vmImageBuilder_.setMessage(builderForValue.build()); + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder mergeVmImage(com.google.events.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6 + && imageType_ != com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance()) { + imageType_ = + com.google.events.cloud.notebooks.v1.VmImage.newBuilder( + (com.google.events.cloud.notebooks.v1.VmImage) imageType_) + .mergeFrom(value) + .buildPartial(); + } else { + imageType_ = value; + } + onChanged(); + } else { + if (imageTypeCase_ == 6) { + vmImageBuilder_.mergeFrom(value); + } else { + vmImageBuilder_.setMessage(value); + } + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder clearVmImage() { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6) { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + } + } else { + if (imageTypeCase_ == 6) { + imageTypeCase_ = 0; + imageType_ = null; + } + vmImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public com.google.events.cloud.notebooks.v1.VmImage.Builder getVmImageBuilder() { + return getVmImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if ((imageTypeCase_ == 6) && (vmImageBuilder_ != null)) { + return vmImageBuilder_.getMessageOrBuilder(); + } else { + if (imageTypeCase_ == 6) { + return (com.google.events.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder> + getVmImageFieldBuilder() { + if (vmImageBuilder_ == null) { + if (!(imageTypeCase_ == 6)) { + imageType_ = com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + vmImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder>( + (com.google.events.cloud.notebooks.v1.VmImage) imageType_, + getParentForChildren(), + isClean()); + imageType_ = null; + } + imageTypeCase_ = 6; + onChanged(); + return vmImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImageBuilder_; + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return imageTypeCase_ == 7; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } else { + if (imageTypeCase_ == 7) { + return containerImageBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder setContainerImage(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageType_ = value; + onChanged(); + } else { + containerImageBuilder_.setMessage(value); + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder setContainerImage( + com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImageBuilder_ == null) { + imageType_ = builderForValue.build(); + onChanged(); + } else { + containerImageBuilder_.setMessage(builderForValue.build()); + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder mergeContainerImage(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7 + && imageType_ + != com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) { + imageType_ = + com.google.events.cloud.notebooks.v1.ContainerImage.newBuilder( + (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_) + .mergeFrom(value) + .buildPartial(); + } else { + imageType_ = value; + } + onChanged(); + } else { + if (imageTypeCase_ == 7) { + containerImageBuilder_.mergeFrom(value); + } else { + containerImageBuilder_.setMessage(value); + } + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder clearContainerImage() { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7) { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + } + } else { + if (imageTypeCase_ == 7) { + imageTypeCase_ = 0; + imageType_ = null; + } + containerImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder getContainerImageBuilder() { + return getContainerImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder + getContainerImageOrBuilder() { + if ((imageTypeCase_ == 7) && (containerImageBuilder_ != null)) { + return containerImageBuilder_.getMessageOrBuilder(); + } else { + if (imageTypeCase_ == 7) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImageFieldBuilder() { + if (containerImageBuilder_ == null) { + if (!(imageTypeCase_ == 7)) { + imageType_ = com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + containerImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder>( + (com.google.events.cloud.notebooks.v1.ContainerImage) imageType_, + getParentForChildren(), + isClean()); + imageType_ = null; + } + imageTypeCase_ = 7; + onChanged(); + return containerImageBuilder_; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + postStartupScript_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + postStartupScript_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Environment) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Environment) + private static final com.google.events.cloud.notebooks.v1.Environment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Environment(); + } + + public static com.google.events.cloud.notebooks.v1.Environment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Environment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventData.java new file mode 100644 index 00000000..892aeda8 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventData.java @@ -0,0 +1,725 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The data within all Environment events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.EnvironmentEventData} + */ +public final class EnvironmentEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.EnvironmentEventData) + EnvironmentEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentEventData.newBuilder() to construct. + private EnvironmentEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvironmentEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvironmentEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.EnvironmentEventData.class, + com.google.events.cloud.notebooks.v1.EnvironmentEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.Environment payload_; + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Environment getPayload() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.EnvironmentEventData)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.EnvironmentEventData other = + (com.google.events.cloud.notebooks.v1.EnvironmentEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.EnvironmentEventData 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 data within all Environment events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.EnvironmentEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.EnvironmentEventData) + com.google.events.cloud.notebooks.v1.EnvironmentEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.EnvironmentEventData.class, + com.google.events.cloud.notebooks.v1.EnvironmentEventData.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.EnvironmentEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_EnvironmentEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EnvironmentEventData getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.EnvironmentEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EnvironmentEventData build() { + com.google.events.cloud.notebooks.v1.EnvironmentEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EnvironmentEventData buildPartial() { + com.google.events.cloud.notebooks.v1.EnvironmentEventData result = + new com.google.events.cloud.notebooks.v1.EnvironmentEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.EnvironmentEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.EnvironmentEventData) { + return mergeFrom((com.google.events.cloud.notebooks.v1.EnvironmentEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.EnvironmentEventData other) { + if (other == com.google.events.cloud.notebooks.v1.EnvironmentEventData.getDefaultInstance()) + return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.Environment payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Environment, + com.google.events.cloud.notebooks.v1.Environment.Builder, + com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.notebooks.v1.Environment getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public Builder setPayload(com.google.events.cloud.notebooks.v1.Environment value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.notebooks.v1.Environment.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public Builder mergePayload(com.google.events.cloud.notebooks.v1.Environment value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ != com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public com.google.events.cloud.notebooks.v1.Environment.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + public com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Environment.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The Environment event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Environment, + com.google.events.cloud.notebooks.v1.Environment.Builder, + com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Environment, + com.google.events.cloud.notebooks.v1.Environment.Builder, + com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.EnvironmentEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.EnvironmentEventData) + private static final com.google.events.cloud.notebooks.v1.EnvironmentEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.EnvironmentEventData(); + } + + public static com.google.events.cloud.notebooks.v1.EnvironmentEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EnvironmentEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataOrBuilder.java new file mode 100644 index 00000000..5d2c4e4c --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface EnvironmentEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.EnvironmentEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.notebooks.v1.Environment getPayload(); + /** + * + * + *
+   * Optional. The Environment event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Environment payload = 1; + */ + com.google.events.cloud.notebooks.v1.EnvironmentOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentOrBuilder.java new file mode 100644 index 00000000..8fcc0abc --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/EnvironmentOrBuilder.java @@ -0,0 +1,240 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + boolean hasVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + com.google.events.cloud.notebooks.v1.VmImage getVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 6; + */ + com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder(); + + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + boolean hasContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); + + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + public com.google.events.cloud.notebooks.v1.Environment.ImageTypeCase getImageTypeCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Execution.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Execution.java new file mode 100644 index 00000000..9a9757b1 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Execution.java @@ -0,0 +1,2638 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a single executed notebook.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Execution} + */ +public final class Execution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Execution) + ExecutionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Execution.newBuilder() to construct. + private Execution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Execution() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + outputNotebookFile_ = ""; + jobUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Execution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Execution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Execution.class, + com.google.events.cloud.notebooks.v1.Execution.Builder.class); + } + + /** + * + * + *
+   * Enum description of the state of the underlying AIP job.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Execution.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The job state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The job has been just created and processing has not yet begun.
+     * 
+ * + * QUEUED = 1; + */ + QUEUED(1), + /** + * + * + *
+     * The service is preparing to execution the job.
+     * 
+ * + * PREPARING = 2; + */ + PREPARING(2), + /** + * + * + *
+     * The job is in progress.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + /** + * + * + *
+     * The job completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * The job failed.
+     * `error_message` should contain the details of the failure.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + * + * + *
+     * The job is being cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLING = 6; + */ + CANCELLING(6), + /** + * + * + *
+     * The job has been cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLED = 7; + */ + CANCELLED(7), + /** + * + * + *
+     * The job has become expired (relevant to Vertex AI jobs)
+     * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState
+     * 
+ * + * EXPIRED = 9; + */ + EXPIRED(9), + /** + * + * + *
+     * The Execution is being created.
+     * 
+ * + * INITIALIZING = 10; + */ + INITIALIZING(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The job state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job has been just created and processing has not yet begun.
+     * 
+ * + * QUEUED = 1; + */ + public static final int QUEUED_VALUE = 1; + /** + * + * + *
+     * The service is preparing to execution the job.
+     * 
+ * + * PREPARING = 2; + */ + public static final int PREPARING_VALUE = 2; + /** + * + * + *
+     * The job is in progress.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + /** + * + * + *
+     * The job completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * The job failed.
+     * `error_message` should contain the details of the failure.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + /** + * + * + *
+     * The job is being cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLING = 6; + */ + public static final int CANCELLING_VALUE = 6; + /** + * + * + *
+     * The job has been cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLED = 7; + */ + public static final int CANCELLED_VALUE = 7; + /** + * + * + *
+     * The job has become expired (relevant to Vertex AI jobs)
+     * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState
+     * 
+ * + * EXPIRED = 9; + */ + public static final int EXPIRED_VALUE = 9; + /** + * + * + *
+     * The Execution is being created.
+     * 
+ * + * INITIALIZING = 10; + */ + public static final int INITIALIZING_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return QUEUED; + case 2: + return PREPARING; + case 3: + return RUNNING; + case 4: + return SUCCEEDED; + case 5: + return FAILED; + case 6: + return CANCELLING; + case 7: + return CANCELLED; + case 9: + return EXPIRED; + case 10: + return INITIALIZING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Execution.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Execution.State) + } + + public static final int EXECUTION_TEMPLATE_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + @java.lang.Override + public boolean hasExecutionTemplate() { + return executionTemplate_ != null; + } + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution.State getState() { + com.google.events.cloud.notebooks.v1.Execution.State result = + com.google.events.cloud.notebooks.v1.Execution.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Execution.State.UNRECOGNIZED + : result; + } + + public static final int OUTPUT_NOTEBOOK_FILE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object outputNotebookFile_ = ""; + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + @java.lang.Override + public java.lang.String getOutputNotebookFile() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFile_ = s; + return s; + } + } + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputNotebookFileBytes() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_URI_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object jobUri_ = ""; + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9; + * + * @return The jobUri. + */ + @java.lang.Override + public java.lang.String getJobUri() { + java.lang.Object ref = jobUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9; + * + * @return The bytes for jobUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobUriBytes() { + java.lang.Object ref = jobUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (executionTemplate_ != null) { + output.writeMessage(1, getExecutionTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Execution.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputNotebookFile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, outputNotebookFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, jobUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (executionTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExecutionTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Execution.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputNotebookFile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, outputNotebookFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, jobUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Execution)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Execution other = + (com.google.events.cloud.notebooks.v1.Execution) obj; + + if (hasExecutionTemplate() != other.hasExecutionTemplate()) return false; + if (hasExecutionTemplate()) { + if (!getExecutionTemplate().equals(other.getExecutionTemplate())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getOutputNotebookFile().equals(other.getOutputNotebookFile())) return false; + if (!getJobUri().equals(other.getJobUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExecutionTemplate()) { + hash = (37 * hash) + EXECUTION_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTemplate().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + OUTPUT_NOTEBOOK_FILE_FIELD_NUMBER; + hash = (53 * hash) + getOutputNotebookFile().hashCode(); + hash = (37 * hash) + JOB_URI_FIELD_NUMBER; + hash = (53 * hash) + getJobUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Execution 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 definition of a single executed notebook.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Execution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Execution) + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Execution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Execution.class, + com.google.events.cloud.notebooks.v1.Execution.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Execution.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + executionTemplate_ = null; + if (executionTemplateBuilder_ != null) { + executionTemplateBuilder_.dispose(); + executionTemplateBuilder_ = null; + } + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + state_ = 0; + outputNotebookFile_ = ""; + jobUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution build() { + com.google.events.cloud.notebooks.v1.Execution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution buildPartial() { + com.google.events.cloud.notebooks.v1.Execution result = + new com.google.events.cloud.notebooks.v1.Execution(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Execution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executionTemplate_ = + executionTemplateBuilder_ == null + ? executionTemplate_ + : executionTemplateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.outputNotebookFile_ = outputNotebookFile_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.jobUri_ = jobUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Execution) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Execution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Execution other) { + if (other == com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance()) return this; + if (other.hasExecutionTemplate()) { + mergeExecutionTemplate(other.getExecutionTemplate()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getOutputNotebookFile().isEmpty()) { + outputNotebookFile_ = other.outputNotebookFile_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getJobUri().isEmpty()) { + jobUri_ = other.jobUri_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getExecutionTemplateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + outputNotebookFile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + jobUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + executionTemplateBuilder_; + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + public boolean hasExecutionTemplate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } else { + return executionTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder setExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTemplate_ = value; + } else { + executionTemplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder setExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder builderForValue) { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = builderForValue.build(); + } else { + executionTemplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder mergeExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && executionTemplate_ != null + && executionTemplate_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance()) { + getExecutionTemplateBuilder().mergeFrom(value); + } else { + executionTemplate_ = value; + } + } else { + executionTemplateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder clearExecutionTemplate() { + bitField0_ = (bitField0_ & ~0x00000001); + executionTemplate_ = null; + if (executionTemplateBuilder_ != null) { + executionTemplateBuilder_.dispose(); + executionTemplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder + getExecutionTemplateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExecutionTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + if (executionTemplateBuilder_ != null) { + return executionTemplateBuilder_.getMessageOrBuilder(); + } else { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + getExecutionTemplateFieldBuilder() { + if (executionTemplateBuilder_ == null) { + executionTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder>( + getExecutionTemplate(), getParentForChildren(), isClean()); + executionTemplate_ = null; + } + return executionTemplateBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution.State getState() { + com.google.events.cloud.notebooks.v1.Execution.State result = + com.google.events.cloud.notebooks.v1.Execution.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Execution.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.events.cloud.notebooks.v1.Execution.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object outputNotebookFile_ = ""; + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + public java.lang.String getOutputNotebookFile() { + java.lang.Object ref = outputNotebookFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + public com.google.protobuf.ByteString getOutputNotebookFileBytes() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @param value The outputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputNotebookFile_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return This builder for chaining. + */ + public Builder clearOutputNotebookFile() { + outputNotebookFile_ = getDefaultInstance().getOutputNotebookFile(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @param value The bytes for outputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputNotebookFile_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object jobUri_ = ""; + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9; + * + * @return The jobUri. + */ + public java.lang.String getJobUri() { + java.lang.Object ref = jobUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9; + * + * @return The bytes for jobUri. + */ + public com.google.protobuf.ByteString getJobUriBytes() { + java.lang.Object ref = jobUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9; + * + * @param value The jobUri to set. + * @return This builder for chaining. + */ + public Builder setJobUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + jobUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9; + * + * @return This builder for chaining. + */ + public Builder clearJobUri() { + jobUri_ = getDefaultInstance().getJobUri(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9; + * + * @param value The bytes for jobUri to set. + * @return This builder for chaining. + */ + public Builder setJobUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + jobUri_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Execution) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Execution) + private static final com.google.events.cloud.notebooks.v1.Execution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Execution(); + } + + public static com.google.events.cloud.notebooks.v1.Execution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Execution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventData.java new file mode 100644 index 00000000..528ebd33 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventData.java @@ -0,0 +1,725 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The data within all Execution events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionEventData} + */ +public final class ExecutionEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ExecutionEventData) + ExecutionEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionEventData.newBuilder() to construct. + private ExecutionEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionEventData.class, + com.google.events.cloud.notebooks.v1.ExecutionEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.Execution payload_; + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution getPayload() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.ExecutionEventData)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ExecutionEventData other = + (com.google.events.cloud.notebooks.v1.ExecutionEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ExecutionEventData 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 data within all Execution events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ExecutionEventData) + com.google.events.cloud.notebooks.v1.ExecutionEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionEventData.class, + com.google.events.cloud.notebooks.v1.ExecutionEventData.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.ExecutionEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionEventData getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ExecutionEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionEventData build() { + com.google.events.cloud.notebooks.v1.ExecutionEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionEventData buildPartial() { + com.google.events.cloud.notebooks.v1.ExecutionEventData result = + new com.google.events.cloud.notebooks.v1.ExecutionEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.ExecutionEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.ExecutionEventData) { + return mergeFrom((com.google.events.cloud.notebooks.v1.ExecutionEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.ExecutionEventData other) { + if (other == com.google.events.cloud.notebooks.v1.ExecutionEventData.getDefaultInstance()) + return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.Execution payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.notebooks.v1.Execution getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public Builder setPayload(com.google.events.cloud.notebooks.v1.Execution value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public Builder mergePayload(com.google.events.cloud.notebooks.v1.Execution value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ != com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public com.google.events.cloud.notebooks.v1.Execution.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + public com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The Execution event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ExecutionEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ExecutionEventData) + private static final com.google.events.cloud.notebooks.v1.ExecutionEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.ExecutionEventData(); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutionEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataOrBuilder.java new file mode 100644 index 00000000..7d5ece67 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ExecutionEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ExecutionEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.notebooks.v1.Execution getPayload(); + /** + * + * + *
+   * Optional. The Execution event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Execution payload = 1; + */ + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionOrBuilder.java new file mode 100644 index 00000000..fd795da2 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionOrBuilder.java @@ -0,0 +1,284 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ExecutionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Execution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + boolean hasExecutionTemplate(); + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate(); + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Execution.State state = 7; + * + * @return The state. + */ + com.google.events.cloud.notebooks.v1.Execution.State getState(); + + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + java.lang.String getOutputNotebookFile(); + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + com.google.protobuf.ByteString getOutputNotebookFileBytes(); + + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9; + * + * @return The jobUri. + */ + java.lang.String getJobUri(); + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9; + * + * @return The bytes for jobUri. + */ + com.google.protobuf.ByteString getJobUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplate.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplate.java new file mode 100644 index 00000000..5a263b71 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplate.java @@ -0,0 +1,7664 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The description a notebook execution workload.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate} + */ +public final class ExecutionTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ExecutionTemplate) + ExecutionTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionTemplate.newBuilder() to construct. + private ExecutionTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionTemplate() { + scaleTier_ = 0; + masterType_ = ""; + inputNotebookFile_ = ""; + containerImageUri_ = ""; + outputNotebookFolder_ = ""; + paramsYamlFile_ = ""; + parameters_ = ""; + serviceAccount_ = ""; + jobType_ = 0; + kernelSpec_ = ""; + tensorboard_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder.class); + } + + /** + * + * + *
+   * Required. Specifies the machine types, the number of replicas for workers
+   * and parameter servers.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier} + */ + public enum ScaleTier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified Scale Tier.
+     * 
+ * + * SCALE_TIER_UNSPECIFIED = 0; + */ + SCALE_TIER_UNSPECIFIED(0), + /** + * + * + *
+     * A single worker instance. This tier is suitable for learning how to use
+     * Cloud ML, and for experimenting with new models using small datasets.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Many workers and a few parameter servers.
+     * 
+ * + * STANDARD_1 = 2; + */ + STANDARD_1(2), + /** + * + * + *
+     * A large number of workers with many parameter servers.
+     * 
+ * + * PREMIUM_1 = 3; + */ + PREMIUM_1(3), + /** + * + * + *
+     * A single worker instance with a K80 GPU.
+     * 
+ * + * BASIC_GPU = 4; + */ + BASIC_GPU(4), + /** + * + * + *
+     * A single worker instance with a Cloud TPU.
+     * 
+ * + * BASIC_TPU = 5; + */ + BASIC_TPU(5), + /** + * + * + *
+     * The CUSTOM tier is not a set tier, but rather enables you to use your
+     * own cluster specification. When you use this tier, set values to
+     * configure your processing cluster according to these guidelines:
+     * *   You _must_ set `ExecutionTemplate.masterType` to specify the type
+     *     of machine to use for your master node. This is the only required
+     *     setting.
+     * 
+ * + * CUSTOM = 6; + */ + CUSTOM(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified Scale Tier.
+     * 
+ * + * SCALE_TIER_UNSPECIFIED = 0; + */ + public static final int SCALE_TIER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A single worker instance. This tier is suitable for learning how to use
+     * Cloud ML, and for experimenting with new models using small datasets.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Many workers and a few parameter servers.
+     * 
+ * + * STANDARD_1 = 2; + */ + public static final int STANDARD_1_VALUE = 2; + /** + * + * + *
+     * A large number of workers with many parameter servers.
+     * 
+ * + * PREMIUM_1 = 3; + */ + public static final int PREMIUM_1_VALUE = 3; + /** + * + * + *
+     * A single worker instance with a K80 GPU.
+     * 
+ * + * BASIC_GPU = 4; + */ + public static final int BASIC_GPU_VALUE = 4; + /** + * + * + *
+     * A single worker instance with a Cloud TPU.
+     * 
+ * + * BASIC_TPU = 5; + */ + public static final int BASIC_TPU_VALUE = 5; + /** + * + * + *
+     * The CUSTOM tier is not a set tier, but rather enables you to use your
+     * own cluster specification. When you use this tier, set values to
+     * configure your processing cluster according to these guidelines:
+     * *   You _must_ set `ExecutionTemplate.masterType` to specify the type
+     *     of machine to use for your master node. This is the only required
+     *     setting.
+     * 
+ * + * CUSTOM = 6; + */ + public static final int CUSTOM_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScaleTier valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ScaleTier forNumber(int value) { + switch (value) { + case 0: + return SCALE_TIER_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return STANDARD_1; + case 3: + return PREMIUM_1; + case 4: + return BASIC_GPU; + case 5: + return BASIC_TPU; + case 6: + return CUSTOM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ScaleTier findValueByNumber(int number) { + return ScaleTier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ScaleTier[] VALUES = values(); + + public static ScaleTier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ScaleTier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier) + } + + /** + * + * + *
+   * Hardware accelerator types for AI Platform Training jobs.
+   * 
+ * + * Protobuf enum {@code + * google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType} + */ + public enum SchedulerAcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified accelerator type. Default to no GPU.
+     * 
+ * + * SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Nvidia Tesla K80 GPU.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Nvidia Tesla P100 GPU.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Nvidia Tesla V100 GPU.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Nvidia Tesla T4 GPU.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * Nvidia Tesla A100 GPU.
+     * 
+ * + * NVIDIA_TESLA_A100 = 10; + */ + NVIDIA_TESLA_A100(10), + /** + * + * + *
+     * TPU v2.
+     * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+     * TPU v3.
+     * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified accelerator type. Default to no GPU.
+     * 
+ * + * SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Nvidia Tesla K80 GPU.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Nvidia Tesla P100 GPU.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Nvidia Tesla V100 GPU.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Nvidia Tesla T4 GPU.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * Nvidia Tesla A100 GPU.
+     * 
+ * + * NVIDIA_TESLA_A100 = 10; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 10; + /** + * + * + *
+     * TPU v2.
+     * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+     * TPU v3.
+     * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchedulerAcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SchedulerAcceleratorType forNumber(int value) { + switch (value) { + case 0: + return SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 10: + return NVIDIA_TESLA_A100; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SchedulerAcceleratorType findValueByNumber(int number) { + return SchedulerAcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final SchedulerAcceleratorType[] VALUES = values(); + + public static SchedulerAcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SchedulerAcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType) + } + + /** + * + * + *
+   * The backend used for this execution.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.ExecutionTemplate.JobType} + */ + public enum JobType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * JOB_TYPE_UNSPECIFIED = 0; + */ + JOB_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Custom Job in `aiplatform.googleapis.com`.
+     * Default value for an execution.
+     * 
+ * + * VERTEX_AI = 1; + */ + VERTEX_AI(1), + /** + * + * + *
+     * Run execution on a cluster with Dataproc as a job.
+     * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs
+     * 
+ * + * DATAPROC = 2; + */ + DATAPROC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * JOB_TYPE_UNSPECIFIED = 0; + */ + public static final int JOB_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Custom Job in `aiplatform.googleapis.com`.
+     * Default value for an execution.
+     * 
+ * + * VERTEX_AI = 1; + */ + public static final int VERTEX_AI_VALUE = 1; + /** + * + * + *
+     * Run execution on a cluster with Dataproc as a job.
+     * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs
+     * 
+ * + * DATAPROC = 2; + */ + public static final int DATAPROC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobType forNumber(int value) { + switch (value) { + case 0: + return JOB_TYPE_UNSPECIFIED; + case 1: + return VERTEX_AI; + case 2: + return DATAPROC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobType findValueByNumber(int number) { + return JobType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final JobType[] VALUES = values(); + + public static JobType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.JobType) + } + + public interface SchedulerAcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The type. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType getType(); + + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); + } + /** + * + * + *
+   * Definition of a hardware accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. See [GPUs on
+   * Compute Engine](https://cloud.google.com/compute/docs/gpus) to find a valid
+   * combination. TPUs are not supported.
+   * 
+ * + * Protobuf type {@code + * google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig} + */ + public static final class SchedulerAcceleratorConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + SchedulerAcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SchedulerAcceleratorConfig.newBuilder() to construct. + private SchedulerAcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchedulerAcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchedulerAcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + getType() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType.forNumber( + type_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_ = 0L; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig other = + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + 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; + } + /** + * + * + *
+     * Definition of a hardware accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. See [GPUs on
+     * Compute Engine](https://cloud.google.com/compute/docs/gpus) to find a valid
+     * combination. TPUs are not supported.
+     * 
+ * + * Protobuf type {@code + * google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + coreCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + build() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + buildPartial() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig result = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.coreCount_ = coreCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig other) { + if (other + == com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + coreCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + getType() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .forNumber(type_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + bitField0_ = (bitField0_ & ~0x00000002); + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + private static final com.google.events.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig(); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulerAcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataprocParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + java.lang.String getCluster(); + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters} + */ + public static final class DataprocParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + DataprocParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataprocParameters.newBuilder() to construct. + private DataprocParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataprocParameters() { + cluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataprocParameters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + .class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cluster_ = ""; + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } + } + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters other = + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) obj; + + if (!getCluster().equals(other.getCluster())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters 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; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + .class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cluster_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters build() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + buildPartial() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters result = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cluster_ = cluster_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters other) { + if (other + == com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance()) return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cluster_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cluster_ = ""; + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+       * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+       * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+       * 
+ * + * string cluster = 1; + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+       * 
+ * + * string cluster = 1; + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + cluster_ = getDefaultInstance().getCluster(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
+       * 
+ * + * string cluster = 1; + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + private static final com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters(); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataprocParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VertexAIParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+     * to which the Job should be peered. For example,
+     * `projects/12345/global/networks/myVPC`.
+     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where `{project}` is a project number, as in `12345`, and `{network}` is
+     * a network name.
+     * Private services access must already be configured for the network. If
+     * left unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+     * to which the Job should be peered. For example,
+     * `projects/12345/global/networks/myVPC`.
+     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where `{project}` is a project number, as in `12345`, and `{network}` is
+     * a network name.
+     * Private services access must already be configured for the network. If
+     * left unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + int getEnvCount(); + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + boolean containsEnv(java.lang.String key); + /** Use {@link #getEnvMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnv(); + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + java.util.Map getEnvMap(); + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + /* nullable */ + java.lang.String getEnvOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + java.lang.String getEnvOrThrow(java.lang.String key); + } + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters} + */ + public static final class VertexAIParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + VertexAIParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use VertexAIParameters.newBuilder() to construct. + private VertexAIParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VertexAIParameters() { + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VertexAIParameters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetEnv(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder + .class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+     * to which the Job should be peered. For example,
+     * `projects/12345/global/networks/myVPC`.
+     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where `{project}` is a project number, as in `12345`, and `{network}` is
+     * a network name.
+     * Private services access must already be configured for the network. If
+     * left unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+     * to which the Job should be peered. For example,
+     * `projects/12345/global/networks/myVPC`.
+     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where `{project}` is a project number, as in `12345`, and `{network}` is
+     * a network name.
+     * Private services access must already be configured for the network. If
+     * left unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENV_FIELD_NUMBER = 2; + + private static final class EnvDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_EnvEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField env_; + + private com.google.protobuf.MapField internalGetEnv() { + if (env_ == null) { + return com.google.protobuf.MapField.emptyMapField(EnvDefaultEntryHolder.defaultEntry); + } + return env_; + } + + public int getEnvCount() { + return internalGetEnv().getMap().size(); + } + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public boolean containsEnv(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnv().getMap().containsKey(key); + } + /** Use {@link #getEnvMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnv() { + return getEnvMap(); + } + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public java.util.Map getEnvMap() { + return internalGetEnv().getMap(); + } + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getEnvOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetEnv().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Environment variables.
+     * At most 100 environment variables can be specified and unique.
+     * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+     * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public java.lang.String getEnvOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetEnv().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnv(), EnvDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + for (java.util.Map.Entry entry : + internalGetEnv().getMap().entrySet()) { + com.google.protobuf.MapEntry env__ = + EnvDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, env__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters other = + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!internalGetEnv().equals(other.internalGetEnv())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (!internalGetEnv().getMap().isEmpty()) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnv().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters 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; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetEnv(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableEnv(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder + .class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + internalGetMutableEnv().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_VertexAIParameters_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters build() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + buildPartial() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters result = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.env_ = internalGetEnv(); + result.env_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters other) { + if (other + == com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableEnv().mergeFrom(other.internalGetEnv()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry env__ = + input.readMessage( + EnvDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableEnv().getMutableMap().put(env__.getKey(), env__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object network_ = ""; + /** + * + * + *
+       * The full name of the Compute Engine
+       * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+       * to which the Job should be peered. For example,
+       * `projects/12345/global/networks/myVPC`.
+       * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+       * is of the form `projects/{project}/global/networks/{network}`.
+       * Where `{project}` is a project number, as in `12345`, and `{network}` is
+       * a network name.
+       * Private services access must already be configured for the network. If
+       * left unspecified, the job is not peered with any network.
+       * 
+ * + * string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The full name of the Compute Engine
+       * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+       * to which the Job should be peered. For example,
+       * `projects/12345/global/networks/myVPC`.
+       * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+       * is of the form `projects/{project}/global/networks/{network}`.
+       * Where `{project}` is a project number, as in `12345`, and `{network}` is
+       * a network name.
+       * Private services access must already be configured for the network. If
+       * left unspecified, the job is not peered with any network.
+       * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The full name of the Compute Engine
+       * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+       * to which the Job should be peered. For example,
+       * `projects/12345/global/networks/myVPC`.
+       * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+       * is of the form `projects/{project}/global/networks/{network}`.
+       * Where `{project}` is a project number, as in `12345`, and `{network}` is
+       * a network name.
+       * Private services access must already be configured for the network. If
+       * left unspecified, the job is not peered with any network.
+       * 
+ * + * string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The full name of the Compute Engine
+       * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+       * to which the Job should be peered. For example,
+       * `projects/12345/global/networks/myVPC`.
+       * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+       * is of the form `projects/{project}/global/networks/{network}`.
+       * Where `{project}` is a project number, as in `12345`, and `{network}` is
+       * a network name.
+       * Private services access must already be configured for the network. If
+       * left unspecified, the job is not peered with any network.
+       * 
+ * + * string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The full name of the Compute Engine
+       * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
+       * to which the Job should be peered. For example,
+       * `projects/12345/global/networks/myVPC`.
+       * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
+       * is of the form `projects/{project}/global/networks/{network}`.
+       * Where `{project}` is a project number, as in `12345`, and `{network}` is
+       * a network name.
+       * Private services access must already be configured for the network. If
+       * left unspecified, the job is not peered with any network.
+       * 
+ * + * string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField env_; + + private com.google.protobuf.MapField internalGetEnv() { + if (env_ == null) { + return com.google.protobuf.MapField.emptyMapField(EnvDefaultEntryHolder.defaultEntry); + } + return env_; + } + + private com.google.protobuf.MapField + internalGetMutableEnv() { + if (env_ == null) { + env_ = com.google.protobuf.MapField.newMapField(EnvDefaultEntryHolder.defaultEntry); + } + if (!env_.isMutable()) { + env_ = env_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return env_; + } + + public int getEnvCount() { + return internalGetEnv().getMap().size(); + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public boolean containsEnv(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnv().getMap().containsKey(key); + } + /** Use {@link #getEnvMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnv() { + return getEnvMap(); + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public java.util.Map getEnvMap() { + return internalGetEnv().getMap(); + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getEnvOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetEnv().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + @java.lang.Override + public java.lang.String getEnvOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetEnv().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnv() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableEnv().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + public Builder removeEnv(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableEnv().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnv() { + bitField0_ |= 0x00000002; + return internalGetMutableEnv().getMutableMap(); + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + public Builder putEnv(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableEnv().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+       * Environment variables.
+       * At most 100 environment variables can be specified and unique.
+       * Example: `GCP_BUCKET=gs://my-bucket/samples/`
+       * 
+ * + * map<string, string> env = 2; + */ + public Builder putAllEnv(java.util.Map values) { + internalGetMutableEnv().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + private static final com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters(); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VertexAIParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int jobParametersCase_ = 0; + private java.lang.Object jobParameters_; + + public enum JobParametersCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATAPROC_PARAMETERS(12), + VERTEX_AI_PARAMETERS(13), + JOBPARAMETERS_NOT_SET(0); + private final int value; + + private JobParametersCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobParametersCase valueOf(int value) { + return forNumber(value); + } + + public static JobParametersCase forNumber(int value) { + switch (value) { + case 12: + return DATAPROC_PARAMETERS; + case 13: + return VERTEX_AI_PARAMETERS; + case 0: + return JOBPARAMETERS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public JobParametersCase getJobParametersCase() { + return JobParametersCase.forNumber(jobParametersCase_); + } + + public static final int SCALE_TIER_FIELD_NUMBER = 1; + private int scaleTier_ = 0; + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The enum numeric value on the wire for scaleTier. + */ + @java.lang.Override + public int getScaleTierValue() { + return scaleTier_; + } + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The scaleTier. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.forNumber(scaleTier_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.UNRECOGNIZED + : result; + } + + public static final int MASTER_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object masterType_ = ""; + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with
+   * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+   * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + @java.lang.Override + public java.lang.String getMasterType() { + java.lang.Object ref = masterType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterType_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with
+   * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+   * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterTypeBytes() { + java.lang.Object ref = masterType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 3; + private com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + acceleratorConfig_; + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int INPUT_NOTEBOOK_FILE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object inputNotebookFile_ = ""; + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + @java.lang.Override + public java.lang.String getInputNotebookFile() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputNotebookFile_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputNotebookFileBytes() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGE_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object containerImageUri_ = ""; + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + @java.lang.Override + public java.lang.String getContainerImageUri() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerImageUriBytes() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object outputNotebookFolder_ = ""; + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: `gs://{bucket_name}/{folder}`
+   * Ex: `gs://notebook_user/scheduled_notebooks`
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + @java.lang.Override + public java.lang.String getOutputNotebookFolder() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFolder_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: `gs://{bucket_name}/{folder}`
+   * Ex: `gs://notebook_user/scheduled_notebooks`
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputNotebookFolderBytes() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMS_YAML_FILE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object paramsYamlFile_ = ""; + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + @java.lang.Override + public java.lang.String getParamsYamlFile() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paramsYamlFile_ = s; + return s; + } + } + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParamsYamlFileBytes() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + paramsYamlFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object parameters_ = ""; + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + @java.lang.Override + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } + } + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_TYPE_FIELD_NUMBER = 11; + private int jobType_ = 0; + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + @java.lang.Override + public int getJobTypeValue() { + return jobType_; + } + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.forNumber(jobType_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.UNRECOGNIZED + : result; + } + + public static final int DATAPROC_PARAMETERS_FIELD_NUMBER = 12; + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + @java.lang.Override + public boolean hasDataprocParameters() { + return jobParametersCase_ == 12; + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDataprocParameters() { + if (jobParametersCase_ == 12) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder() { + if (jobParametersCase_ == 12) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + + public static final int VERTEX_AI_PARAMETERS_FIELD_NUMBER = 13; + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return Whether the vertexAiParameters field is set. + */ + @java.lang.Override + public boolean hasVertexAiParameters() { + return jobParametersCase_ == 13; + } + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return The vertexAiParameters. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + getVertexAiParameters() { + if (jobParametersCase_ == 13) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder + getVertexAiParametersOrBuilder() { + if (jobParametersCase_ == 13) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + + public static final int KERNEL_SPEC_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object kernelSpec_ = ""; + /** + * + * + *
+   * Name of the kernel spec to use. This must be specified if the
+   * kernel spec name on the execution target does not match the name in the
+   * input notebook file.
+   * 
+ * + * string kernel_spec = 14; + * + * @return The kernelSpec. + */ + @java.lang.Override + public java.lang.String getKernelSpec() { + java.lang.Object ref = kernelSpec_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelSpec_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the kernel spec to use. This must be specified if the
+   * kernel spec name on the execution target does not match the name in the
+   * input notebook file.
+   * 
+ * + * string kernel_spec = 14; + * + * @return The bytes for kernelSpec. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKernelSpecBytes() { + java.lang.Object ref = kernelSpec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENSORBOARD_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object tensorboard_ = ""; + /** + * + * + *
+   * The name of a Vertex AI [Tensorboard] resource to which this execution
+   * will upload Tensorboard logs.
+   * Format:
+   * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+   * 
+ * + * string tensorboard = 15; + * + * @return The tensorboard. + */ + @java.lang.Override + public java.lang.String getTensorboard() { + java.lang.Object ref = tensorboard_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tensorboard_ = s; + return s; + } + } + /** + * + * + *
+   * The name of a Vertex AI [Tensorboard] resource to which this execution
+   * will upload Tensorboard logs.
+   * Format:
+   * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+   * 
+ * + * string tensorboard = 15; + * + * @return The bytes for tensorboard. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTensorboardBytes() { + java.lang.Object ref = tensorboard_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tensorboard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (scaleTier_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.SCALE_TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, scaleTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(masterType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, masterType_); + } + if (acceleratorConfig_ != null) { + output.writeMessage(3, getAcceleratorConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputNotebookFile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inputNotebookFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, containerImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputNotebookFolder_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, outputNotebookFolder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(paramsYamlFile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, paramsYamlFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parameters_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, parameters_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, serviceAccount_); + } + if (jobType_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.JOB_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, jobType_); + } + if (jobParametersCase_ == 12) { + output.writeMessage( + 12, + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_); + } + if (jobParametersCase_ == 13) { + output.writeMessage( + 13, + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelSpec_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, kernelSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorboard_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, tensorboard_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scaleTier_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.SCALE_TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, scaleTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(masterType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, masterType_); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAcceleratorConfig()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputNotebookFile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inputNotebookFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, containerImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputNotebookFolder_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, outputNotebookFolder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(paramsYamlFile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, paramsYamlFile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parameters_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, parameters_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, serviceAccount_); + } + if (jobType_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.JOB_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, jobType_); + } + if (jobParametersCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_); + } + if (jobParametersCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelSpec_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, kernelSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorboard_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, tensorboard_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ExecutionTemplate other = + (com.google.events.cloud.notebooks.v1.ExecutionTemplate) obj; + + if (scaleTier_ != other.scaleTier_) return false; + if (!getMasterType().equals(other.getMasterType())) return false; + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getInputNotebookFile().equals(other.getInputNotebookFile())) return false; + if (!getContainerImageUri().equals(other.getContainerImageUri())) return false; + if (!getOutputNotebookFolder().equals(other.getOutputNotebookFolder())) return false; + if (!getParamsYamlFile().equals(other.getParamsYamlFile())) return false; + if (!getParameters().equals(other.getParameters())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (jobType_ != other.jobType_) return false; + if (!getKernelSpec().equals(other.getKernelSpec())) return false; + if (!getTensorboard().equals(other.getTensorboard())) return false; + if (!getJobParametersCase().equals(other.getJobParametersCase())) return false; + switch (jobParametersCase_) { + case 12: + if (!getDataprocParameters().equals(other.getDataprocParameters())) return false; + break; + case 13: + if (!getVertexAiParameters().equals(other.getVertexAiParameters())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCALE_TIER_FIELD_NUMBER; + hash = (53 * hash) + scaleTier_; + hash = (37 * hash) + MASTER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMasterType().hashCode(); + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + INPUT_NOTEBOOK_FILE_FIELD_NUMBER; + hash = (53 * hash) + getInputNotebookFile().hashCode(); + hash = (37 * hash) + CONTAINER_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getContainerImageUri().hashCode(); + hash = (37 * hash) + OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getOutputNotebookFolder().hashCode(); + hash = (37 * hash) + PARAMS_YAML_FILE_FIELD_NUMBER; + hash = (53 * hash) + getParamsYamlFile().hashCode(); + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + JOB_TYPE_FIELD_NUMBER; + hash = (53 * hash) + jobType_; + hash = (37 * hash) + KERNEL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getKernelSpec().hashCode(); + hash = (37 * hash) + TENSORBOARD_FIELD_NUMBER; + hash = (53 * hash) + getTensorboard().hashCode(); + switch (jobParametersCase_) { + case 12: + hash = (37 * hash) + DATAPROC_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getDataprocParameters().hashCode(); + break; + case 13: + hash = (37 * hash) + VERTEX_AI_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getVertexAiParameters().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ExecutionTemplate 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 description a notebook execution workload.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ExecutionTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ExecutionTemplate) + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.class, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.ExecutionTemplate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scaleTier_ = 0; + masterType_ = ""; + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + inputNotebookFile_ = ""; + containerImageUri_ = ""; + outputNotebookFolder_ = ""; + paramsYamlFile_ = ""; + parameters_ = ""; + serviceAccount_ = ""; + jobType_ = 0; + if (dataprocParametersBuilder_ != null) { + dataprocParametersBuilder_.clear(); + } + if (vertexAiParametersBuilder_ != null) { + vertexAiParametersBuilder_.clear(); + } + kernelSpec_ = ""; + tensorboard_ = ""; + jobParametersCase_ = 0; + jobParameters_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate build() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate buildPartial() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate result = + new com.google.events.cloud.notebooks.v1.ExecutionTemplate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.ExecutionTemplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scaleTier_ = scaleTier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.masterType_ = masterType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.acceleratorConfig_ = + acceleratorConfigBuilder_ == null + ? acceleratorConfig_ + : acceleratorConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.inputNotebookFile_ = inputNotebookFile_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.containerImageUri_ = containerImageUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.outputNotebookFolder_ = outputNotebookFolder_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.paramsYamlFile_ = paramsYamlFile_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.parameters_ = parameters_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.jobType_ = jobType_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.kernelSpec_ = kernelSpec_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.tensorboard_ = tensorboard_; + } + } + + private void buildPartialOneofs(com.google.events.cloud.notebooks.v1.ExecutionTemplate result) { + result.jobParametersCase_ = jobParametersCase_; + result.jobParameters_ = this.jobParameters_; + if (jobParametersCase_ == 12 && dataprocParametersBuilder_ != null) { + result.jobParameters_ = dataprocParametersBuilder_.build(); + } + if (jobParametersCase_ == 13 && vertexAiParametersBuilder_ != null) { + result.jobParameters_ = vertexAiParametersBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.ExecutionTemplate) { + return mergeFrom((com.google.events.cloud.notebooks.v1.ExecutionTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.ExecutionTemplate other) { + if (other == com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance()) + return this; + if (other.scaleTier_ != 0) { + setScaleTierValue(other.getScaleTierValue()); + } + if (!other.getMasterType().isEmpty()) { + masterType_ = other.masterType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getInputNotebookFile().isEmpty()) { + inputNotebookFile_ = other.inputNotebookFile_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getContainerImageUri().isEmpty()) { + containerImageUri_ = other.containerImageUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getOutputNotebookFolder().isEmpty()) { + outputNotebookFolder_ = other.outputNotebookFolder_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getParamsYamlFile().isEmpty()) { + paramsYamlFile_ = other.paramsYamlFile_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getParameters().isEmpty()) { + parameters_ = other.parameters_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.jobType_ != 0) { + setJobTypeValue(other.getJobTypeValue()); + } + if (!other.getKernelSpec().isEmpty()) { + kernelSpec_ = other.kernelSpec_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (!other.getTensorboard().isEmpty()) { + tensorboard_ = other.tensorboard_; + bitField0_ |= 0x00004000; + onChanged(); + } + switch (other.getJobParametersCase()) { + case DATAPROC_PARAMETERS: + { + mergeDataprocParameters(other.getDataprocParameters()); + break; + } + case VERTEX_AI_PARAMETERS: + { + mergeVertexAiParameters(other.getVertexAiParameters()); + break; + } + case JOBPARAMETERS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + scaleTier_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + masterType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getAcceleratorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + inputNotebookFile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + containerImageUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + outputNotebookFolder_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + paramsYamlFile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + parameters_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: + { + jobType_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + input.readMessage( + getDataprocParametersFieldBuilder().getBuilder(), extensionRegistry); + jobParametersCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getVertexAiParametersFieldBuilder().getBuilder(), extensionRegistry); + jobParametersCase_ = 13; + break; + } // case 106 + case 114: + { + kernelSpec_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + tensorboard_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 122 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int jobParametersCase_ = 0; + private java.lang.Object jobParameters_; + + public JobParametersCase getJobParametersCase() { + return JobParametersCase.forNumber(jobParametersCase_); + } + + public Builder clearJobParameters() { + jobParametersCase_ = 0; + jobParameters_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private int scaleTier_ = 0; + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The enum numeric value on the wire for scaleTier. + */ + @java.lang.Override + public int getScaleTierValue() { + return scaleTier_; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @param value The enum numeric value on the wire for scaleTier to set. + * @return This builder for chaining. + */ + public Builder setScaleTierValue(int value) { + scaleTier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The scaleTier. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.forNumber(scaleTier_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @param value The scaleTier to set. + * @return This builder for chaining. + */ + public Builder setScaleTier( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + scaleTier_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return This builder for chaining. + */ + public Builder clearScaleTier() { + bitField0_ = (bitField0_ & ~0x00000001); + scaleTier_ = 0; + onChanged(); + return this; + } + + private java.lang.Object masterType_ = ""; + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with
+     * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+     * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + public java.lang.String getMasterType() { + java.lang.Object ref = masterType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with
+     * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+     * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + public com.google.protobuf.ByteString getMasterTypeBytes() { + java.lang.Object ref = masterType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with
+     * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+     * 
+ * + * string master_type = 2; + * + * @param value The masterType to set. + * @return This builder for chaining. + */ + public Builder setMasterType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + masterType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with
+     * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+     * 
+ * + * string master_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMasterType() { + masterType_ = getDefaultInstance().getMasterType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with
+     * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+     * 
+ * + * string master_type = 2; + * + * @param value The bytes for masterType to set. + * @return This builder for chaining. + */ + public Builder setMasterTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + masterType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + } else { + acceleratorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder mergeAcceleratorConfig( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && acceleratorConfig_ != null + && acceleratorConfig_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance()) { + getAcceleratorConfigBuilder().mergeFrom(value); + } else { + acceleratorConfig_ = value; + } + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder clearAcceleratorConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object inputNotebookFile_ = ""; + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+     * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + public java.lang.String getInputNotebookFile() { + java.lang.Object ref = inputNotebookFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputNotebookFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+     * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + public com.google.protobuf.ByteString getInputNotebookFileBytes() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+     * 
+ * + * string input_notebook_file = 5; + * + * @param value The inputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setInputNotebookFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inputNotebookFile_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+     * 
+ * + * string input_notebook_file = 5; + * + * @return This builder for chaining. + */ + public Builder clearInputNotebookFile() { + inputNotebookFile_ = getDefaultInstance().getInputNotebookFile(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+     * 
+ * + * string input_notebook_file = 5; + * + * @param value The bytes for inputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setInputNotebookFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inputNotebookFile_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object containerImageUri_ = ""; + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + public java.lang.String getContainerImageUri() { + java.lang.Object ref = containerImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + public com.google.protobuf.ByteString getContainerImageUriBytes() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @param value The containerImageUri to set. + * @return This builder for chaining. + */ + public Builder setContainerImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + containerImageUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearContainerImageUri() { + containerImageUri_ = getDefaultInstance().getContainerImageUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @param value The bytes for containerImageUri to set. + * @return This builder for chaining. + */ + public Builder setContainerImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + containerImageUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object outputNotebookFolder_ = ""; + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: `gs://{bucket_name}/{folder}`
+     * Ex: `gs://notebook_user/scheduled_notebooks`
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + public java.lang.String getOutputNotebookFolder() { + java.lang.Object ref = outputNotebookFolder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFolder_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: `gs://{bucket_name}/{folder}`
+     * Ex: `gs://notebook_user/scheduled_notebooks`
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + public com.google.protobuf.ByteString getOutputNotebookFolderBytes() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: `gs://{bucket_name}/{folder}`
+     * Ex: `gs://notebook_user/scheduled_notebooks`
+     * 
+ * + * string output_notebook_folder = 7; + * + * @param value The outputNotebookFolder to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFolder(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputNotebookFolder_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: `gs://{bucket_name}/{folder}`
+     * Ex: `gs://notebook_user/scheduled_notebooks`
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return This builder for chaining. + */ + public Builder clearOutputNotebookFolder() { + outputNotebookFolder_ = getDefaultInstance().getOutputNotebookFolder(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: `gs://{bucket_name}/{folder}`
+     * Ex: `gs://notebook_user/scheduled_notebooks`
+     * 
+ * + * string output_notebook_folder = 7; + * + * @param value The bytes for outputNotebookFolder to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFolderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputNotebookFolder_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object paramsYamlFile_ = ""; + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+     * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + public java.lang.String getParamsYamlFile() { + java.lang.Object ref = paramsYamlFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paramsYamlFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+     * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + public com.google.protobuf.ByteString getParamsYamlFileBytes() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + paramsYamlFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+     * 
+ * + * string params_yaml_file = 8; + * + * @param value The paramsYamlFile to set. + * @return This builder for chaining. + */ + public Builder setParamsYamlFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + paramsYamlFile_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+     * 
+ * + * string params_yaml_file = 8; + * + * @return This builder for chaining. + */ + public Builder clearParamsYamlFile() { + paramsYamlFile_ = getDefaultInstance().getParamsYamlFile(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+     * 
+ * + * string params_yaml_file = 8; + * + * @param value The bytes for paramsYamlFile to set. + * @return This builder for chaining. + */ + public Builder setParamsYamlFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + paramsYamlFile_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object parameters_ = ""; + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + parameters_ = getDefaultInstance().getParameters(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @param value The bytes for parameters to set. + * @return This builder for chaining. + */ + public Builder setParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parameters_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private int jobType_ = 0; + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + @java.lang.Override + public int getJobTypeValue() { + return jobType_; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @param value The enum numeric value on the wire for jobType to set. + * @return This builder for chaining. + */ + public Builder setJobTypeValue(int value) { + jobType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType() { + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType result = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.forNumber(jobType_); + return result == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @param value The jobType to set. + * @return This builder for chaining. + */ + public Builder setJobType( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + jobType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return This builder for chaining. + */ + public Builder clearJobType() { + bitField0_ = (bitField0_ & ~0x00000400); + jobType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder> + dataprocParametersBuilder_; + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + @java.lang.Override + public boolean hasDataprocParameters() { + return jobParametersCase_ == 12; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDataprocParameters() { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } else { + if (jobParametersCase_ == 12) { + return dataprocParametersBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder setDataprocParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters value) { + if (dataprocParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobParameters_ = value; + onChanged(); + } else { + dataprocParametersBuilder_.setMessage(value); + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder setDataprocParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + builderForValue) { + if (dataprocParametersBuilder_ == null) { + jobParameters_ = builderForValue.build(); + onChanged(); + } else { + dataprocParametersBuilder_.setMessage(builderForValue.build()); + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder mergeDataprocParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters value) { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12 + && jobParameters_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance()) { + jobParameters_ = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.newBuilder( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + jobParameters_ = value; + } + onChanged(); + } else { + if (jobParametersCase_ == 12) { + dataprocParametersBuilder_.mergeFrom(value); + } else { + dataprocParametersBuilder_.setMessage(value); + } + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder clearDataprocParameters() { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12) { + jobParametersCase_ = 0; + jobParameters_ = null; + onChanged(); + } + } else { + if (jobParametersCase_ == 12) { + jobParametersCase_ = 0; + jobParameters_ = null; + } + dataprocParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + getDataprocParametersBuilder() { + return getDataprocParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder() { + if ((jobParametersCase_ == 12) && (dataprocParametersBuilder_ != null)) { + return dataprocParametersBuilder_.getMessageOrBuilder(); + } else { + if (jobParametersCase_ == 12) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder> + getDataprocParametersFieldBuilder() { + if (dataprocParametersBuilder_ == null) { + if (!(jobParametersCase_ == 12)) { + jobParameters_ = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + dataprocParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder>( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_, + getParentForChildren(), + isClean()); + jobParameters_ = null; + } + jobParametersCase_ = 12; + onChanged(); + return dataprocParametersBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder> + vertexAiParametersBuilder_; + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return Whether the vertexAiParameters field is set. + */ + @java.lang.Override + public boolean hasVertexAiParameters() { + return jobParametersCase_ == 13; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return The vertexAiParameters. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + getVertexAiParameters() { + if (vertexAiParametersBuilder_ == null) { + if (jobParametersCase_ == 13) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } else { + if (jobParametersCase_ == 13) { + return vertexAiParametersBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + public Builder setVertexAiParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters value) { + if (vertexAiParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobParameters_ = value; + onChanged(); + } else { + vertexAiParametersBuilder_.setMessage(value); + } + jobParametersCase_ = 13; + return this; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + public Builder setVertexAiParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder + builderForValue) { + if (vertexAiParametersBuilder_ == null) { + jobParameters_ = builderForValue.build(); + onChanged(); + } else { + vertexAiParametersBuilder_.setMessage(builderForValue.build()); + } + jobParametersCase_ = 13; + return this; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + public Builder mergeVertexAiParameters( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters value) { + if (vertexAiParametersBuilder_ == null) { + if (jobParametersCase_ == 13 + && jobParameters_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance()) { + jobParameters_ = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.newBuilder( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + jobParameters_ = value; + } + onChanged(); + } else { + if (jobParametersCase_ == 13) { + vertexAiParametersBuilder_.mergeFrom(value); + } else { + vertexAiParametersBuilder_.setMessage(value); + } + } + jobParametersCase_ = 13; + return this; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + public Builder clearVertexAiParameters() { + if (vertexAiParametersBuilder_ == null) { + if (jobParametersCase_ == 13) { + jobParametersCase_ = 0; + jobParameters_ = null; + onChanged(); + } + } else { + if (jobParametersCase_ == 13) { + jobParametersCase_ = 0; + jobParameters_ = null; + } + vertexAiParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder + getVertexAiParametersBuilder() { + return getVertexAiParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder + getVertexAiParametersOrBuilder() { + if ((jobParametersCase_ == 13) && (vertexAiParametersBuilder_ != null)) { + return vertexAiParametersBuilder_.getMessageOrBuilder(); + } else { + if (jobParametersCase_ == 13) { + return (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_; + } + return com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Vertex AI JobType executions.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder> + getVertexAiParametersFieldBuilder() { + if (vertexAiParametersBuilder_ == null) { + if (!(jobParametersCase_ == 13)) { + jobParameters_ = + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + .getDefaultInstance(); + } + vertexAiParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder>( + (com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters) + jobParameters_, + getParentForChildren(), + isClean()); + jobParameters_ = null; + } + jobParametersCase_ = 13; + onChanged(); + return vertexAiParametersBuilder_; + } + + private java.lang.Object kernelSpec_ = ""; + /** + * + * + *
+     * Name of the kernel spec to use. This must be specified if the
+     * kernel spec name on the execution target does not match the name in the
+     * input notebook file.
+     * 
+ * + * string kernel_spec = 14; + * + * @return The kernelSpec. + */ + public java.lang.String getKernelSpec() { + java.lang.Object ref = kernelSpec_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelSpec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the kernel spec to use. This must be specified if the
+     * kernel spec name on the execution target does not match the name in the
+     * input notebook file.
+     * 
+ * + * string kernel_spec = 14; + * + * @return The bytes for kernelSpec. + */ + public com.google.protobuf.ByteString getKernelSpecBytes() { + java.lang.Object ref = kernelSpec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the kernel spec to use. This must be specified if the
+     * kernel spec name on the execution target does not match the name in the
+     * input notebook file.
+     * 
+ * + * string kernel_spec = 14; + * + * @param value The kernelSpec to set. + * @return This builder for chaining. + */ + public Builder setKernelSpec(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kernelSpec_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the kernel spec to use. This must be specified if the
+     * kernel spec name on the execution target does not match the name in the
+     * input notebook file.
+     * 
+ * + * string kernel_spec = 14; + * + * @return This builder for chaining. + */ + public Builder clearKernelSpec() { + kernelSpec_ = getDefaultInstance().getKernelSpec(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the kernel spec to use. This must be specified if the
+     * kernel spec name on the execution target does not match the name in the
+     * input notebook file.
+     * 
+ * + * string kernel_spec = 14; + * + * @param value The bytes for kernelSpec to set. + * @return This builder for chaining. + */ + public Builder setKernelSpecBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kernelSpec_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private java.lang.Object tensorboard_ = ""; + /** + * + * + *
+     * The name of a Vertex AI [Tensorboard] resource to which this execution
+     * will upload Tensorboard logs.
+     * Format:
+     * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+     * 
+ * + * string tensorboard = 15; + * + * @return The tensorboard. + */ + public java.lang.String getTensorboard() { + java.lang.Object ref = tensorboard_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tensorboard_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of a Vertex AI [Tensorboard] resource to which this execution
+     * will upload Tensorboard logs.
+     * Format:
+     * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+     * 
+ * + * string tensorboard = 15; + * + * @return The bytes for tensorboard. + */ + public com.google.protobuf.ByteString getTensorboardBytes() { + java.lang.Object ref = tensorboard_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tensorboard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of a Vertex AI [Tensorboard] resource to which this execution
+     * will upload Tensorboard logs.
+     * Format:
+     * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+     * 
+ * + * string tensorboard = 15; + * + * @param value The tensorboard to set. + * @return This builder for chaining. + */ + public Builder setTensorboard(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tensorboard_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Vertex AI [Tensorboard] resource to which this execution
+     * will upload Tensorboard logs.
+     * Format:
+     * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+     * 
+ * + * string tensorboard = 15; + * + * @return This builder for chaining. + */ + public Builder clearTensorboard() { + tensorboard_ = getDefaultInstance().getTensorboard(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Vertex AI [Tensorboard] resource to which this execution
+     * will upload Tensorboard logs.
+     * Format:
+     * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+     * 
+ * + * string tensorboard = 15; + * + * @param value The bytes for tensorboard to set. + * @return This builder for chaining. + */ + public Builder setTensorboardBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tensorboard_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ExecutionTemplate) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ExecutionTemplate) + private static final com.google.events.cloud.notebooks.v1.ExecutionTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.ExecutionTemplate(); + } + + public static com.google.events.cloud.notebooks.v1.ExecutionTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutionTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java new file mode 100644 index 00000000..e2f157c5 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java @@ -0,0 +1,633 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ExecutionTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ExecutionTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The enum numeric value on the wire for scaleTier. + */ + int getScaleTierValue(); + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1; + * + * @return The scaleTier. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier(); + + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with
+   * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+   * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + java.lang.String getMasterType(); + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with
+   * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
+   * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + com.google.protobuf.ByteString getMasterTypeBytes(); + + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getAcceleratorConfig(); + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + java.lang.String getInputNotebookFile(); + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + com.google.protobuf.ByteString getInputNotebookFileBytes(); + + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + java.lang.String getContainerImageUri(); + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + com.google.protobuf.ByteString getContainerImageUriBytes(); + + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: `gs://{bucket_name}/{folder}`
+   * Ex: `gs://notebook_user/scheduled_notebooks`
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + java.lang.String getOutputNotebookFolder(); + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: `gs://{bucket_name}/{folder}`
+   * Ex: `gs://notebook_user/scheduled_notebooks`
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + com.google.protobuf.ByteString getOutputNotebookFolderBytes(); + + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + java.lang.String getParamsYamlFile(); + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + com.google.protobuf.ByteString getParamsYamlFileBytes(); + + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + java.lang.String getParameters(); + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + com.google.protobuf.ByteString getParametersBytes(); + + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + int getJobTypeValue(); + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType(); + + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + boolean hasDataprocParameters(); + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters getDataprocParameters(); + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder(); + + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return Whether the vertexAiParameters field is set. + */ + boolean hasVertexAiParameters(); + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + * + * @return The vertexAiParameters. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters getVertexAiParameters(); + /** + * + * + *
+   * Parameters used in Vertex AI JobType executions.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate.VertexAIParametersOrBuilder + getVertexAiParametersOrBuilder(); + + /** + * + * + *
+   * Name of the kernel spec to use. This must be specified if the
+   * kernel spec name on the execution target does not match the name in the
+   * input notebook file.
+   * 
+ * + * string kernel_spec = 14; + * + * @return The kernelSpec. + */ + java.lang.String getKernelSpec(); + /** + * + * + *
+   * Name of the kernel spec to use. This must be specified if the
+   * kernel spec name on the execution target does not match the name in the
+   * input notebook file.
+   * 
+ * + * string kernel_spec = 14; + * + * @return The bytes for kernelSpec. + */ + com.google.protobuf.ByteString getKernelSpecBytes(); + + /** + * + * + *
+   * The name of a Vertex AI [Tensorboard] resource to which this execution
+   * will upload Tensorboard logs.
+   * Format:
+   * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+   * 
+ * + * string tensorboard = 15; + * + * @return The tensorboard. + */ + java.lang.String getTensorboard(); + /** + * + * + *
+   * The name of a Vertex AI [Tensorboard] resource to which this execution
+   * will upload Tensorboard logs.
+   * Format:
+   * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
+   * 
+ * + * string tensorboard = 15; + * + * @return The bytes for tensorboard. + */ + com.google.protobuf.ByteString getTensorboardBytes(); + + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.JobParametersCase + getJobParametersCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Instance.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Instance.java new file mode 100644 index 00000000..909d05f0 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Instance.java @@ -0,0 +1,17271 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a notebook instance.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + postStartupScript_ = ""; + proxyUri_ = ""; + serviceAccount_ = ""; + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + machineType_ = ""; + state_ = 0; + customGpuDriverPath_ = ""; + disks_ = java.util.Collections.emptyList(); + network_ = ""; + subnet_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + upgradeHistory_ = java.util.Collections.emptyList(); + nicType_ = 0; + creator_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 21: + return internalGetLabels(); + case 22: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.class, + com.google.events.cloud.notebooks.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * Definition of the types of hardware accelerators that can be used on this
+   * instance.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 11; + */ + NVIDIA_TESLA_A100(11), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 8; + */ + NVIDIA_TESLA_T4_VWS(8), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 9; + */ + NVIDIA_TESLA_P100_VWS(9), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 10; + */ + NVIDIA_TESLA_P4_VWS(10), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 11; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 11; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 8; + */ + public static final int NVIDIA_TESLA_T4_VWS_VALUE = 8; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 9; + */ + public static final int NVIDIA_TESLA_P100_VWS_VALUE = 9; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 10; + */ + public static final int NVIDIA_TESLA_P4_VWS_VALUE = 10; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 11: + return NVIDIA_TESLA_A100; + case 8: + return NVIDIA_TESLA_T4_VWS; + case 9: + return NVIDIA_TESLA_P100_VWS; + case 10: + return NVIDIA_TESLA_P4_VWS; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.AcceleratorType) + } + + /** + * + * + *
+   * The definition of the states of this instance.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The control logic is starting the instance.
+     * 
+ * + * STARTING = 1; + */ + STARTING(1), + /** + * + * + *
+     * The control logic is installing required frameworks and registering the
+     * instance with notebook proxy
+     * 
+ * + * PROVISIONING = 2; + */ + PROVISIONING(2), + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * The control logic is stopping the instance.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The instance is stopped.
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * The instance is deleted.
+     * 
+ * + * DELETED = 6; + */ + DELETED(6), + /** + * + * + *
+     * The instance is upgrading.
+     * 
+ * + * UPGRADING = 7; + */ + UPGRADING(7), + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * INITIALIZING = 8; + */ + INITIALIZING(8), + /** + * + * + *
+     * The instance is getting registered.
+     * 
+ * + * REGISTERING = 9; + */ + REGISTERING(9), + /** + * + * + *
+     * The instance is suspending.
+     * 
+ * + * SUSPENDING = 10; + */ + SUSPENDING(10), + /** + * + * + *
+     * The instance is suspended.
+     * 
+ * + * SUSPENDED = 11; + */ + SUSPENDED(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The control logic is starting the instance.
+     * 
+ * + * STARTING = 1; + */ + public static final int STARTING_VALUE = 1; + /** + * + * + *
+     * The control logic is installing required frameworks and registering the
+     * instance with notebook proxy
+     * 
+ * + * PROVISIONING = 2; + */ + public static final int PROVISIONING_VALUE = 2; + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + * + * + *
+     * The control logic is stopping the instance.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The instance is stopped.
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + /** + * + * + *
+     * The instance is deleted.
+     * 
+ * + * DELETED = 6; + */ + public static final int DELETED_VALUE = 6; + /** + * + * + *
+     * The instance is upgrading.
+     * 
+ * + * UPGRADING = 7; + */ + public static final int UPGRADING_VALUE = 7; + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * INITIALIZING = 8; + */ + public static final int INITIALIZING_VALUE = 8; + /** + * + * + *
+     * The instance is getting registered.
+     * 
+ * + * REGISTERING = 9; + */ + public static final int REGISTERING_VALUE = 9; + /** + * + * + *
+     * The instance is suspending.
+     * 
+ * + * SUSPENDING = 10; + */ + public static final int SUSPENDING_VALUE = 10; + /** + * + * + *
+     * The instance is suspended.
+     * 
+ * + * SUSPENDED = 11; + */ + public static final int SUSPENDED_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTING; + case 2: + return PROVISIONING; + case 3: + return ACTIVE; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return DELETED; + case 7: + return UPGRADING; + case 8: + return INITIALIZING; + case 9: + return REGISTERING; + case 10: + return SUSPENDING; + case 11: + return SUSPENDED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.State) + } + + /** + * + * + *
+   * Possible disk types for notebook instances.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.DiskType} + */ + public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + PD_STANDARD(1), + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + PD_SSD(2), + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + PD_BALANCED(3), + /** + * + * + *
+     * Extreme persistent disk type.
+     * 
+ * + * PD_EXTREME = 4; + */ + PD_EXTREME(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + public static final int PD_STANDARD_VALUE = 1; + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + public static final int PD_SSD_VALUE = 2; + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + public static final int PD_BALANCED_VALUE = 3; + /** + * + * + *
+     * Extreme persistent disk type.
+     * 
+ * + * PD_EXTREME = 4; + */ + public static final int PD_EXTREME_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskType forNumber(int value) { + switch (value) { + case 0: + return DISK_TYPE_UNSPECIFIED; + case 1: + return PD_STANDARD; + case 2: + return PD_SSD; + case 3: + return PD_BALANCED; + case 4: + return PD_EXTREME; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskType findValueByNumber(int number) { + return DiskType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final DiskType[] VALUES = values(); + + public static DiskType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.DiskType) + } + + /** + * + * + *
+   * Definition of the disk encryption options.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.DiskEncryption} + */ + public enum DiskEncryption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk encryption is not specified.
+     * 
+ * + * DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + DISK_ENCRYPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Use Google managed encryption keys to encrypt the boot disk.
+     * 
+ * + * GMEK = 1; + */ + GMEK(1), + /** + * + * + *
+     * Use customer managed encryption keys to encrypt the boot disk.
+     * 
+ * + * CMEK = 2; + */ + CMEK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk encryption is not specified.
+     * 
+ * + * DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + public static final int DISK_ENCRYPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use Google managed encryption keys to encrypt the boot disk.
+     * 
+ * + * GMEK = 1; + */ + public static final int GMEK_VALUE = 1; + /** + * + * + *
+     * Use customer managed encryption keys to encrypt the boot disk.
+     * 
+ * + * CMEK = 2; + */ + public static final int CMEK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskEncryption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskEncryption forNumber(int value) { + switch (value) { + case 0: + return DISK_ENCRYPTION_UNSPECIFIED; + case 1: + return GMEK; + case 2: + return CMEK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskEncryption findValueByNumber(int number) { + return DiskEncryption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(3); + } + + private static final DiskEncryption[] VALUES = values(); + + public static DiskEncryption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskEncryption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.DiskEncryption) + } + + /** + * + * + *
+   * The type of vNIC driver.
+   * Default should be UNSPECIFIED_NIC_TYPE.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.NicType} + */ + public enum NicType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + UNSPECIFIED_NIC_TYPE(0), + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + VIRTIO_NET(1), + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + GVNIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0; + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + public static final int VIRTIO_NET_VALUE = 1; + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + public static final int GVNIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NicType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NicType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_NIC_TYPE; + case 1: + return VIRTIO_NET; + case 2: + return GVNIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NicType findValueByNumber(int number) { + return NicType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(4); + } + + private static final NicType[] VALUES = values(); + + public static NicType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NicType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.NicType) + } + + public interface AcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + com.google.events.cloud.notebooks.v1.Instance.AcceleratorType getType(); + + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); + } + /** + * + * + *
+   * Definition of a hardware accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. See [GPUs on Compute
+   * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a
+   * valid combination. TPUs are not supported.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.AcceleratorConfig} + */ + public static final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) + AcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceleratorConfig.newBuilder() to construct. + private AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.class, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorType getType() { + com.google.events.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.events.cloud.notebooks.v1.Instance.AcceleratorType.forNumber(type_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_ = 0L; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.events.cloud.notebooks.v1.Instance.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.events.cloud.notebooks.v1.Instance.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig other = + (com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig 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; + } + /** + * + * + *
+     * Definition of a hardware accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. See [GPUs on Compute
+     * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a
+     * valid combination. TPUs are not supported.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.AcceleratorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.class, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + coreCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig build() { + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig buildPartial() { + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig result = + new com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.coreCount_ = coreCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig other) { + if (other + == com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + coreCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorType getType() { + com.google.events.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.events.cloud.notebooks.v1.Instance.AcceleratorType.forNumber(type_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.events.cloud.notebooks.v1.Instance.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + bitField0_ = (bitField0_ & ~0x00000002); + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance.AcceleratorConfig) + private static final com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig(); + } + + public static com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance.Disk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates whether the disk will be auto-deleted when the instance is
+     * deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + boolean getAutoDelete(); + + /** + * + * + *
+     * Indicates that this is a boot disk. The virtual machine will use the
+     * first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + boolean getBoot(); + + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+     * within the instance. This name can be used to reference the device for
+     * mounting, resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + java.lang.String getDeviceName(); + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+     * within the instance. This name can be used to reference the device for
+     * mounting, resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * + * + *
+     * Indicates the size of the disk in base-2 GB.
+     * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + long getDiskSizeGb(); + + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + java.util.List + getGuestOsFeaturesList(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures(int index); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + int getGuestOsFeaturesCount(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index); + + /** + * + * + *
+     * A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk
+     * would have a unique index number.
+     * 
+ * + * int64 index = 6; + * + * @return The index. + */ + long getIndex(); + + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + int getLicensesCount(); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or
+     * `READ_ONLY`. If not specified, the default is to attach the disk in
+     * `READ_WRITE` mode. Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + java.lang.String getMode(); + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or
+     * `READ_ONLY`. If not specified, the default is to attach the disk in
+     * `READ_WRITE` mode. Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+   * An instance-attached disk resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.Disk} + */ + public static final class Disk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance.Disk) + DiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use Disk.newBuilder() to construct. + private Disk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Disk() { + deviceName_ = ""; + guestOsFeatures_ = java.util.Collections.emptyList(); + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + mode_ = ""; + source_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Disk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.Disk.class, + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder.class); + } + + public interface GuestOsFeatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+     * Guest OS features for boot disk.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature} + */ + public static final class GuestOsFeature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + GuestOsFeatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestOsFeature.newBuilder() to construct. + private GuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestOsFeature() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestOsFeature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other = + (com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) obj; + + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature 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; + } + /** + * + * + *
+       * Guest OS features for boot disk.
+       * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature build() { + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature buildPartial() { + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result = + new com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other) { + if (other + == com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + .getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         * * `FEATURE_TYPE_UNSPECIFIED`
+         * * `MULTI_IP_SUBNET`
+         * * `SECURE_BOOT`
+         * * `UEFI_COMPATIBLE`
+         * * `VIRTIO_SCSI_MULTIQUEUE`
+         * * `WINDOWS`
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         * * `FEATURE_TYPE_UNSPECIFIED`
+         * * `MULTI_IP_SUBNET`
+         * * `SECURE_BOOT`
+         * * `UEFI_COMPATIBLE`
+         * * `VIRTIO_SCSI_MULTIQUEUE`
+         * * `WINDOWS`
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         * * `FEATURE_TYPE_UNSPECIFIED`
+         * * `MULTI_IP_SUBNET`
+         * * `SECURE_BOOT`
+         * * `UEFI_COMPATIBLE`
+         * * `VIRTIO_SCSI_MULTIQUEUE`
+         * * `WINDOWS`
+         * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         * * `FEATURE_TYPE_UNSPECIFIED`
+         * * `MULTI_IP_SUBNET`
+         * * `SECURE_BOOT`
+         * * `UEFI_COMPATIBLE`
+         * * `VIRTIO_SCSI_MULTIQUEUE`
+         * * `WINDOWS`
+         * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         * * `FEATURE_TYPE_UNSPECIFIED`
+         * * `MULTI_IP_SUBNET`
+         * * `SECURE_BOOT`
+         * * `UEFI_COMPATIBLE`
+         * * `VIRTIO_SCSI_MULTIQUEUE`
+         * * `WINDOWS`
+         * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + private static final com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature(); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestOsFeature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTO_DELETE_FIELD_NUMBER = 1; + private boolean autoDelete_ = false; + /** + * + * + *
+     * Indicates whether the disk will be auto-deleted when the instance is
+     * deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + public static final int BOOT_FIELD_NUMBER = 2; + private boolean boot_ = false; + /** + * + * + *
+     * Indicates that this is a boot disk. The virtual machine will use the
+     * first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object deviceName_ = ""; + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+     * within the instance. This name can be used to reference the device for
+     * mounting, resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+     * within the instance. This name can be used to reference the device for
+     * mounting, resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 4; + private long diskSizeGb_ = 0L; + /** + * + * + *
+     * Indicates the size of the disk in base-2 GB.
+     * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int GUEST_OS_FEATURES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List + guestOsFeatures_; + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeaturesList() { + return guestOsFeatures_; + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + return guestOsFeatures_; + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public int getGuestOsFeaturesCount() { + return guestOsFeatures_.size(); + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures( + int index) { + return guestOsFeatures_.get(index); + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + return guestOsFeatures_.get(index); + } + + public static final int INDEX_FIELD_NUMBER = 6; + private long index_ = 0L; + /** + * + * + *
+     * A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk
+     * would have a unique index number.
+     * 
+ * + * int64 index = 6; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + + public static final int INTERFACE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object interface_ = ""; + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList licenses_; + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int MODE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object mode_ = ""; + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or
+     * `READ_ONLY`. If not specified, the default is to attach the disk in
+     * `READ_WRITE` mode. Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or
+     * `READ_ONLY`. If not specified, the default is to attach the disk in
+     * `READ_WRITE` mode. Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoDelete_ != false) { + output.writeBool(1, autoDelete_); + } + if (boot_ != false) { + output.writeBool(2, boot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceName_); + } + if (diskSizeGb_ != 0L) { + output.writeInt64(4, diskSizeGb_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + output.writeMessage(5, guestOsFeatures_.get(i)); + } + if (index_ != 0L) { + output.writeInt64(6, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kind_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoDelete_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, autoDelete_); + } + if (boot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, boot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceName_); + } + if (diskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, diskSizeGb_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, guestOsFeatures_.get(i)); + } + if (index_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kind_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance.Disk)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance.Disk other = + (com.google.events.cloud.notebooks.v1.Instance.Disk) obj; + + if (getAutoDelete() != other.getAutoDelete()) return false; + if (getBoot() != other.getBoot()) return false; + if (!getDeviceName().equals(other.getDeviceName())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false; + if (getIndex() != other.getIndex()) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete()); + hash = (37 * hash) + BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot()); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); + if (getGuestOsFeaturesCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeaturesList().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIndex()); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Instance.Disk 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; + } + /** + * + * + *
+     * An instance-attached disk resource.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.Disk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance.Disk) + com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.Disk.class, + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Instance.Disk.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoDelete_ = false; + boot_ = false; + deviceName_ = ""; + diskSizeGb_ = 0L; + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + } else { + guestOsFeatures_ = null; + guestOsFeaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + index_ = 0L; + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + mode_ = ""; + source_ = ""; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.Disk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk build() { + com.google.events.cloud.notebooks.v1.Instance.Disk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk buildPartial() { + com.google.events.cloud.notebooks.v1.Instance.Disk result = + new com.google.events.cloud.notebooks.v1.Instance.Disk(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.notebooks.v1.Instance.Disk result) { + if (guestOsFeaturesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.guestOsFeatures_ = guestOsFeatures_; + } else { + result.guestOsFeatures_ = guestOsFeaturesBuilder_.build(); + } + if (((bitField0_ & 0x00000100) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.licenses_ = licenses_; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Instance.Disk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoDelete_ = autoDelete_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boot_ = boot_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceName_ = deviceName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.diskSizeGb_ = diskSizeGb_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.interface_ = interface_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance.Disk) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Instance.Disk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Instance.Disk other) { + if (other == com.google.events.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()) + return this; + if (other.getAutoDelete() != false) { + setAutoDelete(other.getAutoDelete()); + } + if (other.getBoot() != false) { + setBoot(other.getBoot()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getDiskSizeGb() != 0L) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (guestOsFeaturesBuilder_ == null) { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeatures_.isEmpty()) { + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.addAll(other.guestOsFeatures_); + } + onChanged(); + } + } else { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeaturesBuilder_.isEmpty()) { + guestOsFeaturesBuilder_.dispose(); + guestOsFeaturesBuilder_ = null; + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000010); + guestOsFeaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGuestOsFeaturesFieldBuilder() + : null; + } else { + guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_); + } + } + } + if (other.getIndex() != 0L) { + setIndex(other.getIndex()); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000800; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + boot_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature m = + input.readMessage( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + .parser(), + extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: + { + index_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case 74 + case 82: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean autoDelete_; + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @param value The autoDelete to set. + * @return This builder for chaining. + */ + public Builder setAutoDelete(boolean value) { + + autoDelete_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @return This builder for chaining. + */ + public Builder clearAutoDelete() { + bitField0_ = (bitField0_ & ~0x00000001); + autoDelete_ = false; + onChanged(); + return this; + } + + private boolean boot_; + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @param value The boot to set. + * @return This builder for chaining. + */ + public Builder setBoot(boolean value) { + + boot_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoot() { + bitField0_ = (bitField0_ & ~0x00000002); + boot_ = false; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+       * within the instance. This name can be used to reference the device for
+       * mounting, resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+       * within the instance. This name can be used to reference the device for
+       * mounting, resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+       * within the instance. This name can be used to reference the device for
+       * mounting, resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+       * within the instance. This name can be used to reference the device for
+       * mounting, resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + deviceName_ = getDefaultInstance().getDeviceName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
+       * within the instance. This name can be used to reference the device for
+       * mounting, resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long diskSizeGb_; + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(long value) { + + diskSizeGb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + bitField0_ = (bitField0_ & ~0x00000008); + diskSizeGb_ = 0L; + onChanged(); + return this; + } + + private java.util.List + guestOsFeatures_ = java.util.Collections.emptyList(); + + private void ensureGuestOsFeaturesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList< + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>( + guestOsFeatures_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + guestOsFeaturesBuilder_; + + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List + getGuestOsFeaturesList() { + if (guestOsFeaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } else { + return guestOsFeaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public int getGuestOsFeaturesCount() { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.size(); + } else { + return guestOsFeaturesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures( + int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder setGuestOsFeatures( + int index, com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder setGuestOsFeatures( + int index, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + int index, com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + int index, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addAllGuestOsFeatures( + java.lang.Iterable< + ? extends com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature> + values) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_); + onChanged(); + } else { + guestOsFeaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder clearGuestOsFeatures() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + guestOsFeaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder removeGuestOsFeatures(int index) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.remove(index); + onChanged(); + } else { + guestOsFeaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + getGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + if (guestOsFeaturesBuilder_ != null) { + return guestOsFeaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + addGuestOsFeaturesBuilder() { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + .getDefaultInstance()); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + addGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + index, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + .getDefaultInstance()); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List< + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder> + getGuestOsFeaturesBuilderList() { + return getGuestOsFeaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesFieldBuilder() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>( + guestOsFeatures_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + guestOsFeatures_ = null; + } + return guestOsFeaturesBuilder_; + } + + private long index_; + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(long value) { + + index_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000020); + index_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       * * `NVME`
+       * * `SCSI`
+       * 
+ * + * string interface = 7; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       * * `NVME`
+       * * `SCSI`
+       * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       * * `NVME`
+       * * `SCSI`
+       * 
+ * + * string interface = 7; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interface_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       * * `NVME`
+       * * `SCSI`
+       * 
+ * + * string interface = 7; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + interface_ = getDefaultInstance().getInterface(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       * * `NVME`
+       * * `SCSI`
+       * 
+ * + * string interface = 7; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interface_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList licenses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLicensesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + bitField0_ |= 0x00000100; + } + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_.getUnmodifiableView(); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + * + * + *
+       * The mode in which to attach this disk, either `READ_WRITE` or
+       * `READ_ONLY`. If not specified, the default is to attach the disk in
+       * `READ_WRITE` mode. Valid values:
+       * * `READ_ONLY`
+       * * `READ_WRITE`
+       * 
+ * + * string mode = 10; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The mode in which to attach this disk, either `READ_WRITE` or
+       * `READ_ONLY`. If not specified, the default is to attach the disk in
+       * `READ_WRITE` mode. Valid values:
+       * * `READ_ONLY`
+       * * `READ_WRITE`
+       * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The mode in which to attach this disk, either `READ_WRITE` or
+       * `READ_ONLY`. If not specified, the default is to attach the disk in
+       * `READ_WRITE` mode. Valid values:
+       * * `READ_ONLY`
+       * * `READ_WRITE`
+       * 
+ * + * string mode = 10; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * The mode in which to attach this disk, either `READ_WRITE` or
+       * `READ_ONLY`. If not specified, the default is to attach the disk in
+       * `READ_WRITE` mode. Valid values:
+       * * `READ_ONLY`
+       * * `READ_WRITE`
+       * 
+ * + * string mode = 10; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + mode_ = getDefaultInstance().getMode(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+       * The mode in which to attach this disk, either `READ_WRITE` or
+       * `READ_ONLY`. If not specified, the default is to attach the disk in
+       * `READ_WRITE` mode. Valid values:
+       * * `READ_ONLY`
+       * * `READ_WRITE`
+       * 
+ * + * string mode = 10; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mode_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+       * Valid values:
+       * * `PERSISTENT`
+       * * `SCRATCH`
+       * 
+ * + * string type = 12; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+       * Valid values:
+       * * `PERSISTENT`
+       * * `SCRATCH`
+       * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+       * Valid values:
+       * * `PERSISTENT`
+       * * `SCRATCH`
+       * 
+ * + * string type = 12; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+       * Valid values:
+       * * `PERSISTENT`
+       * * `SCRATCH`
+       * 
+ * + * string type = 12; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
+       * Valid values:
+       * * `PERSISTENT`
+       * * `SCRATCH`
+       * 
+ * + * string type = 12; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance.Disk) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance.Disk) + private static final com.google.events.cloud.notebooks.v1.Instance.Disk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance.Disk(); + } + + public static com.google.events.cloud.notebooks.v1.Instance.Disk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Disk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ShieldedInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); + + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + boolean getEnableVtpm(); + + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + boolean getEnableIntegrityMonitoring(); + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * See [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * Not all combinations are valid.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig} + */ + public static final class ShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + ShieldedInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShieldedInstanceConfig.newBuilder() to construct. + private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ShieldedInstanceConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShieldedInstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_ = false; + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + public static final int ENABLE_VTPM_FIELD_NUMBER = 2; + private boolean enableVtpm_ = false; + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + + public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3; + private boolean enableIntegrityMonitoring_ = false; + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + output.writeBool(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + output.writeBool(3, enableIntegrityMonitoring_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other = + (com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (getEnableVtpm() != other.getEnableVtpm()) return false; + if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); + hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A set of Shielded Instance options.
+     * See [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * Not all combinations are valid.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableSecureBoot_ = false; + enableVtpm_ = false; + enableIntegrityMonitoring_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig build() { + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig buildPartial() { + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result = + new com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableSecureBoot_ = enableSecureBoot_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableVtpm_ = enableVtpm_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other) { + if (other + == com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + .getDefaultInstance()) return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + if (other.getEnableVtpm() != false) { + setEnableVtpm(other.getEnableVtpm()); + } + if (other.getEnableIntegrityMonitoring() != false) { + setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableVtpm_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + enableIntegrityMonitoring_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableSecureBoot_; + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + bitField0_ = (bitField0_ & ~0x00000001); + enableSecureBoot_ = false; + onChanged(); + return this; + } + + private boolean enableVtpm_; + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @param value The enableVtpm to set. + * @return This builder for chaining. + */ + public Builder setEnableVtpm(boolean value) { + + enableVtpm_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVtpm() { + bitField0_ = (bitField0_ & ~0x00000002); + enableVtpm_ = false; + onChanged(); + return this; + } + + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @param value The enableIntegrityMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableIntegrityMonitoring(boolean value) { + + enableIntegrityMonitoring_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableIntegrityMonitoring() { + bitField0_ = (bitField0_ & ~0x00000004); + enableIntegrityMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + private static final com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig(); + } + + public static com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpgradeHistoryEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + java.lang.String getSnapshot(); + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + com.google.protobuf.ByteString getSnapshotBytes(); + + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + java.lang.String getVmImage(); + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + com.google.protobuf.ByteString getVmImageBytes(); + + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + java.lang.String getContainerImage(); + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + com.google.protobuf.ByteString getContainerImageBytes(); + + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The framework. + */ + java.lang.String getFramework(); + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + com.google.protobuf.ByteString getFrameworkBytes(); + + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The state. + */ + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState(); + + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+     * 
+ * + * string target_image = 8; + * + * @return The targetImage. + */ + java.lang.String getTargetImage(); + /** + * + * + *
+     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+     * 
+ * + * string target_image = 8; + * + * @return The bytes for targetImage. + */ + com.google.protobuf.ByteString getTargetImageBytes(); + + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The action. + */ + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction(); + + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + java.lang.String getTargetVersion(); + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + com.google.protobuf.ByteString getTargetVersionBytes(); + } + /** + * + * + *
+   * The entry of VM image upgrade history.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry} + */ + public static final class UpgradeHistoryEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + UpgradeHistoryEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeHistoryEntry.newBuilder() to construct. + private UpgradeHistoryEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeHistoryEntry() { + snapshot_ = ""; + vmImage_ = ""; + containerImage_ = ""; + framework_ = ""; + version_ = ""; + state_ = 0; + targetImage_ = ""; + action_ = 0; + targetVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeHistoryEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class); + } + + /** + * + * + *
+     * The definition of the states of this upgrade history entry.
+     * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * State is not specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The instance upgrade is started.
+       * 
+ * + * STARTED = 1; + */ + STARTED(1), + /** + * + * + *
+       * The instance upgrade is succeeded.
+       * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+       * The instance upgrade is failed.
+       * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * State is not specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The instance upgrade is started.
+       * 
+ * + * STARTED = 1; + */ + public static final int STARTED_VALUE = 1; + /** + * + * + *
+       * The instance upgrade is succeeded.
+       * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+       * The instance upgrade is failed.
+       * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTED; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State) + } + + /** + * + * + *
+     * The definition of operations of this upgrade history entry.
+     * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Operation is not specified.
+       * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+       * Upgrade.
+       * 
+ * + * UPGRADE = 1; + */ + UPGRADE(1), + /** + * + * + *
+       * Rollback.
+       * 
+ * + * ROLLBACK = 2; + */ + ROLLBACK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Operation is not specified.
+       * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Upgrade.
+       * 
+ * + * UPGRADE = 1; + */ + public static final int UPGRADE_VALUE = 1; + /** + * + * + *
+       * Rollback.
+       * 
+ * + * ROLLBACK = 2; + */ + public static final int ROLLBACK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return UPGRADE; + case 2: + return ROLLBACK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action) + } + + public static final int SNAPSHOT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object snapshot_ = ""; + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + @java.lang.Override + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } + } + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vmImage_ = ""; + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public java.lang.String getVmImage() { + java.lang.Object ref = vmImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmImage_ = s; + return s; + } + } + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmImageBytes() { + java.lang.Object ref = vmImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object containerImage_ = ""; + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public java.lang.String getContainerImage() { + java.lang.Object ref = containerImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImage_ = s; + return s; + } + } + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerImageBytes() { + java.lang.Object ref = containerImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRAMEWORK_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object framework_ = ""; + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The framework. + */ + @java.lang.Override + public java.lang.String getFramework() { + java.lang.Object ref = framework_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + framework_ = s; + return s; + } + } + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFrameworkBytes() { + java.lang.Object ref = framework_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + framework_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result = + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int TARGET_IMAGE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetImage_ = ""; + /** + * + * + *
+     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+     * 
+ * + * string target_image = 8; + * + * @return The targetImage. + */ + @java.lang.Override + public java.lang.String getTargetImage() { + java.lang.Object ref = targetImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetImage_ = s; + return s; + } + } + /** + * + * + *
+     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+     * 
+ * + * string target_image = 8; + * + * @return The bytes for targetImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetImageBytes() { + java.lang.Object ref = targetImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 9; + private int action_ = 0; + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The action. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result = + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.forNumber( + action_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED + : result; + } + + public static final int TARGET_VERSION_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetVersion_ = ""; + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + @java.lang.Override + public java.lang.String getTargetVersion() { + java.lang.Object ref = targetVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetVersion_ = s; + return s; + } + } + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetVersionBytes() { + java.lang.Object ref = targetVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmImage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(framework_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, framework_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, state_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetImage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, targetImage_); + } + if (action_ + != com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action + .ACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, targetVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmImage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(framework_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, framework_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetImage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, targetImage_); + } + if (action_ + != com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action + .ACTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, targetVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other = + (com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) obj; + + if (!getSnapshot().equals(other.getSnapshot())) return false; + if (!getVmImage().equals(other.getVmImage())) return false; + if (!getContainerImage().equals(other.getContainerImage())) return false; + if (!getFramework().equals(other.getFramework())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getTargetImage().equals(other.getTargetImage())) return false; + if (action_ != other.action_) return false; + if (!getTargetVersion().equals(other.getTargetVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getSnapshot().hashCode(); + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + hash = (37 * hash) + FRAMEWORK_FIELD_NUMBER; + hash = (53 * hash) + getFramework().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + TARGET_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getTargetImage().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + TARGET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getTargetVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry 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 entry of VM image upgrade history.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + snapshot_ = ""; + vmImage_ = ""; + containerImage_ = ""; + framework_ = ""; + version_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + targetImage_ = ""; + action_ = 0; + targetVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry build() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry buildPartial() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result = + new com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.snapshot_ = snapshot_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vmImage_ = vmImage_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.containerImage_ = containerImage_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.framework_ = framework_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = + createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.targetImage_ = targetImage_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.targetVersion_ = targetVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other) { + if (other + == com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + .getDefaultInstance()) return this; + if (!other.getSnapshot().isEmpty()) { + snapshot_ = other.snapshot_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVmImage().isEmpty()) { + vmImage_ = other.vmImage_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getContainerImage().isEmpty()) { + containerImage_ = other.containerImage_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFramework().isEmpty()) { + framework_ = other.framework_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getTargetImage().isEmpty()) { + targetImage_ = other.targetImage_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getTargetVersion().isEmpty()) { + targetVersion_ = other.targetVersion_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + snapshot_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vmImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + containerImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + framework_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + targetImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + targetVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object snapshot_ = ""; + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + public com.google.protobuf.ByteString getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @param value The snapshot to set. + * @return This builder for chaining. + */ + public Builder setSnapshot(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snapshot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return This builder for chaining. + */ + public Builder clearSnapshot() { + snapshot_ = getDefaultInstance().getSnapshot(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @param value The bytes for snapshot to set. + * @return This builder for chaining. + */ + public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snapshot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vmImage_ = ""; + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + public java.lang.String getVmImage() { + java.lang.Object ref = vmImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + public com.google.protobuf.ByteString getVmImageBytes() { + java.lang.Object ref = vmImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @param value The vmImage to set. + * @return This builder for chaining. + */ + public Builder setVmImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vmImage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return This builder for chaining. + */ + public Builder clearVmImage() { + vmImage_ = getDefaultInstance().getVmImage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @param value The bytes for vmImage to set. + * @return This builder for chaining. + */ + public Builder setVmImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vmImage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object containerImage_ = ""; + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + public java.lang.String getContainerImage() { + java.lang.Object ref = containerImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + public com.google.protobuf.ByteString getContainerImageBytes() { + java.lang.Object ref = containerImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @param value The containerImage to set. + * @return This builder for chaining. + */ + public Builder setContainerImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + containerImage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return This builder for chaining. + */ + public Builder clearContainerImage() { + containerImage_ = getDefaultInstance().getContainerImage(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @param value The bytes for containerImage to set. + * @return This builder for chaining. + */ + public Builder setContainerImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + containerImage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object framework_ = ""; + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return The framework. + */ + public java.lang.String getFramework() { + java.lang.Object ref = framework_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + framework_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + public com.google.protobuf.ByteString getFrameworkBytes() { + java.lang.Object ref = framework_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + framework_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @param value The framework to set. + * @return This builder for chaining. + */ + public Builder setFramework(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + framework_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return This builder for chaining. + */ + public Builder clearFramework() { + framework_ = getDefaultInstance().getFramework(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @param value The bytes for framework to set. + * @return This builder for chaining. + */ + public Builder setFrameworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + framework_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result = + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.forNumber( + state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object targetImage_ = ""; + /** + * + * + *
+       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+       * 
+ * + * string target_image = 8; + * + * @return The targetImage. + */ + public java.lang.String getTargetImage() { + java.lang.Object ref = targetImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+       * 
+ * + * string target_image = 8; + * + * @return The bytes for targetImage. + */ + public com.google.protobuf.ByteString getTargetImageBytes() { + java.lang.Object ref = targetImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+       * 
+ * + * string target_image = 8; + * + * @param value The targetImage to set. + * @return This builder for chaining. + */ + public Builder setTargetImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetImage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+       * 
+ * + * string target_image = 8; + * + * @return This builder for chaining. + */ + public Builder clearTargetImage() { + targetImage_ = getDefaultInstance().getTargetImage(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
+       * 
+ * + * string target_image = 8; + * + * @param value The bytes for targetImage to set. + * @return This builder for chaining. + */ + public Builder setTargetImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetImage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return The action. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result = + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.forNumber( + action_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000100); + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object targetVersion_ = ""; + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + public java.lang.String getTargetVersion() { + java.lang.Object ref = targetVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + public com.google.protobuf.ByteString getTargetVersionBytes() { + java.lang.Object ref = targetVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @param value The targetVersion to set. + * @return This builder for chaining. + */ + public Builder setTargetVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetVersion_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return This builder for chaining. + */ + public Builder clearTargetVersion() { + targetVersion_ = getDefaultInstance().getTargetVersion(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @param value The bytes for targetVersion to set. + * @return This builder for chaining. + */ + public Builder setTargetVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetVersion_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + private static final com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry(); + } + + public static com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeHistoryEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int environmentCase_ = 0; + private java.lang.Object environment_; + + public enum EnvironmentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VM_IMAGE(2), + CONTAINER_IMAGE(3), + ENVIRONMENT_NOT_SET(0); + private final int value; + + private EnvironmentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EnvironmentCase valueOf(int value) { + return forNumber(value); + } + + public static EnvironmentCase forNumber(int value) { + switch (value) { + case 2: + return VM_IMAGE; + case 3: + return CONTAINER_IMAGE; + case 0: + return ENVIRONMENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EnvironmentCase getEnvironmentCase() { + return EnvironmentCase.forNumber(environmentCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return environmentCase_ == 2; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getVmImage() { + if (environmentCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if (environmentCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return environmentCase_ == 3; + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (environmentCase_ == 3) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if (environmentCase_ == 3) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROXY_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object proxyUri_ = ""; + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter
+   * notebook.
+   * 
+ * + * string proxy_uri = 5; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter
+   * notebook.
+   * 
+ * + * string proxy_uri = 5; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER = 31; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList serviceAccountScopes_; + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @return A list containing the serviceAccountScopes. + */ + public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { + return serviceAccountScopes_; + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @return The count of serviceAccountScopes. + */ + public int getServiceAccountScopesCount() { + return serviceAccountScopes_.size(); + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + public java.lang.String getServiceAccountScopes(int index) { + return serviceAccountScopes_.get(index); + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { + return serviceAccountScopes_.getByteString(index); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 9; + private com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_; + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.State getState() { + com.google.events.cloud.notebooks.v1.Instance.State result = + com.google.events.cloud.notebooks.v1.Instance.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.State.UNRECOGNIZED + : result; + } + + public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 11; + private boolean installGpuDriver_ = false; + /** + * + * + *
+   * Whether the end user authorizes Google Cloud to install GPU driver
+   * on this instance.
+   * If this field is empty or set to false, the GPU driver won't be installed.
+   * Only applicable to instances with GPUs.
+   * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + + public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + @java.lang.Override + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } + } + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISKS_FIELD_NUMBER = 28; + + @SuppressWarnings("serial") + private java.util.List disks_; + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + @java.lang.Override + public java.util.List getDisksList() { + return disks_; + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + @java.lang.Override + public java.util.List + getDisksOrBuilderList() { + return disks_; + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + @java.lang.Override + public int getDisksCount() { + return disks_.size(); + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.Disk getDisks(int index) { + return disks_.get(index); + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index) { + return disks_.get(index); + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 30; + private com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + shieldedInstanceConfig_; + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + + public static final int NO_PUBLIC_IP_FIELD_NUMBER = 17; + private boolean noPublicIp_ = false; + /** + * + * + *
+   * If true, no external IP will be assigned to this instance.
+   * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + @java.lang.Override + public boolean getNoPublicIp() { + return noPublicIp_; + } + + public static final int NO_PROXY_ACCESS_FIELD_NUMBER = 18; + private boolean noProxyAccess_ = false; + /** + * + * + *
+   * If true, the notebook instance will not register with the proxy.
+   * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + @java.lang.Override + public boolean getNoProxyAccess() { + return noProxyAccess_; + } + + public static final int NETWORK_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnet_ = ""; + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + @java.lang.Override + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 21; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 22; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public /* nullable */ java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAGS_FIELD_NUMBER = 32; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int UPGRADE_HISTORY_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private java.util.List + upgradeHistory_; + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public java.util.List + getUpgradeHistoryList() { + return upgradeHistory_; + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryOrBuilderList() { + return upgradeHistory_; + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public int getUpgradeHistoryCount() { + return upgradeHistory_.size(); + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory( + int index) { + return upgradeHistory_.get(index); + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder + getUpgradeHistoryOrBuilder(int index) { + return upgradeHistory_.get(index); + } + + public static final int NIC_TYPE_FIELD_NUMBER = 33; + private int nicType_ = 0; + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The nicType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.NicType getNicType() { + com.google.events.cloud.notebooks.v1.Instance.NicType result = + com.google.events.cloud.notebooks.v1.Instance.NicType.forNumber(nicType_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED + : result; + } + + public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 34; + private com.google.events.cloud.notebooks.v1.ReservationAffinity reservationAffinity_; + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return Whether the reservationAffinity field is set. + */ + @java.lang.Override + public boolean hasReservationAffinity() { + return reservationAffinity_ != null; + } + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return The reservationAffinity. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() { + return reservationAffinity_ == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder + getReservationAffinityOrBuilder() { + return reservationAffinity_ == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } + + public static final int CREATOR_FIELD_NUMBER = 36; + + @SuppressWarnings("serial") + private volatile java.lang.Object creator_ = ""; + /** + * + * + *
+   * Output only. Email address of entity that sent original CreateInstance
+   * request.
+   * 
+ * + * string creator = 36; + * + * @return The creator. + */ + @java.lang.Override + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Email address of entity that sent original CreateInstance
+   * request.
+   * 
+ * + * string creator = 36; + * + * @return The bytes for creator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAN_IP_FORWARD_FIELD_NUMBER = 39; + private boolean canIpForward_ = false; + /** + * + * + *
+   * Optional. Flag to enable ip forwarding or not, default false/off.
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * 
+ * + * bool can_ip_forward = 39; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 23; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 24; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (environmentCase_ == 2) { + output.writeMessage(2, (com.google.events.cloud.notebooks.v1.VmImage) environment_); + } + if (environmentCase_ == 3) { + output.writeMessage(3, (com.google.events.cloud.notebooks.v1.ContainerImage) environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postStartupScript_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, machineType_); + } + if (acceleratorConfig_ != null) { + output.writeMessage(9, getAcceleratorConfig()); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (installGpuDriver_ != false) { + output.writeBool(11, installGpuDriver_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, customGpuDriverPath_); + } + if (noPublicIp_ != false) { + output.writeBool(17, noPublicIp_); + } + if (noProxyAccess_ != false) { + output.writeBool(18, noProxyAccess_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, subnet_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 21); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22); + if (createTime_ != null) { + output.writeMessage(23, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(24, getUpdateTime()); + } + for (int i = 0; i < disks_.size(); i++) { + output.writeMessage(28, disks_.get(i)); + } + for (int i = 0; i < upgradeHistory_.size(); i++) { + output.writeMessage(29, upgradeHistory_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(30, getShieldedInstanceConfig()); + } + for (int i = 0; i < serviceAccountScopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 31, serviceAccountScopes_.getRaw(i)); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 32, tags_.getRaw(i)); + } + if (nicType_ + != com.google.events.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { + output.writeEnum(33, nicType_); + } + if (reservationAffinity_ != null) { + output.writeMessage(34, getReservationAffinity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 36, creator_); + } + if (canIpForward_ != false) { + output.writeBool(39, canIpForward_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (environmentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.events.cloud.notebooks.v1.VmImage) environment_); + } + if (environmentCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.events.cloud.notebooks.v1.ContainerImage) environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postStartupScript_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, machineType_); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAcceleratorConfig()); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (installGpuDriver_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, installGpuDriver_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, customGpuDriverPath_); + } + if (noPublicIp_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, noPublicIp_); + } + if (noProxyAccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, noProxyAccess_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, subnet_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, labels__); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getUpdateTime()); + } + for (int i = 0; i < disks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, disks_.get(i)); + } + for (int i = 0; i < upgradeHistory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, upgradeHistory_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(30, getShieldedInstanceConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < serviceAccountScopes_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceAccountScopes_.getRaw(i)); + } + size += dataSize; + size += 2 * getServiceAccountScopesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagsList().size(); + } + if (nicType_ + != com.google.events.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(33, nicType_); + } + if (reservationAffinity_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(34, getReservationAffinity()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, creator_); + } + if (canIpForward_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(39, canIpForward_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Instance)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Instance other = + (com.google.events.cloud.notebooks.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getServiceAccountScopesList().equals(other.getServiceAccountScopesList())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (state_ != other.state_) return false; + if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false; + if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false; + if (!getDisksList().equals(other.getDisksList())) return false; + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + } + if (getNoPublicIp() != other.getNoPublicIp()) return false; + if (getNoProxyAccess() != other.getNoProxyAccess()) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnet().equals(other.getSubnet())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getUpgradeHistoryList().equals(other.getUpgradeHistoryList())) return false; + if (nicType_ != other.nicType_) return false; + if (hasReservationAffinity() != other.hasReservationAffinity()) return false; + if (hasReservationAffinity()) { + if (!getReservationAffinity().equals(other.getReservationAffinity())) return false; + } + if (!getCreator().equals(other.getCreator())) return false; + if (getCanIpForward() != other.getCanIpForward()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEnvironmentCase().equals(other.getEnvironmentCase())) return false; + switch (environmentCase_) { + case 2: + if (!getVmImage().equals(other.getVmImage())) return false; + break; + case 3: + if (!getContainerImage().equals(other.getContainerImage())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getServiceAccountScopesCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountScopesList().hashCode(); + } + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver()); + hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCustomGpuDriverPath().hashCode(); + if (getDisksCount() > 0) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisksList().hashCode(); + } + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + hash = (37 * hash) + NO_PUBLIC_IP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoPublicIp()); + hash = (37 * hash) + NO_PROXY_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoProxyAccess()); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (getUpgradeHistoryCount() > 0) { + hash = (37 * hash) + UPGRADE_HISTORY_FIELD_NUMBER; + hash = (53 * hash) + getUpgradeHistoryList().hashCode(); + } + hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nicType_; + if (hasReservationAffinity()) { + hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + getReservationAffinity().hashCode(); + } + hash = (37 * hash) + CREATOR_FIELD_NUMBER; + hash = (53 * hash) + getCreator().hashCode(); + hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanIpForward()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (environmentCase_) { + case 2: + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + break; + case 3: + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Instance 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 definition of a notebook instance.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Instance) + com.google.events.cloud.notebooks.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 21: + return internalGetLabels(); + case 22: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 21: + return internalGetMutableLabels(); + case 22: + return internalGetMutableMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Instance.class, + com.google.events.cloud.notebooks.v1.Instance.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Instance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (vmImageBuilder_ != null) { + vmImageBuilder_.clear(); + } + if (containerImageBuilder_ != null) { + containerImageBuilder_.clear(); + } + postStartupScript_ = ""; + proxyUri_ = ""; + serviceAccount_ = ""; + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + machineType_ = ""; + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + state_ = 0; + installGpuDriver_ = false; + customGpuDriverPath_ = ""; + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + } else { + disks_ = null; + disksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + shieldedInstanceConfig_ = null; + if (shieldedInstanceConfigBuilder_ != null) { + shieldedInstanceConfigBuilder_.dispose(); + shieldedInstanceConfigBuilder_ = null; + } + noPublicIp_ = false; + noProxyAccess_ = false; + network_ = ""; + subnet_ = ""; + internalGetMutableLabels().clear(); + internalGetMutableMetadata().clear(); + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00100000); + if (upgradeHistoryBuilder_ == null) { + upgradeHistory_ = java.util.Collections.emptyList(); + } else { + upgradeHistory_ = null; + upgradeHistoryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00200000); + nicType_ = 0; + reservationAffinity_ = null; + if (reservationAffinityBuilder_ != null) { + reservationAffinityBuilder_.dispose(); + reservationAffinityBuilder_ = null; + } + creator_ = ""; + canIpForward_ = false; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + environmentCase_ = 0; + environment_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance build() { + com.google.events.cloud.notebooks.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance buildPartial() { + com.google.events.cloud.notebooks.v1.Instance result = + new com.google.events.cloud.notebooks.v1.Instance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.events.cloud.notebooks.v1.Instance result) { + if (((bitField0_ & 0x00000040) != 0)) { + serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.serviceAccountScopes_ = serviceAccountScopes_; + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.disks_ = disks_; + } else { + result.disks_ = disksBuilder_.build(); + } + if (((bitField0_ & 0x00100000) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00100000); + } + result.tags_ = tags_; + if (upgradeHistoryBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0)) { + upgradeHistory_ = java.util.Collections.unmodifiableList(upgradeHistory_); + bitField0_ = (bitField0_ & ~0x00200000); + } + result.upgradeHistory_ = upgradeHistory_; + } else { + result.upgradeHistory_ = upgradeHistoryBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Instance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.postStartupScript_ = postStartupScript_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.proxyUri_ = proxyUri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.machineType_ = machineType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.acceleratorConfig_ = + acceleratorConfigBuilder_ == null + ? acceleratorConfig_ + : acceleratorConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.installGpuDriver_ = installGpuDriver_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.customGpuDriverPath_ = customGpuDriverPath_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.shieldedInstanceConfig_ = + shieldedInstanceConfigBuilder_ == null + ? shieldedInstanceConfig_ + : shieldedInstanceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.noPublicIp_ = noPublicIp_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.noProxyAccess_ = noProxyAccess_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.subnet_ = subnet_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.nicType_ = nicType_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.reservationAffinity_ = + reservationAffinityBuilder_ == null + ? reservationAffinity_ + : reservationAffinityBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.creator_ = creator_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.canIpForward_ = canIpForward_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.events.cloud.notebooks.v1.Instance result) { + result.environmentCase_ = environmentCase_; + result.environment_ = this.environment_; + if (environmentCase_ == 2 && vmImageBuilder_ != null) { + result.environment_ = vmImageBuilder_.build(); + } + if (environmentCase_ == 3 && containerImageBuilder_ != null) { + result.environment_ = containerImageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Instance) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Instance other) { + if (other == com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.serviceAccountScopes_.isEmpty()) { + if (serviceAccountScopes_.isEmpty()) { + serviceAccountScopes_ = other.serviceAccountScopes_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.addAll(other.serviceAccountScopes_); + } + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getInstallGpuDriver() != false) { + setInstallGpuDriver(other.getInstallGpuDriver()); + } + if (!other.getCustomGpuDriverPath().isEmpty()) { + customGpuDriverPath_ = other.customGpuDriverPath_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (disksBuilder_ == null) { + if (!other.disks_.isEmpty()) { + if (disks_.isEmpty()) { + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureDisksIsMutable(); + disks_.addAll(other.disks_); + } + onChanged(); + } + } else { + if (!other.disks_.isEmpty()) { + if (disksBuilder_.isEmpty()) { + disksBuilder_.dispose(); + disksBuilder_ = null; + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00001000); + disksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDisksFieldBuilder() + : null; + } else { + disksBuilder_.addAllMessages(other.disks_); + } + } + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + if (other.getNoPublicIp() != false) { + setNoPublicIp(other.getNoPublicIp()); + } + if (other.getNoProxyAccess() != false) { + setNoProxyAccess(other.getNoProxyAccess()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (!other.getSubnet().isEmpty()) { + subnet_ = other.subnet_; + bitField0_ |= 0x00020000; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00040000; + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + bitField0_ |= 0x00080000; + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00100000); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (upgradeHistoryBuilder_ == null) { + if (!other.upgradeHistory_.isEmpty()) { + if (upgradeHistory_.isEmpty()) { + upgradeHistory_ = other.upgradeHistory_; + bitField0_ = (bitField0_ & ~0x00200000); + } else { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.addAll(other.upgradeHistory_); + } + onChanged(); + } + } else { + if (!other.upgradeHistory_.isEmpty()) { + if (upgradeHistoryBuilder_.isEmpty()) { + upgradeHistoryBuilder_.dispose(); + upgradeHistoryBuilder_ = null; + upgradeHistory_ = other.upgradeHistory_; + bitField0_ = (bitField0_ & ~0x00200000); + upgradeHistoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUpgradeHistoryFieldBuilder() + : null; + } else { + upgradeHistoryBuilder_.addAllMessages(other.upgradeHistory_); + } + } + } + if (other.nicType_ != 0) { + setNicTypeValue(other.getNicTypeValue()); + } + if (other.hasReservationAffinity()) { + mergeReservationAffinity(other.getReservationAffinity()); + } + if (!other.getCreator().isEmpty()) { + creator_ = other.creator_; + bitField0_ |= 0x01000000; + onChanged(); + } + if (other.getCanIpForward() != false) { + setCanIpForward(other.getCanIpForward()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getEnvironmentCase()) { + case VM_IMAGE: + { + mergeVmImage(other.getVmImage()); + break; + } + case CONTAINER_IMAGE: + { + mergeContainerImage(other.getContainerImage()); + break; + } + case ENVIRONMENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getVmImageFieldBuilder().getBuilder(), extensionRegistry); + environmentCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getContainerImageFieldBuilder().getBuilder(), extensionRegistry); + environmentCase_ = 3; + break; + } // case 26 + case 34: + { + postStartupScript_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + proxyUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + getAcceleratorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + installGpuDriver_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + customGpuDriverPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 136: + { + noPublicIp_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 136 + case 144: + { + noProxyAccess_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 144 + case 154: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 154 + case 162: + { + subnet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 162 + case 170: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 170 + case 178: + { + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00080000; + break; + } // case 178 + case 186: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 186 + case 194: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 194 + case 226: + { + com.google.events.cloud.notebooks.v1.Instance.Disk m = + input.readMessage( + com.google.events.cloud.notebooks.v1.Instance.Disk.parser(), + extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 226 + case 234: + { + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry m = + input.readMessage( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.parser(), + extensionRegistry); + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(m); + } else { + upgradeHistoryBuilder_.addMessage(m); + } + break; + } // case 234 + case 242: + { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 242 + case 250: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.add(s); + break; + } // case 250 + case 258: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 258 + case 264: + { + nicType_ = input.readEnum(); + bitField0_ |= 0x00400000; + break; + } // case 264 + case 274: + { + input.readMessage( + getReservationAffinityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 274 + case 290: + { + creator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x01000000; + break; + } // case 290 + case 312: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x02000000; + break; + } // case 312 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int environmentCase_ = 0; + private java.lang.Object environment_; + + public EnvironmentCase getEnvironmentCase() { + return EnvironmentCase.forNumber(environmentCase_); + } + + public Builder clearEnvironment() { + environmentCase_ = 0; + environment_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder> + vmImageBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return environmentCase_ == 2; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getVmImage() { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } else { + if (environmentCase_ == 2) { + return vmImageBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder setVmImage(com.google.events.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + vmImageBuilder_.setMessage(value); + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder setVmImage( + com.google.events.cloud.notebooks.v1.VmImage.Builder builderForValue) { + if (vmImageBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + vmImageBuilder_.setMessage(builderForValue.build()); + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder mergeVmImage(com.google.events.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2 + && environment_ != com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance()) { + environment_ = + com.google.events.cloud.notebooks.v1.VmImage.newBuilder( + (com.google.events.cloud.notebooks.v1.VmImage) environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + if (environmentCase_ == 2) { + vmImageBuilder_.mergeFrom(value); + } else { + vmImageBuilder_.setMessage(value); + } + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder clearVmImage() { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2) { + environmentCase_ = 0; + environment_ = null; + onChanged(); + } + } else { + if (environmentCase_ == 2) { + environmentCase_ = 0; + environment_ = null; + } + vmImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public com.google.events.cloud.notebooks.v1.VmImage.Builder getVmImageBuilder() { + return getVmImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if ((environmentCase_ == 2) && (vmImageBuilder_ != null)) { + return vmImageBuilder_.getMessageOrBuilder(); + } else { + if (environmentCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder> + getVmImageFieldBuilder() { + if (vmImageBuilder_ == null) { + if (!(environmentCase_ == 2)) { + environment_ = com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + vmImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VmImage, + com.google.events.cloud.notebooks.v1.VmImage.Builder, + com.google.events.cloud.notebooks.v1.VmImageOrBuilder>( + (com.google.events.cloud.notebooks.v1.VmImage) environment_, + getParentForChildren(), + isClean()); + environment_ = null; + } + environmentCase_ = 2; + onChanged(); + return vmImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImageBuilder_; + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return environmentCase_ == 3; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } else { + if (environmentCase_ == 3) { + return containerImageBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder setContainerImage(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + containerImageBuilder_.setMessage(value); + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder setContainerImage( + com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImageBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + containerImageBuilder_.setMessage(builderForValue.build()); + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder mergeContainerImage(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3 + && environment_ + != com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) { + environment_ = + com.google.events.cloud.notebooks.v1.ContainerImage.newBuilder( + (com.google.events.cloud.notebooks.v1.ContainerImage) environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + if (environmentCase_ == 3) { + containerImageBuilder_.mergeFrom(value); + } else { + containerImageBuilder_.setMessage(value); + } + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder clearContainerImage() { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3) { + environmentCase_ = 0; + environment_ = null; + onChanged(); + } + } else { + if (environmentCase_ == 3) { + environmentCase_ = 0; + environment_ = null; + } + containerImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder getContainerImageBuilder() { + return getContainerImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder + getContainerImageOrBuilder() { + if ((environmentCase_ == 3) && (containerImageBuilder_ != null)) { + return containerImageBuilder_.getMessageOrBuilder(); + } else { + if (environmentCase_ == 3) { + return (com.google.events.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImageFieldBuilder() { + if (containerImageBuilder_ == null) { + if (!(environmentCase_ == 3)) { + environment_ = com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + containerImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder>( + (com.google.events.cloud.notebooks.v1.ContainerImage) environment_, + getParentForChildren(), + isClean()); + environment_ = null; + } + environmentCase_ = 3; + onChanged(); + return containerImageBuilder_; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 4; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + postStartupScript_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 4; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 4; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + postStartupScript_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter
+     * notebook.
+     * 
+ * + * string proxy_uri = 5; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter
+     * notebook.
+     * 
+ * + * string proxy_uri = 5; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter
+     * notebook.
+     * 
+ * + * string proxy_uri = 5; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + proxyUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter
+     * notebook.
+     * 
+ * + * string proxy_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + proxyUri_ = getDefaultInstance().getProxyUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter
+     * notebook.
+     * 
+ * + * string proxy_uri = 5; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + proxyUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList serviceAccountScopes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServiceAccountScopesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(serviceAccountScopes_); + bitField0_ |= 0x00000040; + } + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @return A list containing the serviceAccountScopes. + */ + public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { + return serviceAccountScopes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @return The count of serviceAccountScopes. + */ + public int getServiceAccountScopesCount() { + return serviceAccountScopes_.size(); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + public java.lang.String getServiceAccountScopes(int index) { + return serviceAccountScopes_.get(index); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { + return serviceAccountScopes_.getByteString(index); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index to set the value at. + * @param value The serviceAccountScopes to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param value The serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addServiceAccountScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param values The serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addAllServiceAccountScopes(java.lang.Iterable values) { + ensureServiceAccountScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccountScopes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountScopes() { + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31; + * + * @param value The bytes of the serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addServiceAccountScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return The acceleratorConfig. + */ + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + } else { + acceleratorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public Builder mergeAcceleratorConfig( + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && acceleratorConfig_ != null + && acceleratorConfig_ + != com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig + .getDefaultInstance()) { + getAcceleratorConfigBuilder().mergeFrom(value); + } else { + acceleratorConfig_ = value; + } + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public Builder clearAcceleratorConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you have
+     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.State getState() { + com.google.events.cloud.notebooks.v1.Instance.State result = + com.google.events.cloud.notebooks.v1.Instance.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.events.cloud.notebooks.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private boolean installGpuDriver_; + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @param value The installGpuDriver to set. + * @return This builder for chaining. + */ + public Builder setInstallGpuDriver(boolean value) { + + installGpuDriver_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @return This builder for chaining. + */ + public Builder clearInstallGpuDriver() { + bitField0_ = (bitField0_ & ~0x00000400); + installGpuDriver_ = false; + onChanged(); + return this; + } + + private java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @param value The customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customGpuDriverPath_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return This builder for chaining. + */ + public Builder clearCustomGpuDriverPath() { + customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @param value The bytes for customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customGpuDriverPath_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.util.List disks_ = + java.util.Collections.emptyList(); + + private void ensureDisksIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + disks_ = + new java.util.ArrayList(disks_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk, + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder> + disksBuilder_; + + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public java.util.List getDisksList() { + if (disksBuilder_ == null) { + return java.util.Collections.unmodifiableList(disks_); + } else { + return disksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public int getDisksCount() { + if (disksBuilder_ == null) { + return disks_.size(); + } else { + return disksBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk getDisks(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder setDisks(int index, com.google.events.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.set(index, value); + onChanged(); + } else { + disksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder setDisks( + int index, com.google.events.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.set(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder addDisks(com.google.events.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(value); + onChanged(); + } else { + disksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder addDisks(int index, com.google.events.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(index, value); + onChanged(); + } else { + disksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder addDisks( + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder addDisks( + int index, com.google.events.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder addAllDisks( + java.lang.Iterable values) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_); + onChanged(); + } else { + disksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder clearDisks() { + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + disksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public Builder removeDisks(int index) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.remove(index); + onChanged(); + } else { + disksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.Builder getDisksBuilder(int index) { + return getDisksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder( + int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public java.util.List + getDisksOrBuilderList() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(disks_); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder() { + return getDisksFieldBuilder() + .addBuilder(com.google.events.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public com.google.events.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder(int index) { + return getDisksFieldBuilder() + .addBuilder( + index, com.google.events.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + public java.util.List + getDisksBuilderList() { + return getDisksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk, + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder> + getDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.Disk, + com.google.events.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder>( + disks_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + private com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + shieldedInstanceConfigBuilder_; + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return The shieldedInstanceConfig. + */ + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + .getDefaultInstance() + : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public Builder setShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public Builder setShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder + builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public Builder mergeShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && shieldedInstanceConfig_ != null + && shieldedInstanceConfig_ + != com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + .getDefaultInstance()) { + getShieldedInstanceConfigBuilder().mergeFrom(value); + } else { + shieldedInstanceConfig_ = value; + } + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public Builder clearShieldedInstanceConfig() { + bitField0_ = (bitField0_ & ~0x00002000); + shieldedInstanceConfig_ = null; + if (shieldedInstanceConfigBuilder_ != null) { + shieldedInstanceConfigBuilder_.dispose(); + shieldedInstanceConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder + getShieldedInstanceConfigBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + .getDefaultInstance() + : shieldedInstanceConfig_; + } + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM
+     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + + private boolean noPublicIp_; + /** + * + * + *
+     * If true, no external IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + @java.lang.Override + public boolean getNoPublicIp() { + return noPublicIp_; + } + /** + * + * + *
+     * If true, no external IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @param value The noPublicIp to set. + * @return This builder for chaining. + */ + public Builder setNoPublicIp(boolean value) { + + noPublicIp_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, no external IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @return This builder for chaining. + */ + public Builder clearNoPublicIp() { + bitField0_ = (bitField0_ & ~0x00004000); + noPublicIp_ = false; + onChanged(); + return this; + } + + private boolean noProxyAccess_; + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + @java.lang.Override + public boolean getNoProxyAccess() { + return noProxyAccess_; + } + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @param value The noProxyAccess to set. + * @return This builder for chaining. + */ + public Builder setNoProxyAccess(boolean value) { + + noProxyAccess_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @return This builder for chaining. + */ + public Builder clearNoProxyAccess() { + bitField0_ = (bitField0_ & ~0x00008000); + noProxyAccess_ = false; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private java.lang.Object subnet_ = ""; + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @param value The subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnet_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return This builder for chaining. + */ + public Builder clearSubnet() { + subnet_ = getDefaultInstance().getSubnet(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @param value The bytes for subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnet_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00040000; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00040000; + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00040000; + return this; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00080000; + onChanged(); + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public /* nullable */ java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00080000); + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + bitField0_ |= 0x00080000; + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + bitField0_ |= 0x00080000; + return this; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + bitField0_ |= 0x00080000; + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00100000) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00100000; + } + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.util.List + upgradeHistory_ = java.util.Collections.emptyList(); + + private void ensureUpgradeHistoryIsMutable() { + if (!((bitField0_ & 0x00200000) != 0)) { + upgradeHistory_ = + new java.util.ArrayList< + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>(upgradeHistory_); + bitField0_ |= 0x00200000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + upgradeHistoryBuilder_; + + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List + getUpgradeHistoryList() { + if (upgradeHistoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(upgradeHistory_); + } else { + return upgradeHistoryBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public int getUpgradeHistoryCount() { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.size(); + } else { + return upgradeHistoryBuilder_.getCount(); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory( + int index) { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.get(index); + } else { + return upgradeHistoryBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder setUpgradeHistory( + int index, com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.set(index, value); + onChanged(); + } else { + upgradeHistoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder setUpgradeHistory( + int index, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.set(index, builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(value); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + int index, com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(index, value); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + int index, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(index, builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addAllUpgradeHistory( + java.lang.Iterable< + ? extends com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry> + values) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, upgradeHistory_); + onChanged(); + } else { + upgradeHistoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder clearUpgradeHistory() { + if (upgradeHistoryBuilder_ == null) { + upgradeHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + } else { + upgradeHistoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder removeUpgradeHistory(int index) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.remove(index); + onChanged(); + } else { + upgradeHistoryBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + getUpgradeHistoryBuilder(int index) { + return getUpgradeHistoryFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder + getUpgradeHistoryOrBuilder(int index) { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.get(index); + } else { + return upgradeHistoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryOrBuilderList() { + if (upgradeHistoryBuilder_ != null) { + return upgradeHistoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(upgradeHistory_); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + addUpgradeHistoryBuilder() { + return getUpgradeHistoryFieldBuilder() + .addBuilder( + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + .getDefaultInstance()); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + addUpgradeHistoryBuilder(int index) { + return getUpgradeHistoryFieldBuilder() + .addBuilder( + index, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + .getDefaultInstance()); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List + getUpgradeHistoryBuilderList() { + return getUpgradeHistoryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryFieldBuilder() { + if (upgradeHistoryBuilder_ == null) { + upgradeHistoryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>( + upgradeHistory_, + ((bitField0_ & 0x00200000) != 0), + getParentForChildren(), + isClean()); + upgradeHistory_ = null; + } + return upgradeHistoryBuilder_; + } + + private int nicType_ = 0; + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @param value The enum numeric value on the wire for nicType to set. + * @return This builder for chaining. + */ + public Builder setNicTypeValue(int value) { + nicType_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The nicType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance.NicType getNicType() { + com.google.events.cloud.notebooks.v1.Instance.NicType result = + com.google.events.cloud.notebooks.v1.Instance.NicType.forNumber(nicType_); + return result == null + ? com.google.events.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @param value The nicType to set. + * @return This builder for chaining. + */ + public Builder setNicType(com.google.events.cloud.notebooks.v1.Instance.NicType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00400000; + nicType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return This builder for chaining. + */ + public Builder clearNicType() { + bitField0_ = (bitField0_ & ~0x00400000); + nicType_ = 0; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.ReservationAffinity reservationAffinity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ReservationAffinity, + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder> + reservationAffinityBuilder_; + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return Whether the reservationAffinity field is set. + */ + public boolean hasReservationAffinity() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return The reservationAffinity. + */ + public com.google.events.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() { + if (reservationAffinityBuilder_ == null) { + return reservationAffinity_ == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } else { + return reservationAffinityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public Builder setReservationAffinity( + com.google.events.cloud.notebooks.v1.ReservationAffinity value) { + if (reservationAffinityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservationAffinity_ = value; + } else { + reservationAffinityBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public Builder setReservationAffinity( + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder builderForValue) { + if (reservationAffinityBuilder_ == null) { + reservationAffinity_ = builderForValue.build(); + } else { + reservationAffinityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public Builder mergeReservationAffinity( + com.google.events.cloud.notebooks.v1.ReservationAffinity value) { + if (reservationAffinityBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && reservationAffinity_ != null + && reservationAffinity_ + != com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()) { + getReservationAffinityBuilder().mergeFrom(value); + } else { + reservationAffinity_ = value; + } + } else { + reservationAffinityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public Builder clearReservationAffinity() { + bitField0_ = (bitField0_ & ~0x00800000); + reservationAffinity_ = null; + if (reservationAffinityBuilder_ != null) { + reservationAffinityBuilder_.dispose(); + reservationAffinityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder + getReservationAffinityBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getReservationAffinityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + public com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder + getReservationAffinityOrBuilder() { + if (reservationAffinityBuilder_ != null) { + return reservationAffinityBuilder_.getMessageOrBuilder(); + } else { + return reservationAffinity_ == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ReservationAffinity, + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder> + getReservationAffinityFieldBuilder() { + if (reservationAffinityBuilder_ == null) { + reservationAffinityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ReservationAffinity, + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder>( + getReservationAffinity(), getParentForChildren(), isClean()); + reservationAffinity_ = null; + } + return reservationAffinityBuilder_; + } + + private java.lang.Object creator_ = ""; + /** + * + * + *
+     * Output only. Email address of entity that sent original CreateInstance
+     * request.
+     * 
+ * + * string creator = 36; + * + * @return The creator. + */ + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Email address of entity that sent original CreateInstance
+     * request.
+     * 
+ * + * string creator = 36; + * + * @return The bytes for creator. + */ + public com.google.protobuf.ByteString getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Email address of entity that sent original CreateInstance
+     * request.
+     * 
+ * + * string creator = 36; + * + * @param value The creator to set. + * @return This builder for chaining. + */ + public Builder setCreator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + creator_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of entity that sent original CreateInstance
+     * request.
+     * 
+ * + * string creator = 36; + * + * @return This builder for chaining. + */ + public Builder clearCreator() { + creator_ = getDefaultInstance().getCreator(); + bitField0_ = (bitField0_ & ~0x01000000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of entity that sent original CreateInstance
+     * request.
+     * 
+ * + * string creator = 36; + * + * @param value The bytes for creator to set. + * @return This builder for chaining. + */ + public Builder setCreatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + creator_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + private boolean canIpForward_; + /** + * + * + *
+     * Optional. Flag to enable ip forwarding or not, default false/off.
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * 
+ * + * bool can_ip_forward = 39; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + /** + * + * + *
+     * Optional. Flag to enable ip forwarding or not, default false/off.
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * 
+ * + * bool can_ip_forward = 39; + * + * @param value The canIpForward to set. + * @return This builder for chaining. + */ + public Builder setCanIpForward(boolean value) { + + canIpForward_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Flag to enable ip forwarding or not, default false/off.
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * 
+ * + * bool can_ip_forward = 39; + * + * @return This builder for chaining. + */ + public Builder clearCanIpForward() { + bitField0_ = (bitField0_ & ~0x02000000); + canIpForward_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x04000000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x08000000); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Instance) + private static final com.google.events.cloud.notebooks.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Instance(); + } + + public static com.google.events.cloud.notebooks.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventData.java new file mode 100644 index 00000000..48bfa1da --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventData.java @@ -0,0 +1,725 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The data within all Instance events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.InstanceEventData} + */ +public final class InstanceEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.InstanceEventData) + InstanceEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceEventData.newBuilder() to construct. + private InstanceEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_InstanceEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.InstanceEventData.class, + com.google.events.cloud.notebooks.v1.InstanceEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.Instance payload_; + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Instance getPayload() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.InstanceOrBuilder getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.InstanceEventData)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.InstanceEventData other = + (com.google.events.cloud.notebooks.v1.InstanceEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.InstanceEventData 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 data within all Instance events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.InstanceEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.InstanceEventData) + com.google.events.cloud.notebooks.v1.InstanceEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_InstanceEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.InstanceEventData.class, + com.google.events.cloud.notebooks.v1.InstanceEventData.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.InstanceEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_InstanceEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.InstanceEventData getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.InstanceEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.InstanceEventData build() { + com.google.events.cloud.notebooks.v1.InstanceEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.InstanceEventData buildPartial() { + com.google.events.cloud.notebooks.v1.InstanceEventData result = + new com.google.events.cloud.notebooks.v1.InstanceEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.InstanceEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.InstanceEventData) { + return mergeFrom((com.google.events.cloud.notebooks.v1.InstanceEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.InstanceEventData other) { + if (other == com.google.events.cloud.notebooks.v1.InstanceEventData.getDefaultInstance()) + return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.Instance payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance, + com.google.events.cloud.notebooks.v1.Instance.Builder, + com.google.events.cloud.notebooks.v1.InstanceOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.notebooks.v1.Instance getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public Builder setPayload(com.google.events.cloud.notebooks.v1.Instance value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.notebooks.v1.Instance.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public Builder mergePayload(com.google.events.cloud.notebooks.v1.Instance value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ != com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public com.google.events.cloud.notebooks.v1.Instance.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + public com.google.events.cloud.notebooks.v1.InstanceOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Instance.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The Instance event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance, + com.google.events.cloud.notebooks.v1.Instance.Builder, + com.google.events.cloud.notebooks.v1.InstanceOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Instance, + com.google.events.cloud.notebooks.v1.Instance.Builder, + com.google.events.cloud.notebooks.v1.InstanceOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.InstanceEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.InstanceEventData) + private static final com.google.events.cloud.notebooks.v1.InstanceEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.InstanceEventData(); + } + + public static com.google.events.cloud.notebooks.v1.InstanceEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.InstanceEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventDataOrBuilder.java new file mode 100644 index 00000000..44707049 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface InstanceEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.InstanceEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.notebooks.v1.Instance getPayload(); + /** + * + * + *
+   * Optional. The Instance event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Instance payload = 1; + */ + com.google.events.cloud.notebooks.v1.InstanceOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceOrBuilder.java new file mode 100644 index 00000000..14489c9d --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/InstanceOrBuilder.java @@ -0,0 +1,1053 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + boolean hasVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + com.google.events.cloud.notebooks.v1.VmImage getVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VmImage vm_image = 2; + */ + com.google.events.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder(); + + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + boolean hasContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + com.google.events.cloud.notebooks.v1.ContainerImage getContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); + + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter
+   * notebook.
+   * 
+ * + * string proxy_uri = 5; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter
+   * notebook.
+   * 
+ * + * string proxy_uri = 5; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); + + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @return A list containing the serviceAccountScopes. + */ + java.util.List getServiceAccountScopesList(); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @return The count of serviceAccountScopes. + */ + int getServiceAccountScopesCount(); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + java.lang.String getServiceAccountScopes(int index); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31; + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + com.google.protobuf.ByteString getServiceAccountScopesBytes(int index); + + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * + * @return The acceleratorConfig. + */ + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you have
+   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + */ + com.google.events.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.State state = 10; + * + * @return The state. + */ + com.google.events.cloud.notebooks.v1.Instance.State getState(); + + /** + * + * + *
+   * Whether the end user authorizes Google Cloud to install GPU driver
+   * on this instance.
+   * If this field is empty or set to false, the GPU driver won't be installed.
+   * Only applicable to instances with GPUs.
+   * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + boolean getInstallGpuDriver(); + + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + java.lang.String getCustomGpuDriverPath(); + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + com.google.protobuf.ByteString getCustomGpuDriverPathBytes(); + + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + java.util.List getDisksList(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + com.google.events.cloud.notebooks.v1.Instance.Disk getDisks(int index); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + int getDisksCount(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + java.util.List + getDisksOrBuilderList(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Instance.Disk disks = 28; + */ + com.google.events.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index); + + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + * + * @return The shieldedInstanceConfig. + */ + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30; + * + */ + com.google.events.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder(); + + /** + * + * + *
+   * If true, no external IP will be assigned to this instance.
+   * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + boolean getNoPublicIp(); + + /** + * + * + *
+   * If true, the notebook instance will not register with the proxy.
+   * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + boolean getNoProxyAccess(); + + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + java.lang.String getSubnet(); + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + com.google.protobuf.ByteString getSubnetBytes(); + + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + int getMetadataCount(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + /* nullable */ + java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + java.util.List + getUpgradeHistoryList(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + int getUpgradeHistoryCount(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + java.util.List< + ? extends com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryOrBuilderList(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + com.google.events.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder + getUpgradeHistoryOrBuilder(int index); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The enum numeric value on the wire for nicType. + */ + int getNicTypeValue(); + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Instance.NicType nic_type = 33; + * + * @return The nicType. + */ + com.google.events.cloud.notebooks.v1.Instance.NicType getNicType(); + + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return Whether the reservationAffinity field is set. + */ + boolean hasReservationAffinity(); + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + * + * @return The reservationAffinity. + */ + com.google.events.cloud.notebooks.v1.ReservationAffinity getReservationAffinity(); + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34; + */ + com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder + getReservationAffinityOrBuilder(); + + /** + * + * + *
+   * Output only. Email address of entity that sent original CreateInstance
+   * request.
+   * 
+ * + * string creator = 36; + * + * @return The creator. + */ + java.lang.String getCreator(); + /** + * + * + *
+   * Output only. Email address of entity that sent original CreateInstance
+   * request.
+   * 
+ * + * string creator = 36; + * + * @return The bytes for creator. + */ + com.google.protobuf.ByteString getCreatorBytes(); + + /** + * + * + *
+   * Optional. Flag to enable ip forwarding or not, default false/off.
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * 
+ * + * bool can_ip_forward = 39; + * + * @return The canIpForward. + */ + boolean getCanIpForward(); + + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.events.cloud.notebooks.v1.Instance.EnvironmentCase getEnvironmentCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDisk.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDisk.java new file mode 100644 index 00000000..980f945b --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDisk.java @@ -0,0 +1,3648 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * A Local attached disk resource.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDisk} + */ +public final class LocalDisk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.LocalDisk) + LocalDiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocalDisk.newBuilder() to construct. + private LocalDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocalDisk() { + deviceName_ = ""; + guestOsFeatures_ = java.util.Collections.emptyList(); + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + mode_ = ""; + source_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocalDisk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDisk.class, + com.google.events.cloud.notebooks.v1.LocalDisk.Builder.class); + } + + public interface RuntimeGuestOsFeatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * `FEATURE_TYPE_UNSPECIFIED`
+     * * `MULTI_IP_SUBNET`
+     * * `SECURE_BOOT`
+     * * `UEFI_COMPATIBLE`
+     * * `VIRTIO_SCSI_MULTIQUEUE`
+     * * `WINDOWS`
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * `FEATURE_TYPE_UNSPECIFIED`
+     * * `MULTI_IP_SUBNET`
+     * * `SECURE_BOOT`
+     * * `UEFI_COMPATIBLE`
+     * * `VIRTIO_SCSI_MULTIQUEUE`
+     * * `WINDOWS`
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * Read [Enabling guest operating system
+   * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+   * to see a list of available options.
+   * Guest OS features for boot disk.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature} + */ + public static final class RuntimeGuestOsFeature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + RuntimeGuestOsFeatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeGuestOsFeature.newBuilder() to construct. + private RuntimeGuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeGuestOsFeature() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeGuestOsFeature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * `FEATURE_TYPE_UNSPECIFIED`
+     * * `MULTI_IP_SUBNET`
+     * * `SECURE_BOOT`
+     * * `UEFI_COMPATIBLE`
+     * * `VIRTIO_SCSI_MULTIQUEUE`
+     * * `WINDOWS`
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * `FEATURE_TYPE_UNSPECIFIED`
+     * * `MULTI_IP_SUBNET`
+     * * `SECURE_BOOT`
+     * * `UEFI_COMPATIBLE`
+     * * `VIRTIO_SCSI_MULTIQUEUE`
+     * * `WINDOWS`
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other = + (com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) obj; + + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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; + } + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Guest OS features for boot disk.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature build() { + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature buildPartial() { + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result = + new com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other) { + if (other + == com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + .getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * `FEATURE_TYPE_UNSPECIFIED`
+       * * `MULTI_IP_SUBNET`
+       * * `SECURE_BOOT`
+       * * `UEFI_COMPATIBLE`
+       * * `VIRTIO_SCSI_MULTIQUEUE`
+       * * `WINDOWS`
+       * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + private static final com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature(); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeGuestOsFeature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTO_DELETE_FIELD_NUMBER = 1; + private boolean autoDelete_ = false; + /** + * + * + *
+   * Optional. Output only. Specifies whether the disk will be auto-deleted when
+   * the instance is deleted (but not when the disk is detached from the
+   * instance).
+   * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + public static final int BOOT_FIELD_NUMBER = 2; + private boolean boot_ = false; + /** + * + * + *
+   * Optional. Output only. Indicates that this is a boot disk. The virtual
+   * machine will use the first partition of the disk for its root filesystem.
+   * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object deviceName_ = ""; + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GUEST_OS_FEATURES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + guestOsFeatures_; + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeaturesList() { + return guestOsFeatures_; + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + return guestOsFeatures_; + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + @java.lang.Override + public int getGuestOsFeaturesCount() { + return guestOsFeatures_.size(); + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures( + int index) { + return guestOsFeatures_.get(index); + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + return guestOsFeatures_.get(index); + } + + public static final int INDEX_FIELD_NUMBER = 5; + private int index_ = 0; + /** + * + * + *
+   * Output only. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk. If you have many disks attached to an instance, each disk would
+   * have a unique index number.
+   * 
+ * + * int32 index = 5; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int INTERFACE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object interface_ = ""; + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   * * `NVME`
+   * * `SCSI`
+   * 
+ * + * string interface = 7; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   * * `NVME`
+   * * `SCSI`
+   * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached
+   * disks.
+   * 
+ * + * string kind = 8; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached
+   * disks.
+   * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList licenses_; + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int MODE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object mode_ = ""; + /** + * + * + *
+   * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+   * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+   * Valid values:
+   * * `READ_ONLY`
+   * * `READ_WRITE`
+   * 
+ * + * string mode = 10; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+   * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+   * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+   * Valid values:
+   * * `READ_ONLY`
+   * * `READ_WRITE`
+   * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+   * specified, the default is `PERSISTENT`.
+   * Valid values:
+   * * `PERSISTENT`
+   * * `SCRATCH`
+   * 
+ * + * string type = 12; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+   * specified, the default is `PERSISTENT`.
+   * Valid values:
+   * * `PERSISTENT`
+   * * `SCRATCH`
+   * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoDelete_ != false) { + output.writeBool(1, autoDelete_); + } + if (boot_ != false) { + output.writeBool(2, boot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceName_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + output.writeMessage(4, guestOsFeatures_.get(i)); + } + if (index_ != 0) { + output.writeInt32(5, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kind_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoDelete_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, autoDelete_); + } + if (boot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, boot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceName_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, guestOsFeatures_.get(i)); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kind_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.LocalDisk)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.LocalDisk other = + (com.google.events.cloud.notebooks.v1.LocalDisk) obj; + + if (getAutoDelete() != other.getAutoDelete()) return false; + if (getBoot() != other.getBoot()) return false; + if (!getDeviceName().equals(other.getDeviceName())) return false; + if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false; + if (getIndex() != other.getIndex()) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete()); + hash = (37 * hash) + BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot()); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + if (getGuestOsFeaturesCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeaturesList().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.LocalDisk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Local attached disk resource.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDisk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.LocalDisk) + com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDisk.class, + com.google.events.cloud.notebooks.v1.LocalDisk.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.LocalDisk.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoDelete_ = false; + boot_ = false; + deviceName_ = ""; + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + } else { + guestOsFeatures_ = null; + guestOsFeaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + index_ = 0; + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + mode_ = ""; + source_ = ""; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk build() { + com.google.events.cloud.notebooks.v1.LocalDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk buildPartial() { + com.google.events.cloud.notebooks.v1.LocalDisk result = + new com.google.events.cloud.notebooks.v1.LocalDisk(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.events.cloud.notebooks.v1.LocalDisk result) { + if (guestOsFeaturesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.guestOsFeatures_ = guestOsFeatures_; + } else { + result.guestOsFeatures_ = guestOsFeaturesBuilder_.build(); + } + if (((bitField0_ & 0x00000080) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.licenses_ = licenses_; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.LocalDisk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoDelete_ = autoDelete_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boot_ = boot_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceName_ = deviceName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.interface_ = interface_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.LocalDisk) { + return mergeFrom((com.google.events.cloud.notebooks.v1.LocalDisk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.LocalDisk other) { + if (other == com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance()) return this; + if (other.getAutoDelete() != false) { + setAutoDelete(other.getAutoDelete()); + } + if (other.getBoot() != false) { + setBoot(other.getBoot()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (guestOsFeaturesBuilder_ == null) { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeatures_.isEmpty()) { + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.addAll(other.guestOsFeatures_); + } + onChanged(); + } + } else { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeaturesBuilder_.isEmpty()) { + guestOsFeaturesBuilder_.dispose(); + guestOsFeaturesBuilder_ = null; + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000008); + guestOsFeaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGuestOsFeaturesFieldBuilder() + : null; + } else { + guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_); + } + } + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + boot_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature m = + input.readMessage( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + .parser(), + extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + index_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 58: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case 74 + case 82: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean autoDelete_; + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when
+     * the instance is deleted (but not when the disk is detached from the
+     * instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when
+     * the instance is deleted (but not when the disk is detached from the
+     * instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @param value The autoDelete to set. + * @return This builder for chaining. + */ + public Builder setAutoDelete(boolean value) { + + autoDelete_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when
+     * the instance is deleted (but not when the disk is detached from the
+     * instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return This builder for chaining. + */ + public Builder clearAutoDelete() { + bitField0_ = (bitField0_ & ~0x00000001); + autoDelete_ = false; + onChanged(); + return this; + } + + private boolean boot_; + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual
+     * machine will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual
+     * machine will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @param value The boot to set. + * @return This builder for chaining. + */ + public Builder setBoot(boolean value) { + + boot_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual
+     * machine will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoot() { + bitField0_ = (bitField0_ & ~0x00000002); + boot_ = false; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + deviceName_ = getDefaultInstance().getDeviceName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List + guestOsFeatures_ = java.util.Collections.emptyList(); + + private void ensureGuestOsFeaturesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList< + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature>( + guestOsFeatures_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + guestOsFeaturesBuilder_; + + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public java.util.List + getGuestOsFeaturesList() { + if (guestOsFeaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } else { + return guestOsFeaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public int getGuestOsFeaturesCount() { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.size(); + } else { + return guestOsFeaturesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures( + int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder setGuestOsFeatures( + int index, com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder setGuestOsFeatures( + int index, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder addGuestOsFeatures( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder addGuestOsFeatures( + int index, com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder addGuestOsFeatures( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder addGuestOsFeatures( + int index, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder addAllGuestOsFeatures( + java.lang.Iterable< + ? extends com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature> + values) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_); + onChanged(); + } else { + guestOsFeaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder clearGuestOsFeatures() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + guestOsFeaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public Builder removeGuestOsFeatures(int index) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.remove(index); + onChanged(); + } else { + guestOsFeaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + getGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public java.util.List< + ? extends com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + if (guestOsFeaturesBuilder_ != null) { + return guestOsFeaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + addGuestOsFeaturesBuilder() { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + addGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + index, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating
+     * system. Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + public java.util.List< + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder> + getGuestOsFeaturesBuilderList() { + return getGuestOsFeaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesFieldBuilder() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>( + guestOsFeatures_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + guestOsFeatures_ = null; + } + return guestOsFeaturesBuilder_; + } + + private int index_; + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000010); + index_ = 0; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interface_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + interface_ = getDefaultInstance().getInterface(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     * * `NVME`
+     * * `SCSI`
+     * 
+ * + * string interface = 7; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interface_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList licenses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLicensesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + bitField0_ |= 0x00000080; + } + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+     * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+     * Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+     * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+     * Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+     * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+     * Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+     * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+     * Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + mode_ = getDefaultInstance().getMode(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+     * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+     * Valid values:
+     * * `READ_ONLY`
+     * * `READ_WRITE`
+     * 
+ * + * string mode = 10; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+     * specified, the default is `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+     * specified, the default is `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+     * specified, the default is `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+     * specified, the default is `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+     * specified, the default is `PERSISTENT`.
+     * Valid values:
+     * * `PERSISTENT`
+     * * `SCRATCH`
+     * 
+ * + * string type = 12; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.LocalDisk) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.LocalDisk) + private static final com.google.events.cloud.notebooks.v1.LocalDisk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.LocalDisk(); + } + + public static com.google.events.cloud.notebooks.v1.LocalDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParams.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParams.java new file mode 100644 index 00000000..fd22e777 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParams.java @@ -0,0 +1,1487 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Input only. Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new runtime.
+ * This property is mutually exclusive with the source property; you can only
+ * define one or the other, but not both.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDiskInitializeParams} + */ +public final class LocalDiskInitializeParams extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.LocalDiskInitializeParams) + LocalDiskInitializeParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocalDiskInitializeParams.newBuilder() to construct. + private LocalDiskInitializeParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocalDiskInitializeParams() { + description_ = ""; + diskName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocalDiskInitializeParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.class, + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.Builder.class); + } + + /** + * + * + *
+   * Possible disk types.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType} + */ + public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + PD_STANDARD(1), + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + PD_SSD(2), + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + PD_BALANCED(3), + /** + * + * + *
+     * Extreme persistent disk type.
+     * 
+ * + * PD_EXTREME = 4; + */ + PD_EXTREME(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + public static final int PD_STANDARD_VALUE = 1; + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + public static final int PD_SSD_VALUE = 2; + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + public static final int PD_BALANCED_VALUE = 3; + /** + * + * + *
+     * Extreme persistent disk type.
+     * 
+ * + * PD_EXTREME = 4; + */ + public static final int PD_EXTREME_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskType forNumber(int value) { + switch (value) { + case 0: + return DISK_TYPE_UNSPECIFIED; + case 1: + return PD_STANDARD; + case 2: + return PD_SSD; + case 3: + return PD_BALANCED; + case 4: + return PD_EXTREME; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskType findValueByNumber(int number) { + return DiskType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DiskType[] VALUES = values(); + + public static DiskType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType) + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object diskName_ = ""; + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use
+   * the name of the instance. If the disk with the instance name exists already
+   * in the given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2; + * + * @return The diskName. + */ + @java.lang.Override + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use
+   * the name of the instance. If the disk with the instance name exists already
+   * in the given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2; + * + * @return The bytes for diskName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 3; + private long diskSizeGb_ = 0L; + /** + * + * + *
+   * Optional. Specifies the size of the disk in base-2 GB. If not specified,
+   * the disk will be the same size as the image (usually 10GB). If specified,
+   * the size must be equal to or larger than 10GB. Default 100 GB.
+   * 
+ * + * int64 disk_size_gb = 3; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, diskName_); + } + if (diskSizeGb_ != 0L) { + output.writeInt64(3, diskSizeGb_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, diskName_); + } + if (diskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, diskSizeGb_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams other = + (com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getDiskName().equals(other.getDiskName())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiskName().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams 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; + } + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new runtime.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.LocalDiskInitializeParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.LocalDiskInitializeParams) + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.class, + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + diskName_ = ""; + diskSizeGb_ = 0L; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams build() { + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams buildPartial() { + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams result = + new com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.diskName_ = diskName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.diskSizeGb_ = diskSizeGb_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams) { + return mergeFrom((com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams other) { + if (other + == com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDiskName().isEmpty()) { + diskName_ = other.diskName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDiskSizeGb() != 0L) { + setDiskSizeGb(other.getDiskSizeGb()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + diskName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object diskName_ = ""; + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use
+     * the name of the instance. If the disk with the instance name exists already
+     * in the given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2; + * + * @return The diskName. + */ + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use
+     * the name of the instance. If the disk with the instance name exists already
+     * in the given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2; + * + * @return The bytes for diskName. + */ + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use
+     * the name of the instance. If the disk with the instance name exists already
+     * in the given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2; + * + * @param value The diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + diskName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use
+     * the name of the instance. If the disk with the instance name exists already
+     * in the given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDiskName() { + diskName_ = getDefaultInstance().getDiskName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use
+     * the name of the instance. If the disk with the instance name exists already
+     * in the given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2; + * + * @param value The bytes for diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long diskSizeGb_; + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified,
+     * the disk will be the same size as the image (usually 10GB). If specified,
+     * the size must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified,
+     * the disk will be the same size as the image (usually 10GB). If specified,
+     * the size must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(long value) { + + diskSizeGb_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified,
+     * the disk will be the same size as the image (usually 10GB). If specified,
+     * the size must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + bitField0_ = (bitField0_ & ~0x00000004); + diskSizeGb_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.LocalDiskInitializeParams) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.LocalDiskInitializeParams) + private static final com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams(); + } + + public static com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalDiskInitializeParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDiskInitializeParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java new file mode 100644 index 00000000..1940b81c --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface LocalDiskInitializeParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.LocalDiskInitializeParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use
+   * the name of the instance. If the disk with the instance name exists already
+   * in the given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2; + * + * @return The diskName. + */ + java.lang.String getDiskName(); + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use
+   * the name of the instance. If the disk with the instance name exists already
+   * in the given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2; + * + * @return The bytes for diskName. + */ + com.google.protobuf.ByteString getDiskNameBytes(); + + /** + * + * + *
+   * Optional. Specifies the size of the disk in base-2 GB. If not specified,
+   * the disk will be the same size as the image (usually 10GB). If specified,
+   * the size must be equal to or larger than 10GB. Default 100 GB.
+   * 
+ * + * int64 disk_size_gb = 3; + * + * @return The diskSizeGb. + */ + long getDiskSizeGb(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskOrBuilder.java new file mode 100644 index 00000000..ee43b580 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/LocalDiskOrBuilder.java @@ -0,0 +1,394 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface LocalDiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.LocalDisk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Output only. Specifies whether the disk will be auto-deleted when
+   * the instance is deleted (but not when the disk is detached from the
+   * instance).
+   * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + boolean getAutoDelete(); + + /** + * + * + *
+   * Optional. Output only. Indicates that this is a boot disk. The virtual
+   * machine will use the first partition of the disk for its root filesystem.
+   * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + boolean getBoot(); + + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + java.lang.String getDeviceName(); + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * `/dev/disk/by-id/google-*` tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + java.util.List + getGuestOsFeaturesList(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures( + int index); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + int getGuestOsFeaturesCount(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + java.util.List< + ? extends com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating
+   * system. Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4; + * + */ + com.google.events.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index); + + /** + * + * + *
+   * Output only. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk. If you have many disks attached to an instance, each disk would
+   * have a unique index number.
+   * 
+ * + * int32 index = 5; + * + * @return The index. + */ + int getIndex(); + + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   * * `NVME`
+   * * `SCSI`
+   * 
+ * + * string interface = 7; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   * * `NVME`
+   * * `SCSI`
+   * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached
+   * disks.
+   * 
+ * + * string kind = 8; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached
+   * disks.
+   * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + int getLicensesCount(); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+   * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+   * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+   * Valid values:
+   * * `READ_ONLY`
+   * * `READ_WRITE`
+   * 
+ * + * string mode = 10; + * + * @return The mode. + */ + java.lang.String getMode(); + /** + * + * + *
+   * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
+   * If not specified, the default is to attach the disk in `READ_WRITE` mode.
+   * Valid values:
+   * * `READ_ONLY`
+   * * `READ_WRITE`
+   * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+   * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+   * specified, the default is `PERSISTENT`.
+   * Valid values:
+   * * `PERSISTENT`
+   * * `SCRATCH`
+   * 
+ * + * string type = 12; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
+   * specified, the default is `PERSISTENT`.
+   * Valid values:
+   * * `PERSISTENT`
+   * * `SCRATCH`
+   * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinity.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinity.java new file mode 100644 index 00000000..b6d33234 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinity.java @@ -0,0 +1,1262 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Reservation Affinity for consuming Zonal reservation.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ReservationAffinity} + */ +public final class ReservationAffinity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ReservationAffinity) + ReservationAffinityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReservationAffinity.newBuilder() to construct. + private ReservationAffinity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReservationAffinity() { + consumeReservationType_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReservationAffinity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ReservationAffinity.class, + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder.class); + } + + /** + * + * + *
+   * Indicates whether to consume capacity from an reservation or not.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.ReservationAffinity.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + NO_RESERVATION(1), + /** + * + * + *
+     * Consume any reservation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + ANY_RESERVATION(2), + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + SPECIFIC_RESERVATION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + public static final int NO_RESERVATION_VALUE = 1; + /** + * + * + *
+     * Consume any reservation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + public static final int ANY_RESERVATION_VALUE = 2; + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + public static final int SPECIFIC_RESERVATION_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return NO_RESERVATION; + case 2: + return ANY_RESERVATION; + case 3: + return SPECIFIC_RESERVATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.ReservationAffinity.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.ReservationAffinity.Type) + } + + public static final int CONSUME_RESERVATION_TYPE_FIELD_NUMBER = 1; + private int consumeReservationType_ = 0; + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + @java.lang.Override + public int getConsumeReservationTypeValue() { + return consumeReservationType_; + } + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The consumeReservationType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity.Type getConsumeReservationType() { + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type result = + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.forNumber( + consumeReservationType_); + return result == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.UNRECOGNIZED + : result; + } + + public static final int KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList values_; + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (consumeReservationType_ + != com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, consumeReservationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); + } + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, values_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consumeReservationType_ + != com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, consumeReservationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); + } + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.ReservationAffinity)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ReservationAffinity other = + (com.google.events.cloud.notebooks.v1.ReservationAffinity) obj; + + if (consumeReservationType_ != other.consumeReservationType_) return false; + if (!getKey().equals(other.getKey())) return false; + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONSUME_RESERVATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + consumeReservationType_; + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ReservationAffinity 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; + } + /** + * + * + *
+   * Reservation Affinity for consuming Zonal reservation.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ReservationAffinity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ReservationAffinity) + com.google.events.cloud.notebooks.v1.ReservationAffinityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ReservationAffinity.class, + com.google.events.cloud.notebooks.v1.ReservationAffinity.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.ReservationAffinity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consumeReservationType_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity build() { + com.google.events.cloud.notebooks.v1.ReservationAffinity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity buildPartial() { + com.google.events.cloud.notebooks.v1.ReservationAffinity result = + new com.google.events.cloud.notebooks.v1.ReservationAffinity(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.notebooks.v1.ReservationAffinity result) { + if (((bitField0_ & 0x00000004) != 0)) { + values_ = values_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.values_ = values_; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.ReservationAffinity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consumeReservationType_ = consumeReservationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.ReservationAffinity) { + return mergeFrom((com.google.events.cloud.notebooks.v1.ReservationAffinity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.ReservationAffinity other) { + if (other == com.google.events.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()) + return this; + if (other.consumeReservationType_ != 0) { + setConsumeReservationTypeValue(other.getConsumeReservationTypeValue()); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + consumeReservationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int consumeReservationType_ = 0; + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + @java.lang.Override + public int getConsumeReservationTypeValue() { + return consumeReservationType_; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @param value The enum numeric value on the wire for consumeReservationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeReservationTypeValue(int value) { + consumeReservationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The consumeReservationType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity.Type + getConsumeReservationType() { + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type result = + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.forNumber( + consumeReservationType_); + return result == null + ? com.google.events.cloud.notebooks.v1.ReservationAffinity.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @param value The consumeReservationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeReservationType( + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + consumeReservationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearConsumeReservationType() { + bitField0_ = (bitField0_ & ~0x00000001); + consumeReservationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList values_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ReservationAffinity) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ReservationAffinity) + private static final com.google.events.cloud.notebooks.v1.ReservationAffinity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.ReservationAffinity(); + } + + public static com.google.events.cloud.notebooks.v1.ReservationAffinity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReservationAffinity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ReservationAffinity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinityOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinityOrBuilder.java new file mode 100644 index 00000000..ef71c3f1 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ReservationAffinityOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ReservationAffinityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ReservationAffinity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + int getConsumeReservationTypeValue(); + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * .google.events.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1; + * + * + * @return The consumeReservationType. + */ + com.google.events.cloud.notebooks.v1.ReservationAffinity.Type getConsumeReservationType(); + + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Runtime.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Runtime.java new file mode 100644 index 00000000..146c14ca --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Runtime.java @@ -0,0 +1,3571 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a Runtime for a managed notebook instance.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Runtime} + */ +public final class Runtime extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Runtime) + RuntimeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Runtime.newBuilder() to construct. + private Runtime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Runtime() { + name_ = ""; + state_ = 0; + healthState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Runtime(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 23: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Runtime.class, + com.google.events.cloud.notebooks.v1.Runtime.Builder.class); + } + + /** + * + * + *
+   * The definition of the states of this runtime.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Runtime.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The compute layer is starting the runtime. It is not ready for use.
+     * 
+ * + * STARTING = 1; + */ + STARTING(1), + /** + * + * + *
+     * The compute layer is installing required frameworks and registering the
+     * runtime with notebook proxy. It cannot be used.
+     * 
+ * + * PROVISIONING = 2; + */ + PROVISIONING(2), + /** + * + * + *
+     * The runtime is currently running. It is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * The control logic is stopping the runtime. It cannot be used.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The runtime is stopped. It cannot be used.
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * The runtime is being deleted. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + * + * + *
+     * The runtime is upgrading. It cannot be used.
+     * 
+ * + * UPGRADING = 7; + */ + UPGRADING(7), + /** + * + * + *
+     * The runtime is being created and set up. It is not ready for use.
+     * 
+ * + * INITIALIZING = 8; + */ + INITIALIZING(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The compute layer is starting the runtime. It is not ready for use.
+     * 
+ * + * STARTING = 1; + */ + public static final int STARTING_VALUE = 1; + /** + * + * + *
+     * The compute layer is installing required frameworks and registering the
+     * runtime with notebook proxy. It cannot be used.
+     * 
+ * + * PROVISIONING = 2; + */ + public static final int PROVISIONING_VALUE = 2; + /** + * + * + *
+     * The runtime is currently running. It is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + * + * + *
+     * The control logic is stopping the runtime. It cannot be used.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The runtime is stopped. It cannot be used.
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + /** + * + * + *
+     * The runtime is being deleted. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + /** + * + * + *
+     * The runtime is upgrading. It cannot be used.
+     * 
+ * + * UPGRADING = 7; + */ + public static final int UPGRADING_VALUE = 7; + /** + * + * + *
+     * The runtime is being created and set up. It is not ready for use.
+     * 
+ * + * INITIALIZING = 8; + */ + public static final int INITIALIZING_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTING; + case 2: + return PROVISIONING; + case 3: + return ACTIVE; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return DELETING; + case 7: + return UPGRADING; + case 8: + return INITIALIZING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Runtime.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Runtime.State) + } + + /** + * + * + *
+   * The runtime substate.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Runtime.HealthState} + */ + public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The runtime substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + HEALTH_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The runtime is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + * + * + *
+     * The runtime is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + UNHEALTHY(2), + /** + * + * + *
+     * The runtime has not installed health monitoring agent.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_INSTALLED = 3; + */ + AGENT_NOT_INSTALLED(3), + /** + * + * + *
+     * The runtime health monitoring agent is not running.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_RUNNING = 4; + */ + AGENT_NOT_RUNNING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The runtime substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The runtime is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + * + * + *
+     * The runtime is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + public static final int UNHEALTHY_VALUE = 2; + /** + * + * + *
+     * The runtime has not installed health monitoring agent.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_INSTALLED = 3; + */ + public static final int AGENT_NOT_INSTALLED_VALUE = 3; + /** + * + * + *
+     * The runtime health monitoring agent is not running.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_RUNNING = 4; + */ + public static final int AGENT_NOT_RUNNING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_STATE_UNSPECIFIED; + case 1: + return HEALTHY; + case 2: + return UNHEALTHY; + case 3: + return AGENT_NOT_INSTALLED; + case 4: + return AGENT_NOT_RUNNING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthState findValueByNumber(int number) { + return HealthState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Runtime.getDescriptor().getEnumTypes().get(1); + } + + private static final HealthState[] VALUES = values(); + + public static HealthState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Runtime.HealthState) + } + + private int runtimeTypeCase_ = 0; + private java.lang.Object runtimeType_; + + public enum RuntimeTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIRTUAL_MACHINE(2), + RUNTIMETYPE_NOT_SET(0); + private final int value; + + private RuntimeTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeTypeCase valueOf(int value) { + return forNumber(value); + } + + public static RuntimeTypeCase forNumber(int value) { + switch (value) { + case 2: + return VIRTUAL_MACHINE; + case 0: + return RUNTIMETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RuntimeTypeCase getRuntimeTypeCase() { + return RuntimeTypeCase.forNumber(runtimeTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIRTUAL_MACHINE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return runtimeTypeCase_ == 2; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine getVirtualMachine() { + if (runtimeTypeCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder getVirtualMachineOrBuilder() { + if (runtimeTypeCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime.State getState() { + com.google.events.cloud.notebooks.v1.Runtime.State result = + com.google.events.cloud.notebooks.v1.Runtime.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Runtime.State.UNRECOGNIZED + : result; + } + + public static final int HEALTH_STATE_FIELD_NUMBER = 4; + private int healthState_ = 0; + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The healthState. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime.HealthState getHealthState() { + com.google.events.cloud.notebooks.v1.Runtime.HealthState result = + com.google.events.cloud.notebooks.v1.Runtime.HealthState.forNumber(healthState_); + return result == null + ? com.google.events.cloud.notebooks.v1.Runtime.HealthState.UNRECOGNIZED + : result; + } + + public static final int ACCESS_CONFIG_FIELD_NUMBER = 5; + private com.google.events.cloud.notebooks.v1.RuntimeAccessConfig accessConfig_; + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + @java.lang.Override + public boolean hasAccessConfig() { + return accessConfig_ != null; + } + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig() { + return accessConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder + getAccessConfigOrBuilder() { + return accessConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } + + public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 6; + private com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig softwareConfig_; + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + @java.lang.Override + public boolean hasSoftwareConfig() { + return softwareConfig_ != null; + } + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig() { + return softwareConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + return softwareConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + + public static final int METRICS_FIELD_NUMBER = 7; + private com.google.events.cloud.notebooks.v1.RuntimeMetrics metrics_; + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return Whether the metrics field is set. + */ + @java.lang.Override + public boolean hasMetrics() { + return metrics_ != null; + } + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return The metrics. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetrics getMetrics() { + return metrics_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder() { + return metrics_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 20; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 21; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 23; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (runtimeTypeCase_ == 2) { + output.writeMessage(2, (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Runtime.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (healthState_ + != com.google.events.cloud.notebooks.v1.Runtime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, healthState_); + } + if (accessConfig_ != null) { + output.writeMessage(5, getAccessConfig()); + } + if (softwareConfig_ != null) { + output.writeMessage(6, getSoftwareConfig()); + } + if (metrics_ != null) { + output.writeMessage(7, getMetrics()); + } + if (createTime_ != null) { + output.writeMessage(20, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(21, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 23); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (runtimeTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Runtime.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (healthState_ + != com.google.events.cloud.notebooks.v1.Runtime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, healthState_); + } + if (accessConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAccessConfig()); + } + if (softwareConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSoftwareConfig()); + } + if (metrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetrics()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Runtime)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Runtime other = + (com.google.events.cloud.notebooks.v1.Runtime) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (healthState_ != other.healthState_) return false; + if (hasAccessConfig() != other.hasAccessConfig()) return false; + if (hasAccessConfig()) { + if (!getAccessConfig().equals(other.getAccessConfig())) return false; + } + if (hasSoftwareConfig() != other.hasSoftwareConfig()) return false; + if (hasSoftwareConfig()) { + if (!getSoftwareConfig().equals(other.getSoftwareConfig())) return false; + } + if (hasMetrics() != other.hasMetrics()) return false; + if (hasMetrics()) { + if (!getMetrics().equals(other.getMetrics())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getRuntimeTypeCase().equals(other.getRuntimeTypeCase())) return false; + switch (runtimeTypeCase_) { + case 2: + if (!getVirtualMachine().equals(other.getVirtualMachine())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthState_; + if (hasAccessConfig()) { + hash = (37 * hash) + ACCESS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAccessConfig().hashCode(); + } + if (hasSoftwareConfig()) { + hash = (37 * hash) + SOFTWARE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareConfig().hashCode(); + } + if (hasMetrics()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetrics().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (runtimeTypeCase_) { + case 2: + hash = (37 * hash) + VIRTUAL_MACHINE_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachine().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Runtime 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 definition of a Runtime for a managed notebook instance.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Runtime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Runtime) + com.google.events.cloud.notebooks.v1.RuntimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 23: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 23: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Runtime.class, + com.google.events.cloud.notebooks.v1.Runtime.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Runtime.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (virtualMachineBuilder_ != null) { + virtualMachineBuilder_.clear(); + } + state_ = 0; + healthState_ = 0; + accessConfig_ = null; + if (accessConfigBuilder_ != null) { + accessConfigBuilder_.dispose(); + accessConfigBuilder_ = null; + } + softwareConfig_ = null; + if (softwareConfigBuilder_ != null) { + softwareConfigBuilder_.dispose(); + softwareConfigBuilder_ = null; + } + metrics_ = null; + if (metricsBuilder_ != null) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + runtimeTypeCase_ = 0; + runtimeType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Runtime_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime build() { + com.google.events.cloud.notebooks.v1.Runtime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime buildPartial() { + com.google.events.cloud.notebooks.v1.Runtime result = + new com.google.events.cloud.notebooks.v1.Runtime(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Runtime result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.healthState_ = healthState_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.accessConfig_ = + accessConfigBuilder_ == null ? accessConfig_ : accessConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.softwareConfig_ = + softwareConfigBuilder_ == null ? softwareConfig_ : softwareConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.metrics_ = metricsBuilder_ == null ? metrics_ : metricsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + private void buildPartialOneofs(com.google.events.cloud.notebooks.v1.Runtime result) { + result.runtimeTypeCase_ = runtimeTypeCase_; + result.runtimeType_ = this.runtimeType_; + if (runtimeTypeCase_ == 2 && virtualMachineBuilder_ != null) { + result.runtimeType_ = virtualMachineBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Runtime) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Runtime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Runtime other) { + if (other == com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.healthState_ != 0) { + setHealthStateValue(other.getHealthStateValue()); + } + if (other.hasAccessConfig()) { + mergeAccessConfig(other.getAccessConfig()); + } + if (other.hasSoftwareConfig()) { + mergeSoftwareConfig(other.getSoftwareConfig()); + } + if (other.hasMetrics()) { + mergeMetrics(other.getMetrics()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000200; + switch (other.getRuntimeTypeCase()) { + case VIRTUAL_MACHINE: + { + mergeVirtualMachine(other.getVirtualMachine()); + break; + } + case RUNTIMETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getVirtualMachineFieldBuilder().getBuilder(), extensionRegistry); + runtimeTypeCase_ = 2; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + healthState_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage(getAccessConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getSoftwareConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getMetricsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 162: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 162 + case 170: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 170 + case 186: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000200; + break; + } // case 186 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int runtimeTypeCase_ = 0; + private java.lang.Object runtimeType_; + + public RuntimeTypeCase getRuntimeTypeCase() { + return RuntimeTypeCase.forNumber(runtimeTypeCase_); + } + + public Builder clearRuntimeType() { + runtimeTypeCase_ = 0; + runtimeType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachine, + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder> + virtualMachineBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return runtimeTypeCase_ == 2; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine getVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } else { + if (runtimeTypeCase_ == 2) { + return virtualMachineBuilder_.getMessage(); + } + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder setVirtualMachine(com.google.events.cloud.notebooks.v1.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtimeType_ = value; + onChanged(); + } else { + virtualMachineBuilder_.setMessage(value); + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder setVirtualMachine( + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder builderForValue) { + if (virtualMachineBuilder_ == null) { + runtimeType_ = builderForValue.build(); + onChanged(); + } else { + virtualMachineBuilder_.setMessage(builderForValue.build()); + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder mergeVirtualMachine(com.google.events.cloud.notebooks.v1.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2 + && runtimeType_ + != com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance()) { + runtimeType_ = + com.google.events.cloud.notebooks.v1.VirtualMachine.newBuilder( + (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_) + .mergeFrom(value) + .buildPartial(); + } else { + runtimeType_ = value; + } + onChanged(); + } else { + if (runtimeTypeCase_ == 2) { + virtualMachineBuilder_.mergeFrom(value); + } else { + virtualMachineBuilder_.setMessage(value); + } + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder clearVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2) { + runtimeTypeCase_ = 0; + runtimeType_ = null; + onChanged(); + } + } else { + if (runtimeTypeCase_ == 2) { + runtimeTypeCase_ = 0; + runtimeType_ = null; + } + virtualMachineBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public com.google.events.cloud.notebooks.v1.VirtualMachine.Builder getVirtualMachineBuilder() { + return getVirtualMachineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder + getVirtualMachineOrBuilder() { + if ((runtimeTypeCase_ == 2) && (virtualMachineBuilder_ != null)) { + return virtualMachineBuilder_.getMessageOrBuilder(); + } else { + if (runtimeTypeCase_ == 2) { + return (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachine, + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder> + getVirtualMachineFieldBuilder() { + if (virtualMachineBuilder_ == null) { + if (!(runtimeTypeCase_ == 2)) { + runtimeType_ = com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + virtualMachineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachine, + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder>( + (com.google.events.cloud.notebooks.v1.VirtualMachine) runtimeType_, + getParentForChildren(), + isClean()); + runtimeType_ = null; + } + runtimeTypeCase_ = 2; + onChanged(); + return virtualMachineBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime.State getState() { + com.google.events.cloud.notebooks.v1.Runtime.State result = + com.google.events.cloud.notebooks.v1.Runtime.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Runtime.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.events.cloud.notebooks.v1.Runtime.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private int healthState_ = 0; + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @param value The enum numeric value on the wire for healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthStateValue(int value) { + healthState_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The healthState. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime.HealthState getHealthState() { + com.google.events.cloud.notebooks.v1.Runtime.HealthState result = + com.google.events.cloud.notebooks.v1.Runtime.HealthState.forNumber(healthState_); + return result == null + ? com.google.events.cloud.notebooks.v1.Runtime.HealthState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @param value The healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthState(com.google.events.cloud.notebooks.v1.Runtime.HealthState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + healthState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return This builder for chaining. + */ + public Builder clearHealthState() { + bitField0_ = (bitField0_ & ~0x00000008); + healthState_ = 0; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.RuntimeAccessConfig accessConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder> + accessConfigBuilder_; + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + public boolean hasAccessConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig() { + if (accessConfigBuilder_ == null) { + return accessConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } else { + return accessConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder setAccessConfig(com.google.events.cloud.notebooks.v1.RuntimeAccessConfig value) { + if (accessConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessConfig_ = value; + } else { + accessConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder setAccessConfig( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder builderForValue) { + if (accessConfigBuilder_ == null) { + accessConfig_ = builderForValue.build(); + } else { + accessConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder mergeAccessConfig( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig value) { + if (accessConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && accessConfig_ != null + && accessConfig_ + != com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance()) { + getAccessConfigBuilder().mergeFrom(value); + } else { + accessConfig_ = value; + } + } else { + accessConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder clearAccessConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + accessConfig_ = null; + if (accessConfigBuilder_ != null) { + accessConfigBuilder_.dispose(); + accessConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder + getAccessConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAccessConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder + getAccessConfigOrBuilder() { + if (accessConfigBuilder_ != null) { + return accessConfigBuilder_.getMessageOrBuilder(); + } else { + return accessConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder> + getAccessConfigFieldBuilder() { + if (accessConfigBuilder_ == null) { + accessConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder>( + getAccessConfig(), getParentForChildren(), isClean()); + accessConfig_ = null; + } + return accessConfigBuilder_; + } + + private com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig softwareConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder> + softwareConfigBuilder_; + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + public boolean hasSoftwareConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + return softwareConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } else { + return softwareConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder setSoftwareConfig( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softwareConfig_ = value; + } else { + softwareConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder setSoftwareConfig( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder builderForValue) { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = builderForValue.build(); + } else { + softwareConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder mergeSoftwareConfig( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && softwareConfig_ != null + && softwareConfig_ + != com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig + .getDefaultInstance()) { + getSoftwareConfigBuilder().mergeFrom(value); + } else { + softwareConfig_ = value; + } + } else { + softwareConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder clearSoftwareConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + softwareConfig_ = null; + if (softwareConfigBuilder_ != null) { + softwareConfigBuilder_.dispose(); + softwareConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder + getSoftwareConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSoftwareConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + if (softwareConfigBuilder_ != null) { + return softwareConfigBuilder_.getMessageOrBuilder(); + } else { + return softwareConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder> + getSoftwareConfigFieldBuilder() { + if (softwareConfigBuilder_ == null) { + softwareConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder>( + getSoftwareConfig(), getParentForChildren(), isClean()); + softwareConfig_ = null; + } + return softwareConfigBuilder_; + } + + private com.google.events.cloud.notebooks.v1.RuntimeMetrics metrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeMetrics, + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder> + metricsBuilder_; + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return Whether the metrics field is set. + */ + public boolean hasMetrics() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return The metrics. + */ + public com.google.events.cloud.notebooks.v1.RuntimeMetrics getMetrics() { + if (metricsBuilder_ == null) { + return metrics_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } else { + return metricsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public Builder setMetrics(com.google.events.cloud.notebooks.v1.RuntimeMetrics value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + } else { + metricsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public Builder setMetrics( + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder builderForValue) { + if (metricsBuilder_ == null) { + metrics_ = builderForValue.build(); + } else { + metricsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public Builder mergeMetrics(com.google.events.cloud.notebooks.v1.RuntimeMetrics value) { + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && metrics_ != null + && metrics_ + != com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance()) { + getMetricsBuilder().mergeFrom(value); + } else { + metrics_ = value; + } + } else { + metricsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public Builder clearMetrics() { + bitField0_ = (bitField0_ & ~0x00000040); + metrics_ = null; + if (metricsBuilder_ != null) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder getMetricsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + public com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilder(); + } else { + return metrics_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and
+     * JupyterLab stats.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeMetrics, + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeMetrics, + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder>( + getMetrics(), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000200; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this Managed Notebook or Runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 23; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Runtime) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Runtime) + private static final com.google.events.cloud.notebooks.v1.Runtime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Runtime(); + } + + public static com.google.events.cloud.notebooks.v1.Runtime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Runtime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfig.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfig.java new file mode 100644 index 00000000..530b9a80 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfig.java @@ -0,0 +1,1093 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of the types of hardware accelerators that can be used.
+ * Definition of the types of hardware accelerators that can be used.
+ * See [Compute Engine
+ * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
+ * Examples:
+ * * `nvidia-tesla-k80`
+ * * `nvidia-tesla-p100`
+ * * `nvidia-tesla-v100`
+ * * `nvidia-tesla-p4`
+ * * `nvidia-tesla-t4`
+ * * `nvidia-tesla-a100`
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig} + */ +public final class RuntimeAcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) + RuntimeAcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeAcceleratorConfig.newBuilder() to construct. + private RuntimeAcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeAcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeAcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder.class); + } + + /** + * + * + *
+   * Type of this accelerator.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100 - 40GB.
+     * 
+ * + * NVIDIA_TESLA_A100 = 6; + */ + NVIDIA_TESLA_A100(6), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 7; + */ + TPU_V2(7), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 8; + */ + TPU_V3(8), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 9; + */ + NVIDIA_TESLA_T4_VWS(9), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 10; + */ + NVIDIA_TESLA_P100_VWS(10), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 11; + */ + NVIDIA_TESLA_P4_VWS(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100 - 40GB.
+     * 
+ * + * NVIDIA_TESLA_A100 = 6; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 6; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 7; + */ + public static final int TPU_V2_VALUE = 7; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 8; + */ + public static final int TPU_V3_VALUE = 8; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 9; + */ + public static final int NVIDIA_TESLA_T4_VWS_VALUE = 9; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 10; + */ + public static final int NVIDIA_TESLA_P100_VWS_VALUE = 10; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 11; + */ + public static final int NVIDIA_TESLA_P4_VWS_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 6: + return NVIDIA_TESLA_A100; + case 7: + return TPU_V2; + case 8: + return TPU_V3; + case 9: + return NVIDIA_TESLA_T4_VWS; + case 10: + return NVIDIA_TESLA_P100_VWS; + case 11: + return NVIDIA_TESLA_P4_VWS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType() { + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType result = + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.forNumber( + type_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_ = 0L; + /** + * + * + *
+   * Count of cores of this accelerator.
+   * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig other = + (com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig 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; + } + /** + * + * + *
+   * Definition of the types of hardware accelerators that can be used.
+   * Definition of the types of hardware accelerators that can be used.
+   * See [Compute Engine
+   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
+   * Examples:
+   * * `nvidia-tesla-k80`
+   * * `nvidia-tesla-p100`
+   * * `nvidia-tesla-v100`
+   * * `nvidia-tesla-p4`
+   * * `nvidia-tesla-t4`
+   * * `nvidia-tesla-a100`
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + coreCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig build() { + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig result = + new com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.coreCount_ = coreCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig other) { + if (other + == com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + coreCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType() { + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType result = + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.forNumber( + type_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + bitField0_ = (bitField0_ & ~0x00000002); + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) + private static final com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeAcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java new file mode 100644 index 00000000..c9e95f69 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeAcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * + * @return The type. + */ + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType(); + + /** + * + * + *
+   * Count of cores of this accelerator.
+   * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfig.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfig.java new file mode 100644 index 00000000..99da7898 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfig.java @@ -0,0 +1,1163 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Specifies the login configuration for Runtime
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeAccessConfig} + */ +public final class RuntimeAccessConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeAccessConfig) + RuntimeAccessConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeAccessConfig.newBuilder() to construct. + private RuntimeAccessConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeAccessConfig() { + accessType_ = 0; + runtimeOwner_ = ""; + proxyUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeAccessConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder.class); + } + + /** + * + * + *
+   * Possible ways to access runtime. Authentication mode.
+   * Currently supports: Single User only.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType} + */ + public enum RuntimeAccessType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified access.
+     * 
+ * + * RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + */ + RUNTIME_ACCESS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Single user login.
+     * 
+ * + * SINGLE_USER = 1; + */ + SINGLE_USER(1), + /** + * + * + *
+     * Service Account mode.
+     * In Service Account mode, Runtime creator will specify a SA that exists
+     * in the consumer project. Using Runtime Service Account field.
+     * Users accessing the Runtime need ActAs (Service Account User) permission.
+     * 
+ * + * SERVICE_ACCOUNT = 2; + */ + SERVICE_ACCOUNT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified access.
+     * 
+ * + * RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + */ + public static final int RUNTIME_ACCESS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Single user login.
+     * 
+ * + * SINGLE_USER = 1; + */ + public static final int SINGLE_USER_VALUE = 1; + /** + * + * + *
+     * Service Account mode.
+     * In Service Account mode, Runtime creator will specify a SA that exists
+     * in the consumer project. Using Runtime Service Account field.
+     * Users accessing the Runtime need ActAs (Service Account User) permission.
+     * 
+ * + * SERVICE_ACCOUNT = 2; + */ + public static final int SERVICE_ACCOUNT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeAccessType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RuntimeAccessType forNumber(int value) { + switch (value) { + case 0: + return RUNTIME_ACCESS_TYPE_UNSPECIFIED; + case 1: + return SINGLE_USER; + case 2: + return SERVICE_ACCOUNT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RuntimeAccessType findValueByNumber(int number) { + return RuntimeAccessType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RuntimeAccessType[] VALUES = values(); + + public static RuntimeAccessType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RuntimeAccessType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType) + } + + public static final int ACCESS_TYPE_FIELD_NUMBER = 1; + private int accessType_ = 0; + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The accessType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + getAccessType() { + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType result = + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.forNumber( + accessType_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.UNRECOGNIZED + : result; + } + + public static final int RUNTIME_OWNER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object runtimeOwner_ = ""; + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + @java.lang.Override + public java.lang.String getRuntimeOwner() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeOwner_ = s; + return s; + } + } + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeOwnerBytes() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROXY_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object proxyUri_ = ""; + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (accessType_ + != com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + .RUNTIME_ACCESS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, accessType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeOwner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeOwner_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, proxyUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (accessType_ + != com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + .RUNTIME_ACCESS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, accessType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeOwner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeOwner_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, proxyUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeAccessConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig other = + (com.google.events.cloud.notebooks.v1.RuntimeAccessConfig) obj; + + if (accessType_ != other.accessType_) return false; + if (!getRuntimeOwner().equals(other.getRuntimeOwner())) return false; + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCESS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + accessType_; + hash = (37 * hash) + RUNTIME_OWNER_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeOwner().hashCode(); + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig 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; + } + /** + * + * + *
+   * Specifies the login configuration for Runtime
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeAccessConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeAccessConfig) + com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + accessType_ = 0; + runtimeOwner_ = ""; + proxyUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig build() { + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig result = + new com.google.events.cloud.notebooks.v1.RuntimeAccessConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.RuntimeAccessConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.accessType_ = accessType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.runtimeOwner_ = runtimeOwner_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.proxyUri_ = proxyUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeAccessConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.RuntimeAccessConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.RuntimeAccessConfig other) { + if (other == com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance()) + return this; + if (other.accessType_ != 0) { + setAccessTypeValue(other.getAccessTypeValue()); + } + if (!other.getRuntimeOwner().isEmpty()) { + runtimeOwner_ = other.runtimeOwner_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + accessType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + runtimeOwner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + proxyUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int accessType_ = 0; + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @param value The enum numeric value on the wire for accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessTypeValue(int value) { + accessType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The accessType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + getAccessType() { + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType result = + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.forNumber( + accessType_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @param value The accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessType( + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + accessType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearAccessType() { + bitField0_ = (bitField0_ & ~0x00000001); + accessType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object runtimeOwner_ = ""; + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + public java.lang.String getRuntimeOwner() { + java.lang.Object ref = runtimeOwner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeOwner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + public com.google.protobuf.ByteString getRuntimeOwnerBytes() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @param value The runtimeOwner to set. + * @return This builder for chaining. + */ + public Builder setRuntimeOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + runtimeOwner_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeOwner() { + runtimeOwner_ = getDefaultInstance().getRuntimeOwner(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @param value The bytes for runtimeOwner to set. + * @return This builder for chaining. + */ + public Builder setRuntimeOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + runtimeOwner_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + proxyUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + proxyUri_ = getDefaultInstance().getProxyUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + proxyUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeAccessConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeAccessConfig) + private static final com.google.events.cloud.notebooks.v1.RuntimeAccessConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeAccessConfig(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeAccessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java new file mode 100644 index 00000000..e1757258 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeAccessConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeAccessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The enum numeric value on the wire for accessType. + */ + int getAccessTypeValue(); + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The accessType. + */ + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType getAccessType(); + + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + java.lang.String getRuntimeOwner(); + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + com.google.protobuf.ByteString getRuntimeOwnerBytes(); + + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventData.java new file mode 100644 index 00000000..545ff2fa --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventData.java @@ -0,0 +1,725 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The data within all Runtime events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeEventData} + */ +public final class RuntimeEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeEventData) + RuntimeEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeEventData.newBuilder() to construct. + private RuntimeEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeEventData.class, + com.google.events.cloud.notebooks.v1.RuntimeEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.Runtime payload_; + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Runtime getPayload() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeOrBuilder getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeEventData)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeEventData other = + (com.google.events.cloud.notebooks.v1.RuntimeEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.RuntimeEventData 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 data within all Runtime events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeEventData) + com.google.events.cloud.notebooks.v1.RuntimeEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeEventData.class, + com.google.events.cloud.notebooks.v1.RuntimeEventData.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.RuntimeEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeEventData getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeEventData build() { + com.google.events.cloud.notebooks.v1.RuntimeEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeEventData buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeEventData result = + new com.google.events.cloud.notebooks.v1.RuntimeEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.RuntimeEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeEventData) { + return mergeFrom((com.google.events.cloud.notebooks.v1.RuntimeEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.RuntimeEventData other) { + if (other == com.google.events.cloud.notebooks.v1.RuntimeEventData.getDefaultInstance()) + return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.Runtime payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Runtime, + com.google.events.cloud.notebooks.v1.Runtime.Builder, + com.google.events.cloud.notebooks.v1.RuntimeOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.notebooks.v1.Runtime getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public Builder setPayload(com.google.events.cloud.notebooks.v1.Runtime value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.notebooks.v1.Runtime.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public Builder mergePayload(com.google.events.cloud.notebooks.v1.Runtime value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ != com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public com.google.events.cloud.notebooks.v1.Runtime.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + public com.google.events.cloud.notebooks.v1.RuntimeOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Runtime.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The Runtime event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Runtime, + com.google.events.cloud.notebooks.v1.Runtime.Builder, + com.google.events.cloud.notebooks.v1.RuntimeOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Runtime, + com.google.events.cloud.notebooks.v1.Runtime.Builder, + com.google.events.cloud.notebooks.v1.RuntimeOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeEventData) + private static final com.google.events.cloud.notebooks.v1.RuntimeEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeEventData(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataOrBuilder.java new file mode 100644 index 00000000..8dd74c28 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.notebooks.v1.Runtime getPayload(); + /** + * + * + *
+   * Optional. The Runtime event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Runtime payload = 1; + */ + com.google.events.cloud.notebooks.v1.RuntimeOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetrics.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetrics.java new file mode 100644 index 00000000..5f8eb3a3 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetrics.java @@ -0,0 +1,783 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Contains runtime daemon metrics, such as OS and kernels and sessions stats.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeMetrics} + */ +public final class RuntimeMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeMetrics) + RuntimeMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeMetrics.newBuilder() to construct. + private RuntimeMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeMetrics() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeMetrics.class, + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder.class); + } + + public static final int SYSTEM_METRICS_FIELD_NUMBER = 1; + + private static final class SystemMetricsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField systemMetrics_; + + private com.google.protobuf.MapField + internalGetSystemMetrics() { + if (systemMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SystemMetricsDefaultEntryHolder.defaultEntry); + } + return systemMetrics_; + } + + public int getSystemMetricsCount() { + return internalGetSystemMetrics().getMap().size(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public boolean containsSystemMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSystemMetrics().getMap().containsKey(key); + } + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSystemMetrics() { + return getSystemMetricsMap(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public java.util.Map getSystemMetricsMap() { + return internalGetSystemMetrics().getMap(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getSystemMetricsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetSystemMetrics(), SystemMetricsDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetSystemMetrics().getMap().entrySet()) { + com.google.protobuf.MapEntry systemMetrics__ = + SystemMetricsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, systemMetrics__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeMetrics)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeMetrics other = + (com.google.events.cloud.notebooks.v1.RuntimeMetrics) obj; + + if (!internalGetSystemMetrics().equals(other.internalGetSystemMetrics())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSystemMetrics().getMap().isEmpty()) { + hash = (37 * hash) + SYSTEM_METRICS_FIELD_NUMBER; + hash = (53 * hash) + internalGetSystemMetrics().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.RuntimeMetrics 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; + } + /** + * + * + *
+   * Contains runtime daemon metrics, such as OS and kernels and sessions stats.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeMetrics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeMetrics) + com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeMetrics.class, + com.google.events.cloud.notebooks.v1.RuntimeMetrics.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.RuntimeMetrics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSystemMetrics().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetrics getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetrics build() { + com.google.events.cloud.notebooks.v1.RuntimeMetrics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetrics buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeMetrics result = + new com.google.events.cloud.notebooks.v1.RuntimeMetrics(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.RuntimeMetrics result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.systemMetrics_ = internalGetSystemMetrics(); + result.systemMetrics_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeMetrics) { + return mergeFrom((com.google.events.cloud.notebooks.v1.RuntimeMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.RuntimeMetrics other) { + if (other == com.google.events.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance()) + return this; + internalGetMutableSystemMetrics().mergeFrom(other.internalGetSystemMetrics()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry systemMetrics__ = + input.readMessage( + SystemMetricsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableSystemMetrics() + .getMutableMap() + .put(systemMetrics__.getKey(), systemMetrics__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField systemMetrics_; + + private com.google.protobuf.MapField + internalGetSystemMetrics() { + if (systemMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SystemMetricsDefaultEntryHolder.defaultEntry); + } + return systemMetrics_; + } + + private com.google.protobuf.MapField + internalGetMutableSystemMetrics() { + if (systemMetrics_ == null) { + systemMetrics_ = + com.google.protobuf.MapField.newMapField(SystemMetricsDefaultEntryHolder.defaultEntry); + } + if (!systemMetrics_.isMutable()) { + systemMetrics_ = systemMetrics_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return systemMetrics_; + } + + public int getSystemMetricsCount() { + return internalGetSystemMetrics().getMap().size(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public boolean containsSystemMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSystemMetrics().getMap().containsKey(key); + } + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSystemMetrics() { + return getSystemMetricsMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public java.util.Map getSystemMetricsMap() { + return internalGetSystemMetrics().getMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getSystemMetricsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSystemMetrics() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSystemMetrics().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + public Builder removeSystemMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableSystemMetrics().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableSystemMetrics() { + bitField0_ |= 0x00000001; + return internalGetMutableSystemMetrics().getMutableMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + public Builder putSystemMetrics(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableSystemMetrics().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * map<string, string> system_metrics = 1; + */ + public Builder putAllSystemMetrics(java.util.Map values) { + internalGetMutableSystemMetrics().getMutableMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeMetrics) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeMetrics) + private static final com.google.events.cloud.notebooks.v1.RuntimeMetrics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeMetrics(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeMetrics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeMetrics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java new file mode 100644 index 00000000..2c2a0a94 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + int getSystemMetricsCount(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + boolean containsSystemMetrics(java.lang.String key); + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getSystemMetrics(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + java.util.Map getSystemMetricsMap(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + /* nullable */ + java.lang.String getSystemMetricsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * map<string, string> system_metrics = 1; + */ + java.lang.String getSystemMetricsOrThrow(java.lang.String key); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeOrBuilder.java new file mode 100644 index 00000000..34d12520 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeOrBuilder.java @@ -0,0 +1,407 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Runtime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + boolean hasVirtualMachine(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + com.google.events.cloud.notebooks.v1.VirtualMachine getVirtualMachine(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder getVirtualMachineOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.State state = 3; + * + * @return The state. + */ + com.google.events.cloud.notebooks.v1.Runtime.State getState(); + + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The enum numeric value on the wire for healthState. + */ + int getHealthStateValue(); + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * .google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4; + * + * @return The healthState. + */ + com.google.events.cloud.notebooks.v1.Runtime.HealthState getHealthState(); + + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + boolean hasAccessConfig(); + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + com.google.events.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig(); + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder getAccessConfigOrBuilder(); + + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + boolean hasSoftwareConfig(); + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig(); + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder getSoftwareConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return Whether the metrics field is set. + */ + boolean hasMetrics(); + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + * + * @return The metrics. + */ + com.google.events.cloud.notebooks.v1.RuntimeMetrics getMetrics(); + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and
+   * JupyterLab stats.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7; + */ + com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels to associate with this Managed Notebook or Runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 23; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + public com.google.events.cloud.notebooks.v1.Runtime.RuntimeTypeCase getRuntimeTypeCase(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java new file mode 100644 index 00000000..d59ad8c1 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java @@ -0,0 +1,771 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * A set of Shielded Instance options.
+ * See [Images using supported Shielded VM
+ * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+ * Not all combinations are valid.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig} + */ +public final class RuntimeShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + RuntimeShieldedInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeShieldedInstanceConfig.newBuilder() to construct. + private RuntimeShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeShieldedInstanceConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeShieldedInstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_ = false; + /** + * + * + *
+   * Defines whether the instance has Secure Boot enabled.
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails. Disabled by default.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + public static final int ENABLE_VTPM_FIELD_NUMBER = 2; + private boolean enableVtpm_ = false; + /** + * + * + *
+   * Defines whether the instance has the vTPM enabled. Enabled by default.
+   * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + + public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3; + private boolean enableIntegrityMonitoring_ = false; + /** + * + * + *
+   * Defines whether the instance has integrity monitoring enabled.
+   * Enables monitoring and attestation of the boot integrity of the instance.
+   * The attestation is performed against the integrity policy baseline. This
+   * baseline is initially derived from the implicitly trusted boot image when
+   * the instance is created. Enabled by default.
+   * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + output.writeBool(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + output.writeBool(3, enableIntegrityMonitoring_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig other = + (com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (getEnableVtpm() != other.getEnableVtpm()) return false; + if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); + hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * See [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * Not all combinations are valid.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableSecureBoot_ = false; + enableVtpm_ = false; + enableIntegrityMonitoring_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig build() { + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig result = + new com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableSecureBoot_ = enableSecureBoot_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableVtpm_ = enableVtpm_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig other) { + if (other + == com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + .getDefaultInstance()) return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + if (other.getEnableVtpm() != false) { + setEnableVtpm(other.getEnableVtpm()); + } + if (other.getEnableIntegrityMonitoring() != false) { + setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableVtpm_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + enableIntegrityMonitoring_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableSecureBoot_; + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + bitField0_ = (bitField0_ & ~0x00000001); + enableSecureBoot_ = false; + onChanged(); + return this; + } + + private boolean enableVtpm_; + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @param value The enableVtpm to set. + * @return This builder for chaining. + */ + public Builder setEnableVtpm(boolean value) { + + enableVtpm_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVtpm() { + bitField0_ = (bitField0_ & ~0x00000002); + enableVtpm_ = false; + onChanged(); + return this; + } + + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @param value The enableIntegrityMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableIntegrityMonitoring(boolean value) { + + enableIntegrityMonitoring_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableIntegrityMonitoring() { + bitField0_ = (bitField0_ & ~0x00000004); + enableIntegrityMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + private static final com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java new file mode 100644 index 00000000..c8df1e4d --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeShieldedInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines whether the instance has Secure Boot enabled.
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails. Disabled by default.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); + + /** + * + * + *
+   * Defines whether the instance has the vTPM enabled. Enabled by default.
+   * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + boolean getEnableVtpm(); + + /** + * + * + *
+   * Defines whether the instance has integrity monitoring enabled.
+   * Enables monitoring and attestation of the boot integrity of the instance.
+   * The attestation is performed against the integrity policy baseline. This
+   * baseline is initially derived from the implicitly trusted boot image when
+   * the instance is created. Enabled by default.
+   * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + boolean getEnableIntegrityMonitoring(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfig.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfig.java new file mode 100644 index 00000000..824078f5 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfig.java @@ -0,0 +1,2995 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Specifies the selection and configuration of software inside the runtime.
+ * The properties to set on runtime.
+ * Properties keys are specified in `key:value` format, for example:
+ * * `idle_shutdown: true`
+ * * `idle_shutdown_timeout: 180`
+ * * `enable_health_monitoring: true`
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeSoftwareConfig} + */ +public final class RuntimeSoftwareConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) + RuntimeSoftwareConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeSoftwareConfig.newBuilder() to construct. + private RuntimeSoftwareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeSoftwareConfig() { + notebookUpgradeSchedule_ = ""; + customGpuDriverPath_ = ""; + postStartupScript_ = ""; + kernels_ = java.util.Collections.emptyList(); + postStartupScriptBehavior_ = 0; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeSoftwareConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder.class); + } + + /** + * + * + *
+   * Behavior for the post startup script.
+   * 
+ * + * Protobuf enum {@code + * google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior} + */ + public enum PostStartupScriptBehavior implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified post startup script behavior. Will run only once at creation.
+     * 
+ * + * POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; + */ + POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED(0), + /** + * + * + *
+     * Runs the post startup script provided during creation at every start.
+     * 
+ * + * RUN_EVERY_START = 1; + */ + RUN_EVERY_START(1), + /** + * + * + *
+     * Downloads and runs the provided post startup script at every start.
+     * 
+ * + * DOWNLOAD_AND_RUN_EVERY_START = 2; + */ + DOWNLOAD_AND_RUN_EVERY_START(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified post startup script behavior. Will run only once at creation.
+     * 
+ * + * POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; + */ + public static final int POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Runs the post startup script provided during creation at every start.
+     * 
+ * + * RUN_EVERY_START = 1; + */ + public static final int RUN_EVERY_START_VALUE = 1; + /** + * + * + *
+     * Downloads and runs the provided post startup script at every start.
+     * 
+ * + * DOWNLOAD_AND_RUN_EVERY_START = 2; + */ + public static final int DOWNLOAD_AND_RUN_EVERY_START_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PostStartupScriptBehavior valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PostStartupScriptBehavior forNumber(int value) { + switch (value) { + case 0: + return POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED; + case 1: + return RUN_EVERY_START; + case 2: + return DOWNLOAD_AND_RUN_EVERY_START; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PostStartupScriptBehavior findValueByNumber(int number) { + return PostStartupScriptBehavior.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PostStartupScriptBehavior[] VALUES = values(); + + public static PostStartupScriptBehavior valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PostStartupScriptBehavior(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior) + } + + private int bitField0_; + public static final int NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookUpgradeSchedule_ = ""; + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + @java.lang.Override + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } + } + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_HEALTH_MONITORING_FIELD_NUMBER = 2; + private boolean enableHealthMonitoring_ = false; + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + @java.lang.Override + public boolean hasEnableHealthMonitoring() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + + public static final int IDLE_SHUTDOWN_FIELD_NUMBER = 3; + private boolean idleShutdown_ = false; + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * optional bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + @java.lang.Override + public boolean hasIdleShutdown() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * optional bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + @java.lang.Override + public boolean getIdleShutdown() { + return idleShutdown_; + } + + public static final int IDLE_SHUTDOWN_TIMEOUT_FIELD_NUMBER = 4; + private int idleShutdownTimeout_ = 0; + /** + * + * + *
+   * Time in minutes to wait before shutting down runtime. Default: 180 minutes
+   * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + @java.lang.Override + public int getIdleShutdownTimeout() { + return idleShutdownTimeout_; + } + + public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 5; + private boolean installGpuDriver_ = false; + /** + * + * + *
+   * Install Nvidia Driver automatically.
+   * Default: True
+   * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + + public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + @java.lang.Override + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } + } + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KERNELS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List kernels_; + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + @java.lang.Override + public java.util.List getKernelsList() { + return kernels_; + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + @java.lang.Override + public java.util.List + getKernelsOrBuilderList() { + return kernels_; + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + @java.lang.Override + public int getKernelsCount() { + return kernels_.size(); + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getKernels(int index) { + return kernels_.get(index); + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getKernelsOrBuilder( + int index) { + return kernels_.get(index); + } + + public static final int UPGRADEABLE_FIELD_NUMBER = 9; + private boolean upgradeable_ = false; + /** + * + * + *
+   * Output only. Bool indicating whether an newer image is available in an
+   * image family.
+   * 
+ * + * optional bool upgradeable = 9; + * + * @return Whether the upgradeable field is set. + */ + @java.lang.Override + public boolean hasUpgradeable() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Bool indicating whether an newer image is available in an
+   * image family.
+   * 
+ * + * optional bool upgradeable = 9; + * + * @return The upgradeable. + */ + @java.lang.Override + public boolean getUpgradeable() { + return upgradeable_; + } + + public static final int POST_STARTUP_SCRIPT_BEHAVIOR_FIELD_NUMBER = 10; + private int postStartupScriptBehavior_ = 0; + /** + * + * + *
+   * Behavior for the post startup script.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The enum numeric value on the wire for postStartupScriptBehavior. + */ + @java.lang.Override + public int getPostStartupScriptBehaviorValue() { + return postStartupScriptBehavior_; + } + /** + * + * + *
+   * Behavior for the post startup script.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The postStartupScriptBehavior. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + getPostStartupScriptBehavior() { + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior result = + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .forNumber(postStartupScriptBehavior_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .UNRECOGNIZED + : result; + } + + public static final int DISABLE_TERMINAL_FIELD_NUMBER = 11; + private boolean disableTerminal_ = false; + /** + * + * + *
+   * Bool indicating whether JupyterLab terminal will be available or not.
+   * Default: False
+   * 
+ * + * optional bool disable_terminal = 11; + * + * @return Whether the disableTerminal field is set. + */ + @java.lang.Override + public boolean hasDisableTerminal() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Bool indicating whether JupyterLab terminal will be available or not.
+   * Default: False
+   * 
+ * + * optional bool disable_terminal = 11; + * + * @return The disableTerminal. + */ + @java.lang.Override + public boolean getDisableTerminal() { + return disableTerminal_; + } + + public static final int VERSION_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIXER_DISABLED_FIELD_NUMBER = 13; + private boolean mixerDisabled_ = false; + /** + * + * + *
+   * Bool indicating whether mixer client should be disabled.
+   * Default: False
+   * 
+ * + * optional bool mixer_disabled = 13; + * + * @return Whether the mixerDisabled field is set. + */ + @java.lang.Override + public boolean hasMixerDisabled() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Bool indicating whether mixer client should be disabled.
+   * Default: False
+   * 
+ * + * optional bool mixer_disabled = 13; + * + * @return The mixerDisabled. + */ + @java.lang.Override + public boolean getMixerDisabled() { + return mixerDisabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookUpgradeSchedule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookUpgradeSchedule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(2, enableHealthMonitoring_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(3, idleShutdown_); + } + if (idleShutdownTimeout_ != 0) { + output.writeInt32(4, idleShutdownTimeout_); + } + if (installGpuDriver_ != false) { + output.writeBool(5, installGpuDriver_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, customGpuDriverPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, postStartupScript_); + } + for (int i = 0; i < kernels_.size(); i++) { + output.writeMessage(8, kernels_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(9, upgradeable_); + } + if (postStartupScriptBehavior_ + != com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, postStartupScriptBehavior_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(11, disableTerminal_); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, version_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBool(13, mixerDisabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookUpgradeSchedule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookUpgradeSchedule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableHealthMonitoring_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, idleShutdown_); + } + if (idleShutdownTimeout_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, idleShutdownTimeout_); + } + if (installGpuDriver_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, installGpuDriver_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, customGpuDriverPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, postStartupScript_); + } + for (int i = 0; i < kernels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, kernels_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, upgradeable_); + } + if (postStartupScriptBehavior_ + != com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, postStartupScriptBehavior_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, disableTerminal_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, version_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, mixerDisabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig other = + (com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) obj; + + if (!getNotebookUpgradeSchedule().equals(other.getNotebookUpgradeSchedule())) return false; + if (hasEnableHealthMonitoring() != other.hasEnableHealthMonitoring()) return false; + if (hasEnableHealthMonitoring()) { + if (getEnableHealthMonitoring() != other.getEnableHealthMonitoring()) return false; + } + if (hasIdleShutdown() != other.hasIdleShutdown()) return false; + if (hasIdleShutdown()) { + if (getIdleShutdown() != other.getIdleShutdown()) return false; + } + if (getIdleShutdownTimeout() != other.getIdleShutdownTimeout()) return false; + if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false; + if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (!getKernelsList().equals(other.getKernelsList())) return false; + if (hasUpgradeable() != other.hasUpgradeable()) return false; + if (hasUpgradeable()) { + if (getUpgradeable() != other.getUpgradeable()) return false; + } + if (postStartupScriptBehavior_ != other.postStartupScriptBehavior_) return false; + if (hasDisableTerminal() != other.hasDisableTerminal()) return false; + if (hasDisableTerminal()) { + if (getDisableTerminal() != other.getDisableTerminal()) return false; + } + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion().equals(other.getVersion())) return false; + } + if (hasMixerDisabled() != other.hasMixerDisabled()) return false; + if (hasMixerDisabled()) { + if (getMixerDisabled() != other.getMixerDisabled()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookUpgradeSchedule().hashCode(); + if (hasEnableHealthMonitoring()) { + hash = (37 * hash) + ENABLE_HEALTH_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHealthMonitoring()); + } + if (hasIdleShutdown()) { + hash = (37 * hash) + IDLE_SHUTDOWN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdleShutdown()); + } + hash = (37 * hash) + IDLE_SHUTDOWN_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getIdleShutdownTimeout(); + hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver()); + hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCustomGpuDriverPath().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + if (getKernelsCount() > 0) { + hash = (37 * hash) + KERNELS_FIELD_NUMBER; + hash = (53 * hash) + getKernelsList().hashCode(); + } + if (hasUpgradeable()) { + hash = (37 * hash) + UPGRADEABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpgradeable()); + } + hash = (37 * hash) + POST_STARTUP_SCRIPT_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + postStartupScriptBehavior_; + if (hasDisableTerminal()) { + hash = (37 * hash) + DISABLE_TERMINAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTerminal()); + } + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + if (hasMixerDisabled()) { + hash = (37 * hash) + MIXER_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMixerDisabled()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig 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; + } + /** + * + * + *
+   * Specifies the selection and configuration of software inside the runtime.
+   * The properties to set on runtime.
+   * Properties keys are specified in `key:value` format, for example:
+   * * `idle_shutdown: true`
+   * * `idle_shutdown_timeout: 180`
+   * * `enable_health_monitoring: true`
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.RuntimeSoftwareConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.class, + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + notebookUpgradeSchedule_ = ""; + enableHealthMonitoring_ = false; + idleShutdown_ = false; + idleShutdownTimeout_ = 0; + installGpuDriver_ = false; + customGpuDriverPath_ = ""; + postStartupScript_ = ""; + if (kernelsBuilder_ == null) { + kernels_ = java.util.Collections.emptyList(); + } else { + kernels_ = null; + kernelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + upgradeable_ = false; + postStartupScriptBehavior_ = 0; + disableTerminal_ = false; + version_ = ""; + mixerDisabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig build() { + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig buildPartial() { + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig result = + new com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig result) { + if (kernelsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + kernels_ = java.util.Collections.unmodifiableList(kernels_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.kernels_ = kernels_; + } else { + result.kernels_ = kernelsBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.notebookUpgradeSchedule_ = notebookUpgradeSchedule_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableHealthMonitoring_ = enableHealthMonitoring_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.idleShutdown_ = idleShutdown_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.idleShutdownTimeout_ = idleShutdownTimeout_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.installGpuDriver_ = installGpuDriver_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.customGpuDriverPath_ = customGpuDriverPath_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.postStartupScript_ = postStartupScript_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.upgradeable_ = upgradeable_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.postStartupScriptBehavior_ = postStartupScriptBehavior_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.disableTerminal_ = disableTerminal_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.version_ = version_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.mixerDisabled_ = mixerDisabled_; + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig other) { + if (other == com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance()) + return this; + if (!other.getNotebookUpgradeSchedule().isEmpty()) { + notebookUpgradeSchedule_ = other.notebookUpgradeSchedule_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasEnableHealthMonitoring()) { + setEnableHealthMonitoring(other.getEnableHealthMonitoring()); + } + if (other.hasIdleShutdown()) { + setIdleShutdown(other.getIdleShutdown()); + } + if (other.getIdleShutdownTimeout() != 0) { + setIdleShutdownTimeout(other.getIdleShutdownTimeout()); + } + if (other.getInstallGpuDriver() != false) { + setInstallGpuDriver(other.getInstallGpuDriver()); + } + if (!other.getCustomGpuDriverPath().isEmpty()) { + customGpuDriverPath_ = other.customGpuDriverPath_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (kernelsBuilder_ == null) { + if (!other.kernels_.isEmpty()) { + if (kernels_.isEmpty()) { + kernels_ = other.kernels_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureKernelsIsMutable(); + kernels_.addAll(other.kernels_); + } + onChanged(); + } + } else { + if (!other.kernels_.isEmpty()) { + if (kernelsBuilder_.isEmpty()) { + kernelsBuilder_.dispose(); + kernelsBuilder_ = null; + kernels_ = other.kernels_; + bitField0_ = (bitField0_ & ~0x00000080); + kernelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getKernelsFieldBuilder() + : null; + } else { + kernelsBuilder_.addAllMessages(other.kernels_); + } + } + } + if (other.hasUpgradeable()) { + setUpgradeable(other.getUpgradeable()); + } + if (other.postStartupScriptBehavior_ != 0) { + setPostStartupScriptBehaviorValue(other.getPostStartupScriptBehaviorValue()); + } + if (other.hasDisableTerminal()) { + setDisableTerminal(other.getDisableTerminal()); + } + if (other.hasVersion()) { + version_ = other.version_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasMixerDisabled()) { + setMixerDisabled(other.getMixerDisabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + notebookUpgradeSchedule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + enableHealthMonitoring_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + idleShutdown_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + idleShutdownTimeout_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + installGpuDriver_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + customGpuDriverPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + postStartupScript_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.events.cloud.notebooks.v1.ContainerImage m = + input.readMessage( + com.google.events.cloud.notebooks.v1.ContainerImage.parser(), + extensionRegistry); + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + kernels_.add(m); + } else { + kernelsBuilder_.addMessage(m); + } + break; + } // case 66 + case 72: + { + upgradeable_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + postStartupScriptBehavior_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + disableTerminal_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: + { + mixerDisabled_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object notebookUpgradeSchedule_ = ""; + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeSchedule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookUpgradeSchedule_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return This builder for chaining. + */ + public Builder clearNotebookUpgradeSchedule() { + notebookUpgradeSchedule_ = getDefaultInstance().getNotebookUpgradeSchedule(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The bytes for notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeScheduleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookUpgradeSchedule_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean enableHealthMonitoring_; + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + @java.lang.Override + public boolean hasEnableHealthMonitoring() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @param value The enableHealthMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableHealthMonitoring(boolean value) { + + enableHealthMonitoring_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableHealthMonitoring() { + bitField0_ = (bitField0_ & ~0x00000002); + enableHealthMonitoring_ = false; + onChanged(); + return this; + } + + private boolean idleShutdown_; + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * optional bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + @java.lang.Override + public boolean hasIdleShutdown() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * optional bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + @java.lang.Override + public boolean getIdleShutdown() { + return idleShutdown_; + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * optional bool idle_shutdown = 3; + * + * @param value The idleShutdown to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdown(boolean value) { + + idleShutdown_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * optional bool idle_shutdown = 3; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdown() { + bitField0_ = (bitField0_ & ~0x00000004); + idleShutdown_ = false; + onChanged(); + return this; + } + + private int idleShutdownTimeout_; + /** + * + * + *
+     * Time in minutes to wait before shutting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + @java.lang.Override + public int getIdleShutdownTimeout() { + return idleShutdownTimeout_; + } + /** + * + * + *
+     * Time in minutes to wait before shutting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @param value The idleShutdownTimeout to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdownTimeout(int value) { + + idleShutdownTimeout_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Time in minutes to wait before shutting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdownTimeout() { + bitField0_ = (bitField0_ & ~0x00000008); + idleShutdownTimeout_ = 0; + onChanged(); + return this; + } + + private boolean installGpuDriver_; + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * Default: True
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * Default: True
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @param value The installGpuDriver to set. + * @return This builder for chaining. + */ + public Builder setInstallGpuDriver(boolean value) { + + installGpuDriver_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * Default: True
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @return This builder for chaining. + */ + public Builder clearInstallGpuDriver() { + bitField0_ = (bitField0_ & ~0x00000010); + installGpuDriver_ = false; + onChanged(); + return this; + } + + private java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @param value The customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customGpuDriverPath_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return This builder for chaining. + */ + public Builder clearCustomGpuDriverPath() { + customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @param value The bytes for customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customGpuDriverPath_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 7; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + postStartupScript_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 7; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (`gs://path-to-file/file-name`).
+     * 
+ * + * string post_startup_script = 7; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + postStartupScript_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List kernels_ = + java.util.Collections.emptyList(); + + private void ensureKernelsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + kernels_ = + new java.util.ArrayList(kernels_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + kernelsBuilder_; + + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public java.util.List getKernelsList() { + if (kernelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(kernels_); + } else { + return kernelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public int getKernelsCount() { + if (kernelsBuilder_ == null) { + return kernels_.size(); + } else { + return kernelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage getKernels(int index) { + if (kernelsBuilder_ == null) { + return kernels_.get(index); + } else { + return kernelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder setKernels( + int index, com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (kernelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelsIsMutable(); + kernels_.set(index, value); + onChanged(); + } else { + kernelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder setKernels( + int index, com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + kernels_.set(index, builderForValue.build()); + onChanged(); + } else { + kernelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder addKernels(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (kernelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelsIsMutable(); + kernels_.add(value); + onChanged(); + } else { + kernelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder addKernels( + int index, com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (kernelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelsIsMutable(); + kernels_.add(index, value); + onChanged(); + } else { + kernelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder addKernels( + com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + kernels_.add(builderForValue.build()); + onChanged(); + } else { + kernelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder addKernels( + int index, com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + kernels_.add(index, builderForValue.build()); + onChanged(); + } else { + kernelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder addAllKernels( + java.lang.Iterable values) { + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kernels_); + onChanged(); + } else { + kernelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder clearKernels() { + if (kernelsBuilder_ == null) { + kernels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + kernelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public Builder removeKernels(int index) { + if (kernelsBuilder_ == null) { + ensureKernelsIsMutable(); + kernels_.remove(index); + onChanged(); + } else { + kernelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder getKernelsBuilder( + int index) { + return getKernelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getKernelsOrBuilder( + int index) { + if (kernelsBuilder_ == null) { + return kernels_.get(index); + } else { + return kernelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public java.util.List + getKernelsOrBuilderList() { + if (kernelsBuilder_ != null) { + return kernelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kernels_); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder addKernelsBuilder() { + return getKernelsFieldBuilder() + .addBuilder(com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder addKernelsBuilder( + int index) { + return getKernelsFieldBuilder() + .addBuilder( + index, com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + public java.util.List + getKernelsBuilderList() { + return getKernelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + getKernelsFieldBuilder() { + if (kernelsBuilder_ == null) { + kernelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder>( + kernels_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + kernels_ = null; + } + return kernelsBuilder_; + } + + private boolean upgradeable_; + /** + * + * + *
+     * Output only. Bool indicating whether an newer image is available in an
+     * image family.
+     * 
+ * + * optional bool upgradeable = 9; + * + * @return Whether the upgradeable field is set. + */ + @java.lang.Override + public boolean hasUpgradeable() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Bool indicating whether an newer image is available in an
+     * image family.
+     * 
+ * + * optional bool upgradeable = 9; + * + * @return The upgradeable. + */ + @java.lang.Override + public boolean getUpgradeable() { + return upgradeable_; + } + /** + * + * + *
+     * Output only. Bool indicating whether an newer image is available in an
+     * image family.
+     * 
+ * + * optional bool upgradeable = 9; + * + * @param value The upgradeable to set. + * @return This builder for chaining. + */ + public Builder setUpgradeable(boolean value) { + + upgradeable_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Bool indicating whether an newer image is available in an
+     * image family.
+     * 
+ * + * optional bool upgradeable = 9; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeable() { + bitField0_ = (bitField0_ & ~0x00000100); + upgradeable_ = false; + onChanged(); + return this; + } + + private int postStartupScriptBehavior_ = 0; + /** + * + * + *
+     * Behavior for the post startup script.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The enum numeric value on the wire for postStartupScriptBehavior. + */ + @java.lang.Override + public int getPostStartupScriptBehaviorValue() { + return postStartupScriptBehavior_; + } + /** + * + * + *
+     * Behavior for the post startup script.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @param value The enum numeric value on the wire for postStartupScriptBehavior to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBehaviorValue(int value) { + postStartupScriptBehavior_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Behavior for the post startup script.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The postStartupScriptBehavior. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + getPostStartupScriptBehavior() { + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior result = + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .forNumber(postStartupScriptBehavior_); + return result == null + ? com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Behavior for the post startup script.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @param value The postStartupScriptBehavior to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBehavior( + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + postStartupScriptBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Behavior for the post startup script.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScriptBehavior() { + bitField0_ = (bitField0_ & ~0x00000200); + postStartupScriptBehavior_ = 0; + onChanged(); + return this; + } + + private boolean disableTerminal_; + /** + * + * + *
+     * Bool indicating whether JupyterLab terminal will be available or not.
+     * Default: False
+     * 
+ * + * optional bool disable_terminal = 11; + * + * @return Whether the disableTerminal field is set. + */ + @java.lang.Override + public boolean hasDisableTerminal() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Bool indicating whether JupyterLab terminal will be available or not.
+     * Default: False
+     * 
+ * + * optional bool disable_terminal = 11; + * + * @return The disableTerminal. + */ + @java.lang.Override + public boolean getDisableTerminal() { + return disableTerminal_; + } + /** + * + * + *
+     * Bool indicating whether JupyterLab terminal will be available or not.
+     * Default: False
+     * 
+ * + * optional bool disable_terminal = 11; + * + * @param value The disableTerminal to set. + * @return This builder for chaining. + */ + public Builder setDisableTerminal(boolean value) { + + disableTerminal_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Bool indicating whether JupyterLab terminal will be available or not.
+     * Default: False
+     * 
+ * + * optional bool disable_terminal = 11; + * + * @return This builder for chaining. + */ + public Builder clearDisableTerminal() { + bitField0_ = (bitField0_ & ~0x00000400); + disableTerminal_ = false; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. version of boot image such as M100, from release label of the
+     * image.
+     * 
+ * + * optional string version = 12; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private boolean mixerDisabled_; + /** + * + * + *
+     * Bool indicating whether mixer client should be disabled.
+     * Default: False
+     * 
+ * + * optional bool mixer_disabled = 13; + * + * @return Whether the mixerDisabled field is set. + */ + @java.lang.Override + public boolean hasMixerDisabled() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Bool indicating whether mixer client should be disabled.
+     * Default: False
+     * 
+ * + * optional bool mixer_disabled = 13; + * + * @return The mixerDisabled. + */ + @java.lang.Override + public boolean getMixerDisabled() { + return mixerDisabled_; + } + /** + * + * + *
+     * Bool indicating whether mixer client should be disabled.
+     * Default: False
+     * 
+ * + * optional bool mixer_disabled = 13; + * + * @param value The mixerDisabled to set. + * @return This builder for chaining. + */ + public Builder setMixerDisabled(boolean value) { + + mixerDisabled_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Bool indicating whether mixer client should be disabled.
+     * Default: False
+     * 
+ * + * optional bool mixer_disabled = 13; + * + * @return This builder for chaining. + */ + public Builder clearMixerDisabled() { + bitField0_ = (bitField0_ & ~0x00001000); + mixerDisabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) + private static final com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig(); + } + + public static com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeSoftwareConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java new file mode 100644 index 00000000..7bdbcd60 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java @@ -0,0 +1,397 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface RuntimeSoftwareConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.RuntimeSoftwareConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + java.lang.String getNotebookUpgradeSchedule(); + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes(); + + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + boolean hasEnableHealthMonitoring(); + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * optional bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + boolean getEnableHealthMonitoring(); + + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * optional bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + boolean hasIdleShutdown(); + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * optional bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + boolean getIdleShutdown(); + + /** + * + * + *
+   * Time in minutes to wait before shutting down runtime. Default: 180 minutes
+   * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + int getIdleShutdownTimeout(); + + /** + * + * + *
+   * Install Nvidia Driver automatically.
+   * Default: True
+   * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + boolean getInstallGpuDriver(); + + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + java.lang.String getCustomGpuDriverPath(); + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + com.google.protobuf.ByteString getCustomGpuDriverPathBytes(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (`gs://path-to-file/file-name`).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); + + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + java.util.List getKernelsList(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + com.google.events.cloud.notebooks.v1.ContainerImage getKernels(int index); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + int getKernelsCount(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + java.util.List + getKernelsOrBuilderList(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage kernels = 8; + */ + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getKernelsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Bool indicating whether an newer image is available in an
+   * image family.
+   * 
+ * + * optional bool upgradeable = 9; + * + * @return Whether the upgradeable field is set. + */ + boolean hasUpgradeable(); + /** + * + * + *
+   * Output only. Bool indicating whether an newer image is available in an
+   * image family.
+   * 
+ * + * optional bool upgradeable = 9; + * + * @return The upgradeable. + */ + boolean getUpgradeable(); + + /** + * + * + *
+   * Behavior for the post startup script.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The enum numeric value on the wire for postStartupScriptBehavior. + */ + int getPostStartupScriptBehaviorValue(); + /** + * + * + *
+   * Behavior for the post startup script.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * + * + * @return The postStartupScriptBehavior. + */ + com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + getPostStartupScriptBehavior(); + + /** + * + * + *
+   * Bool indicating whether JupyterLab terminal will be available or not.
+   * Default: False
+   * 
+ * + * optional bool disable_terminal = 11; + * + * @return Whether the disableTerminal field is set. + */ + boolean hasDisableTerminal(); + /** + * + * + *
+   * Bool indicating whether JupyterLab terminal will be available or not.
+   * Default: False
+   * 
+ * + * optional bool disable_terminal = 11; + * + * @return The disableTerminal. + */ + boolean getDisableTerminal(); + + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Output only. version of boot image such as M100, from release label of the
+   * image.
+   * 
+ * + * optional string version = 12; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Bool indicating whether mixer client should be disabled.
+   * Default: False
+   * 
+ * + * optional bool mixer_disabled = 13; + * + * @return Whether the mixerDisabled field is set. + */ + boolean hasMixerDisabled(); + /** + * + * + *
+   * Bool indicating whether mixer client should be disabled.
+   * Default: False
+   * 
+ * + * optional bool mixer_disabled = 13; + * + * @return The mixerDisabled. + */ + boolean getMixerDisabled(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Schedule.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Schedule.java new file mode 100644 index 00000000..8d5602bc --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/Schedule.java @@ -0,0 +1,3131 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a schedule.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Schedule} + */ +public final class Schedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.Schedule) + ScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schedule.newBuilder() to construct. + private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schedule() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + cronSchedule_ = ""; + timeZone_ = ""; + recentExecutions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Schedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Schedule.class, + com.google.events.cloud.notebooks.v1.Schedule.Builder.class); + } + + /** + * + * + *
+   * State of the job.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.Schedule.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The job is executing normally.
+     * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+     * The job is paused by the user. It will not execute. A user can
+     * intentionally pause the job using
+     * [PauseJobRequest][].
+     * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + * + * + *
+     * The job is disabled by the system due to error. The user
+     * cannot directly set a job to be disabled.
+     * 
+ * + * DISABLED = 3; + */ + DISABLED(3), + /** + * + * + *
+     * The job state resulting from a failed [CloudScheduler.UpdateJob][]
+     * operation. To recover a job from this state, retry
+     * [CloudScheduler.UpdateJob][] until a successful response is received.
+     * 
+ * + * UPDATE_FAILED = 4; + */ + UPDATE_FAILED(4), + /** + * + * + *
+     * The schedule resource is being created.
+     * 
+ * + * INITIALIZING = 5; + */ + INITIALIZING(5), + /** + * + * + *
+     * The schedule resource is being deleted.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job is executing normally.
+     * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + /** + * + * + *
+     * The job is paused by the user. It will not execute. A user can
+     * intentionally pause the job using
+     * [PauseJobRequest][].
+     * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + * + * + *
+     * The job is disabled by the system due to error. The user
+     * cannot directly set a job to be disabled.
+     * 
+ * + * DISABLED = 3; + */ + public static final int DISABLED_VALUE = 3; + /** + * + * + *
+     * The job state resulting from a failed [CloudScheduler.UpdateJob][]
+     * operation. To recover a job from this state, retry
+     * [CloudScheduler.UpdateJob][] until a successful response is received.
+     * 
+ * + * UPDATE_FAILED = 4; + */ + public static final int UPDATE_FAILED_VALUE = 4; + /** + * + * + *
+     * The schedule resource is being created.
+     * 
+ * + * INITIALIZING = 5; + */ + public static final int INITIALIZING_VALUE = 5; + /** + * + * + *
+     * The schedule resource is being deleted.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ENABLED; + case 2: + return PAUSED; + case 3: + return DISABLED; + case 4: + return UPDATE_FAILED; + case 5: + return INITIALIZING; + case 6: + return DELETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Schedule.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.Schedule.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens `-`,
+   * and underscores `_`.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens `-`,
+   * and underscores `_`.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule.State getState() { + com.google.events.cloud.notebooks.v1.Schedule.State result = + com.google.events.cloud.notebooks.v1.Schedule.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Schedule.State.UNRECOGNIZED + : result; + } + + public static final int CRON_SCHEDULE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object cronSchedule_ = ""; + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute.
+   * Format: minute, hour, day of month, month, day of week,
+   * e.g. `0 0 * * WED` = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + @java.lang.Override + public java.lang.String getCronSchedule() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cronSchedule_ = s; + return s; + } + } + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute.
+   * Format: minute, hour, day of month, month, day of week,
+   * e.g. `0 0 * * WED` = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCronScheduleBytes() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cronSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_ZONE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } + } + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int EXECUTION_TEMPLATE_FIELD_NUMBER = 9; + private com.google.events.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + @java.lang.Override + public boolean hasExecutionTemplate() { + return executionTemplate_ != null; + } + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + + public static final int RECENT_EXECUTIONS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List recentExecutions_; + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + @java.lang.Override + public java.util.List getRecentExecutionsList() { + return recentExecutions_; + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + @java.lang.Override + public java.util.List + getRecentExecutionsOrBuilderList() { + return recentExecutions_; + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + @java.lang.Override + public int getRecentExecutionsCount() { + return recentExecutions_.size(); + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Execution getRecentExecutions(int index) { + return recentExecutions_.get(index); + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder( + int index) { + return recentExecutions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Schedule.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSchedule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cronSchedule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, timeZone_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (executionTemplate_ != null) { + output.writeMessage(9, getExecutionTemplate()); + } + for (int i = 0; i < recentExecutions_.size(); i++) { + output.writeMessage(10, recentExecutions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ + != com.google.events.cloud.notebooks.v1.Schedule.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSchedule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cronSchedule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, timeZone_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (executionTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExecutionTemplate()); + } + for (int i = 0; i < recentExecutions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, recentExecutions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.Schedule)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.Schedule other = + (com.google.events.cloud.notebooks.v1.Schedule) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (!getCronSchedule().equals(other.getCronSchedule())) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasExecutionTemplate() != other.hasExecutionTemplate()) return false; + if (hasExecutionTemplate()) { + if (!getExecutionTemplate().equals(other.getExecutionTemplate())) return false; + } + if (!getRecentExecutionsList().equals(other.getRecentExecutionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CRON_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getCronSchedule().hashCode(); + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasExecutionTemplate()) { + hash = (37 * hash) + EXECUTION_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTemplate().hashCode(); + } + if (getRecentExecutionsCount() > 0) { + hash = (37 * hash) + RECENT_EXECUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRecentExecutionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.Schedule 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 definition of a schedule.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.Schedule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.Schedule) + com.google.events.cloud.notebooks.v1.ScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.Schedule.class, + com.google.events.cloud.notebooks.v1.Schedule.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.Schedule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + cronSchedule_ = ""; + timeZone_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + executionTemplate_ = null; + if (executionTemplateBuilder_ != null) { + executionTemplateBuilder_.dispose(); + executionTemplateBuilder_ = null; + } + if (recentExecutionsBuilder_ == null) { + recentExecutions_ = java.util.Collections.emptyList(); + } else { + recentExecutions_ = null; + recentExecutionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule build() { + com.google.events.cloud.notebooks.v1.Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule buildPartial() { + com.google.events.cloud.notebooks.v1.Schedule result = + new com.google.events.cloud.notebooks.v1.Schedule(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.events.cloud.notebooks.v1.Schedule result) { + if (recentExecutionsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + recentExecutions_ = java.util.Collections.unmodifiableList(recentExecutions_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.recentExecutions_ = recentExecutions_; + } else { + result.recentExecutions_ = recentExecutionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.Schedule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cronSchedule_ = cronSchedule_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.timeZone_ = timeZone_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.executionTemplate_ = + executionTemplateBuilder_ == null + ? executionTemplate_ + : executionTemplateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.Schedule) { + return mergeFrom((com.google.events.cloud.notebooks.v1.Schedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.Schedule other) { + if (other == com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getCronSchedule().isEmpty()) { + cronSchedule_ = other.cronSchedule_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasExecutionTemplate()) { + mergeExecutionTemplate(other.getExecutionTemplate()); + } + if (recentExecutionsBuilder_ == null) { + if (!other.recentExecutions_.isEmpty()) { + if (recentExecutions_.isEmpty()) { + recentExecutions_ = other.recentExecutions_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureRecentExecutionsIsMutable(); + recentExecutions_.addAll(other.recentExecutions_); + } + onChanged(); + } + } else { + if (!other.recentExecutions_.isEmpty()) { + if (recentExecutionsBuilder_.isEmpty()) { + recentExecutionsBuilder_.dispose(); + recentExecutionsBuilder_ = null; + recentExecutions_ = other.recentExecutions_; + bitField0_ = (bitField0_ & ~0x00000200); + recentExecutionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecentExecutionsFieldBuilder() + : null; + } else { + recentExecutionsBuilder_.addAllMessages(other.recentExecutions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + cronSchedule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + getExecutionTemplateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.events.cloud.notebooks.v1.Execution m = + input.readMessage( + com.google.events.cloud.notebooks.v1.Execution.parser(), extensionRegistry); + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(m); + } else { + recentExecutionsBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens `-`,
+     * and underscores `_`.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens `-`,
+     * and underscores `_`.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens `-`,
+     * and underscores `_`.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens `-`,
+     * and underscores `_`.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens `-`,
+     * and underscores `_`.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule.State getState() { + com.google.events.cloud.notebooks.v1.Schedule.State result = + com.google.events.cloud.notebooks.v1.Schedule.State.forNumber(state_); + return result == null + ? com.google.events.cloud.notebooks.v1.Schedule.State.UNRECOGNIZED + : result; + } + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.events.cloud.notebooks.v1.Schedule.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cronSchedule_ = ""; + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute.
+     * Format: minute, hour, day of month, month, day of week,
+     * e.g. `0 0 * * WED` = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + public java.lang.String getCronSchedule() { + java.lang.Object ref = cronSchedule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cronSchedule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute.
+     * Format: minute, hour, day of month, month, day of week,
+     * e.g. `0 0 * * WED` = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + public com.google.protobuf.ByteString getCronScheduleBytes() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cronSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute.
+     * Format: minute, hour, day of month, month, day of week,
+     * e.g. `0 0 * * WED` = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @param value The cronSchedule to set. + * @return This builder for chaining. + */ + public Builder setCronSchedule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cronSchedule_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute.
+     * Format: minute, hour, day of month, month, day of week,
+     * e.g. `0 0 * * WED` = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return This builder for chaining. + */ + public Builder clearCronSchedule() { + cronSchedule_ = getDefaultInstance().getCronSchedule(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute.
+     * Format: minute, hour, day of month, month, day of week,
+     * e.g. `0 0 * * WED` = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @param value The bytes for cronSchedule to set. + * @return This builder for chaining. + */ + public Builder setCronScheduleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cronSchedule_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object timeZone_ = ""; + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.events.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + executionTemplateBuilder_; + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + public boolean hasExecutionTemplate() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } else { + return executionTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder setExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTemplate_ = value; + } else { + executionTemplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder setExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder builderForValue) { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = builderForValue.build(); + } else { + executionTemplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder mergeExecutionTemplate( + com.google.events.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && executionTemplate_ != null + && executionTemplate_ + != com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance()) { + getExecutionTemplateBuilder().mergeFrom(value); + } else { + executionTemplate_ = value; + } + } else { + executionTemplateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder clearExecutionTemplate() { + bitField0_ = (bitField0_ & ~0x00000100); + executionTemplate_ = null; + if (executionTemplateBuilder_ != null) { + executionTemplateBuilder_.dispose(); + executionTemplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder + getExecutionTemplateBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getExecutionTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + if (executionTemplateBuilder_ != null) { + return executionTemplateBuilder_.getMessageOrBuilder(); + } else { + return executionTemplate_ == null + ? com.google.events.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + getExecutionTemplateFieldBuilder() { + if (executionTemplateBuilder_ == null) { + executionTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ExecutionTemplate, + com.google.events.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder>( + getExecutionTemplate(), getParentForChildren(), isClean()); + executionTemplate_ = null; + } + return executionTemplateBuilder_; + } + + private java.util.List recentExecutions_ = + java.util.Collections.emptyList(); + + private void ensureRecentExecutionsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + recentExecutions_ = + new java.util.ArrayList( + recentExecutions_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder> + recentExecutionsBuilder_; + + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public java.util.List + getRecentExecutionsList() { + if (recentExecutionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(recentExecutions_); + } else { + return recentExecutionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public int getRecentExecutionsCount() { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.size(); + } else { + return recentExecutionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public com.google.events.cloud.notebooks.v1.Execution getRecentExecutions(int index) { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.get(index); + } else { + return recentExecutionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder setRecentExecutions( + int index, com.google.events.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.set(index, value); + onChanged(); + } else { + recentExecutionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder setRecentExecutions( + int index, com.google.events.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.set(index, builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder addRecentExecutions(com.google.events.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(value); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder addRecentExecutions( + int index, com.google.events.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(index, value); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder addRecentExecutions( + com.google.events.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder addRecentExecutions( + int index, com.google.events.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(index, builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder addAllRecentExecutions( + java.lang.Iterable values) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recentExecutions_); + onChanged(); + } else { + recentExecutionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder clearRecentExecutions() { + if (recentExecutionsBuilder_ == null) { + recentExecutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + recentExecutionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public Builder removeRecentExecutions(int index) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.remove(index); + onChanged(); + } else { + recentExecutionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public com.google.events.cloud.notebooks.v1.Execution.Builder getRecentExecutionsBuilder( + int index) { + return getRecentExecutionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder( + int index) { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.get(index); + } else { + return recentExecutionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public java.util.List + getRecentExecutionsOrBuilderList() { + if (recentExecutionsBuilder_ != null) { + return recentExecutionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recentExecutions_); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public com.google.events.cloud.notebooks.v1.Execution.Builder addRecentExecutionsBuilder() { + return getRecentExecutionsFieldBuilder() + .addBuilder(com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public com.google.events.cloud.notebooks.v1.Execution.Builder addRecentExecutionsBuilder( + int index) { + return getRecentExecutionsFieldBuilder() + .addBuilder(index, com.google.events.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule
+     * and their corresponding states.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + public java.util.List + getRecentExecutionsBuilderList() { + return getRecentExecutionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder> + getRecentExecutionsFieldBuilder() { + if (recentExecutionsBuilder_ == null) { + recentExecutionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Execution, + com.google.events.cloud.notebooks.v1.Execution.Builder, + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder>( + recentExecutions_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + recentExecutions_ = null; + } + return recentExecutionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.Schedule) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.Schedule) + private static final com.google.events.cloud.notebooks.v1.Schedule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.Schedule(); + } + + public static com.google.events.cloud.notebooks.v1.Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventData.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventData.java new file mode 100644 index 00000000..db29ef42 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventData.java @@ -0,0 +1,725 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The data within all Schedule events.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ScheduleEventData} + */ +public final class ScheduleEventData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.ScheduleEventData) + ScheduleEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ScheduleEventData.newBuilder() to construct. + private ScheduleEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ScheduleEventData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ScheduleEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ScheduleEventData.class, + com.google.events.cloud.notebooks.v1.ScheduleEventData.Builder.class); + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.events.cloud.notebooks.v1.Schedule payload_; + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.Schedule getPayload() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ScheduleOrBuilder getPayloadOrBuilder() { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance() + : payload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.ScheduleEventData)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.ScheduleEventData other = + (com.google.events.cloud.notebooks.v1.ScheduleEventData) obj; + + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.ScheduleEventData 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 data within all Schedule events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.ScheduleEventData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.ScheduleEventData) + com.google.events.cloud.notebooks.v1.ScheduleEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.ScheduleEventData.class, + com.google.events.cloud.notebooks.v1.ScheduleEventData.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.ScheduleEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_ScheduleEventData_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ScheduleEventData getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.ScheduleEventData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ScheduleEventData build() { + com.google.events.cloud.notebooks.v1.ScheduleEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ScheduleEventData buildPartial() { + com.google.events.cloud.notebooks.v1.ScheduleEventData result = + new com.google.events.cloud.notebooks.v1.ScheduleEventData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.ScheduleEventData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.ScheduleEventData) { + return mergeFrom((com.google.events.cloud.notebooks.v1.ScheduleEventData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.ScheduleEventData other) { + if (other == com.google.events.cloud.notebooks.v1.ScheduleEventData.getDefaultInstance()) + return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.events.cloud.notebooks.v1.Schedule payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Schedule, + com.google.events.cloud.notebooks.v1.Schedule.Builder, + com.google.events.cloud.notebooks.v1.ScheduleOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return The payload. + */ + public com.google.events.cloud.notebooks.v1.Schedule getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public Builder setPayload(com.google.events.cloud.notebooks.v1.Schedule value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public Builder setPayload( + com.google.events.cloud.notebooks.v1.Schedule.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public Builder mergePayload(com.google.events.cloud.notebooks.v1.Schedule value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && payload_ != null + && payload_ != com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000001); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public com.google.events.cloud.notebooks.v1.Schedule.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + public com.google.events.cloud.notebooks.v1.ScheduleOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.events.cloud.notebooks.v1.Schedule.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Optional. The Schedule event payload. Unset for deletion events.
+     * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Schedule, + com.google.events.cloud.notebooks.v1.Schedule.Builder, + com.google.events.cloud.notebooks.v1.ScheduleOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.Schedule, + com.google.events.cloud.notebooks.v1.Schedule.Builder, + com.google.events.cloud.notebooks.v1.ScheduleOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.ScheduleEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.ScheduleEventData) + private static final com.google.events.cloud.notebooks.v1.ScheduleEventData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.ScheduleEventData(); + } + + public static com.google.events.cloud.notebooks.v1.ScheduleEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScheduleEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ScheduleEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataOrBuilder.java new file mode 100644 index 00000000..6d88bec3 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ScheduleEventDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.ScheduleEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + * + * @return The payload. + */ + com.google.events.cloud.notebooks.v1.Schedule getPayload(); + /** + * + * + *
+   * Optional. The Schedule event payload. Unset for deletion events.
+   * 
+ * + * optional .google.events.cloud.notebooks.v1.Schedule payload = 1; + */ + com.google.events.cloud.notebooks.v1.ScheduleOrBuilder getPayloadOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleOrBuilder.java new file mode 100644 index 00000000..dc11fa4d --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/ScheduleOrBuilder.java @@ -0,0 +1,349 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface ScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens `-`,
+   * and underscores `_`.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens `-`,
+   * and underscores `_`.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .google.events.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + com.google.events.cloud.notebooks.v1.Schedule.State getState(); + + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute.
+   * Format: minute, hour, day of month, month, day of week,
+   * e.g. `0 0 * * WED` = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + java.lang.String getCronSchedule(); + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute.
+   * Format: minute, hour, day of month, month, day of week,
+   * e.g. `0 0 * * WED` = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + com.google.protobuf.ByteString getCronScheduleBytes(); + + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + boolean hasExecutionTemplate(); + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate(); + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.events.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + com.google.events.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder(); + + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + java.util.List getRecentExecutionsList(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + com.google.events.cloud.notebooks.v1.Execution getRecentExecutions(int index); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + int getRecentExecutionsCount(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + java.util.List + getRecentExecutionsOrBuilderList(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule
+   * and their corresponding states.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.Execution recent_executions = 10; + */ + com.google.events.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder(int index); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachine.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachine.java new file mode 100644 index 00000000..1521cdaf --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachine.java @@ -0,0 +1,1096 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Runtime using Virtual Machine for computing.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachine} + */ +public final class VirtualMachine extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.VirtualMachine) + VirtualMachineOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachine.newBuilder() to construct. + private VirtualMachine(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachine() { + instanceName_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachine(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachine.class, + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder.class); + } + + public static final int INSTANCE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceName_ = ""; + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1; + * + * @return The instanceName. + */ + @java.lang.Override + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1; + * + * @return The bytes for instanceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIRTUAL_MACHINE_CONFIG_FIELD_NUMBER = 3; + private com.google.events.cloud.notebooks.v1.VirtualMachineConfig virtualMachineConfig_; + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return Whether the virtualMachineConfig field is set. + */ + @java.lang.Override + public boolean hasVirtualMachineConfig() { + return virtualMachineConfig_ != null; + } + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return The virtualMachineConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig() { + return virtualMachineConfig_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder + getVirtualMachineConfigOrBuilder() { + return virtualMachineConfig_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (virtualMachineConfig_ != null) { + output.writeMessage(3, getVirtualMachineConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (virtualMachineConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVirtualMachineConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.VirtualMachine)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.VirtualMachine other = + (com.google.events.cloud.notebooks.v1.VirtualMachine) obj; + + if (!getInstanceName().equals(other.getInstanceName())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasVirtualMachineConfig() != other.hasVirtualMachineConfig()) return false; + if (hasVirtualMachineConfig()) { + if (!getVirtualMachineConfig().equals(other.getVirtualMachineConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceName().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasVirtualMachineConfig()) { + hash = (37 * hash) + VIRTUAL_MACHINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachineConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.VirtualMachine 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; + } + /** + * + * + *
+   * Runtime using Virtual Machine for computing.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.VirtualMachine) + com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachine.class, + com.google.events.cloud.notebooks.v1.VirtualMachine.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.VirtualMachine.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceName_ = ""; + instanceId_ = ""; + virtualMachineConfig_ = null; + if (virtualMachineConfigBuilder_ != null) { + virtualMachineConfigBuilder_.dispose(); + virtualMachineConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine build() { + com.google.events.cloud.notebooks.v1.VirtualMachine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine buildPartial() { + com.google.events.cloud.notebooks.v1.VirtualMachine result = + new com.google.events.cloud.notebooks.v1.VirtualMachine(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.VirtualMachine result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceName_ = instanceName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.virtualMachineConfig_ = + virtualMachineConfigBuilder_ == null + ? virtualMachineConfig_ + : virtualMachineConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.VirtualMachine) { + return mergeFrom((com.google.events.cloud.notebooks.v1.VirtualMachine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.VirtualMachine other) { + if (other == com.google.events.cloud.notebooks.v1.VirtualMachine.getDefaultInstance()) + return this; + if (!other.getInstanceName().isEmpty()) { + instanceName_ = other.instanceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasVirtualMachineConfig()) { + mergeVirtualMachineConfig(other.getVirtualMachineConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + instanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getVirtualMachineConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object instanceName_ = ""; + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1; + * + * @return The instanceName. + */ + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1; + * + * @return The bytes for instanceName. + */ + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1; + * + * @param value The instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceName() { + instanceName_ = getDefaultInstance().getInstanceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1; + * + * @param value The bytes for instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.VirtualMachineConfig virtualMachineConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder> + virtualMachineConfigBuilder_; + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * + * @return Whether the virtualMachineConfig field is set. + */ + public boolean hasVirtualMachineConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * + * @return The virtualMachineConfig. + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig() { + if (virtualMachineConfigBuilder_ == null) { + return virtualMachineConfig_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } else { + return virtualMachineConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public Builder setVirtualMachineConfig( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig value) { + if (virtualMachineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualMachineConfig_ = value; + } else { + virtualMachineConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public Builder setVirtualMachineConfig( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder builderForValue) { + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfig_ = builderForValue.build(); + } else { + virtualMachineConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public Builder mergeVirtualMachineConfig( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig value) { + if (virtualMachineConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && virtualMachineConfig_ != null + && virtualMachineConfig_ + != com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance()) { + getVirtualMachineConfigBuilder().mergeFrom(value); + } else { + virtualMachineConfig_ = value; + } + } else { + virtualMachineConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public Builder clearVirtualMachineConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + virtualMachineConfig_ = null; + if (virtualMachineConfigBuilder_ != null) { + virtualMachineConfigBuilder_.dispose(); + virtualMachineConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder + getVirtualMachineConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getVirtualMachineConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder + getVirtualMachineConfigOrBuilder() { + if (virtualMachineConfigBuilder_ != null) { + return virtualMachineConfigBuilder_.getMessageOrBuilder(); + } else { + return virtualMachineConfig_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder> + getVirtualMachineConfigFieldBuilder() { + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder>( + getVirtualMachineConfig(), getParentForChildren(), isClean()); + virtualMachineConfig_ = null; + } + return virtualMachineConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.VirtualMachine) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.VirtualMachine) + private static final com.google.events.cloud.notebooks.v1.VirtualMachine DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.VirtualMachine(); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachine getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachine parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachine getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfig.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfig.java new file mode 100644 index 00000000..4c09fdc7 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfig.java @@ -0,0 +1,5786 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * The config settings for virtual machine.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachineConfig} + */ +public final class VirtualMachineConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.VirtualMachineConfig) + VirtualMachineConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachineConfig.newBuilder() to construct. + private VirtualMachineConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachineConfig() { + zone_ = ""; + machineType_ = ""; + containerImages_ = java.util.Collections.emptyList(); + network_ = ""; + subnet_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nicType_ = 0; + reservedIpRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachineConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetGuestAttributes(); + case 15: + return internalGetMetadata(); + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.class, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder.class); + } + + /** + * + * + *
+   * The type of vNIC driver.
+   * Default should be UNSPECIFIED_NIC_TYPE.
+   * 
+ * + * Protobuf enum {@code google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType} + */ + public enum NicType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + UNSPECIFIED_NIC_TYPE(0), + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + VIRTIO_NET(1), + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + GVNIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0; + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + public static final int VIRTIO_NET_VALUE = 1; + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + public static final int GVNIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NicType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NicType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_NIC_TYPE; + case 1: + return VIRTIO_NET; + case 2: + return GVNIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NicType findValueByNumber(int number) { + return NicType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NicType[] VALUES = values(); + + public static NicType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NicType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType) + } + + public interface BootImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Definition of the boot image used by the Runtime.
+   * Used to facilitate runtime upgradeability.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage} + */ + public static final class BootImage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) + BootImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use BootImage.newBuilder() to construct. + private BootImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BootImage() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BootImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.class, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.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.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage other = + (com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) 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.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage 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; + } + /** + * + * + *
+     * Definition of the boot image used by the Runtime.
+     * Used to facilitate runtime upgradeability.
+     * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.class, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder.class); + } + + // Construct using + // com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.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.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_BootImage_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage build() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage buildPartial() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage result = + new com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage(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.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) { + return mergeFrom( + (com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage other) { + if (other + == com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + .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.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage) + private static final com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage(); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BootImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ZONE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List containerImages_; + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + @java.lang.Override + public java.util.List + getContainerImagesList() { + return containerImages_; + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + @java.lang.Override + public java.util.List + getContainerImagesOrBuilderList() { + return containerImages_; + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + @java.lang.Override + public int getContainerImagesCount() { + return containerImages_.size(); + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImages(int index) { + return containerImages_.get(index); + } + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder( + int index) { + return containerImages_.get(index); + } + + public static final int DATA_DISK_FIELD_NUMBER = 4; + private com.google.events.cloud.notebooks.v1.LocalDisk dataDisk_; + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return Whether the dataDisk field is set. + */ + @java.lang.Override + public boolean hasDataDisk() { + return dataDisk_ != null; + } + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return The dataDisk. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDisk getDataDisk() { + return dataDisk_ == null + ? com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder() { + return dataDisk_ == null + ? com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 5; + private com.google.events.cloud.notebooks.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 6; + private com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + shieldedInstanceConfig_; + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 7; + private com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + + public static final int NETWORK_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+   * * `projects/[project_id]/global/networks/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+   * * `projects/[project_id]/global/networks/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnet_ = ""; + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9; + * + * @return The subnet. + */ + @java.lang.Override + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9; + * + * @return The bytes for subnet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_ONLY_FIELD_NUMBER = 10; + private boolean internalIpOnly_ = false; + /** + * + * + *
+   * Optional. If true, runtime will only have internal IP
+   * addresses. By default, runtimes are not restricted to internal IP
+   * addresses, and will have ephemeral external IP addresses assigned to each
+   * vm. This `internal_ip_only` restriction can only be enabled for
+   * subnetwork enabled networks, and all dependencies must be
+   * configured to be accessible without external IP addresses.
+   * 
+ * + * bool internal_ip_only = 10; + * + * @return The internalIpOnly. + */ + @java.lang.Override + public boolean getInternalIpOnly() { + return internalIpOnly_; + } + + public static final int TAGS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int GUEST_ATTRIBUTES_FIELD_NUMBER = 14; + + private static final class GuestAttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField guestAttributes_; + + private com.google.protobuf.MapField + internalGetGuestAttributes() { + if (guestAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + return guestAttributes_; + } + + public int getGuestAttributesCount() { + return internalGetGuestAttributes().getMap().size(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public boolean containsGuestAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetGuestAttributes().getMap().containsKey(key); + } + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getGuestAttributes() { + return getGuestAttributesMap(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public java.util.Map getGuestAttributesMap() { + return internalGetGuestAttributes().getMap(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public /* nullable */ java.lang.String getGuestAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 15; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NIC_TYPE_FIELD_NUMBER = 17; + private int nicType_ = 0; + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The nicType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType result = + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.forNumber(nicType_); + return result == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNRECOGNIZED + : result; + } + + public static final int RESERVED_IP_RANGE_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object reservedIpRange_ = ""; + /** + * + * + *
+   * Optional. Reserved IP Range name is used for VPC Peering.
+   * The subnetwork allocation will use the range *name* if it's assigned.
+   * Example: managed-notebooks-range-c
+   *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+   *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+   *       --global \
+   *       --prefix-length=24 \
+   *       --description="Google Cloud Managed Notebooks Range 24 c" \
+   *       --network=$NETWORK \
+   *       --addresses=192.168.0.0 \
+   *       --purpose=VPC_PEERING
+   * Field value will be: `managed-notebooks-range-c`
+   * 
+ * + * string reserved_ip_range = 18; + * + * @return The reservedIpRange. + */ + @java.lang.Override + public java.lang.String getReservedIpRange() { + java.lang.Object ref = reservedIpRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reservedIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Reserved IP Range name is used for VPC Peering.
+   * The subnetwork allocation will use the range *name* if it's assigned.
+   * Example: managed-notebooks-range-c
+   *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+   *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+   *       --global \
+   *       --prefix-length=24 \
+   *       --description="Google Cloud Managed Notebooks Range 24 c" \
+   *       --network=$NETWORK \
+   *       --addresses=192.168.0.0 \
+   *       --purpose=VPC_PEERING
+   * Field value will be: `managed-notebooks-range-c`
+   * 
+ * + * string reserved_ip_range = 18; + * + * @return The bytes for reservedIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReservedIpRangeBytes() { + java.lang.Object ref = reservedIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reservedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOT_IMAGE_FIELD_NUMBER = 19; + private com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage bootImage_; + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * @return Whether the bootImage field is set. + */ + @java.lang.Override + public boolean hasBootImage() { + return bootImage_ != null; + } + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * @return The bootImage. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage getBootImage() { + return bootImage_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.getDefaultInstance() + : bootImage_; + } + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder + getBootImageOrBuilder() { + return bootImage_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.getDefaultInstance() + : bootImage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + for (int i = 0; i < containerImages_.size(); i++) { + output.writeMessage(3, containerImages_.get(i)); + } + if (dataDisk_ != null) { + output.writeMessage(4, getDataDisk()); + } + if (encryptionConfig_ != null) { + output.writeMessage(5, getEncryptionConfig()); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(6, getShieldedInstanceConfig()); + } + if (acceleratorConfig_ != null) { + output.writeMessage(7, getAcceleratorConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, subnet_); + } + if (internalIpOnly_ != false) { + output.writeBool(10, internalIpOnly_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, tags_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetGuestAttributes(), GuestAttributesDefaultEntryHolder.defaultEntry, 14); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 15); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); + if (nicType_ + != com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNSPECIFIED_NIC_TYPE + .getNumber()) { + output.writeEnum(17, nicType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, reservedIpRange_); + } + if (bootImage_ != null) { + output.writeMessage(19, getBootImage()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + for (int i = 0; i < containerImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, containerImages_.get(i)); + } + if (dataDisk_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDataDisk()); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); + } + if (shieldedInstanceConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getShieldedInstanceConfig()); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAcceleratorConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, subnet_); + } + if (internalIpOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, internalIpOnly_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + for (java.util.Map.Entry entry : + internalGetGuestAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry guestAttributes__ = + GuestAttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, guestAttributes__); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, metadata__); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } + if (nicType_ + != com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNSPECIFIED_NIC_TYPE + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, nicType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, reservedIpRange_); + } + if (bootImage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getBootImage()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.VirtualMachineConfig)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.VirtualMachineConfig other = + (com.google.events.cloud.notebooks.v1.VirtualMachineConfig) obj; + + if (!getZone().equals(other.getZone())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!getContainerImagesList().equals(other.getContainerImagesList())) return false; + if (hasDataDisk() != other.hasDataDisk()) return false; + if (hasDataDisk()) { + if (!getDataDisk().equals(other.getDataDisk())) return false; + } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + } + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnet().equals(other.getSubnet())) return false; + if (getInternalIpOnly() != other.getInternalIpOnly()) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!internalGetGuestAttributes().equals(other.internalGetGuestAttributes())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (nicType_ != other.nicType_) return false; + if (!getReservedIpRange().equals(other.getReservedIpRange())) return false; + if (hasBootImage() != other.hasBootImage()) return false; + if (hasBootImage()) { + if (!getBootImage().equals(other.getBootImage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + if (getContainerImagesCount() > 0) { + hash = (37 * hash) + CONTAINER_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getContainerImagesList().hashCode(); + } + if (hasDataDisk()) { + hash = (37 * hash) + DATA_DISK_FIELD_NUMBER; + hash = (53 * hash) + getDataDisk().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().hashCode(); + hash = (37 * hash) + INTERNAL_IP_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInternalIpOnly()); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (!internalGetGuestAttributes().getMap().isEmpty()) { + hash = (37 * hash) + GUEST_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetGuestAttributes().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nicType_; + hash = (37 * hash) + RESERVED_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getReservedIpRange().hashCode(); + if (hasBootImage()) { + hash = (37 * hash) + BOOT_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBootImage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig 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 config settings for virtual machine.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VirtualMachineConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.VirtualMachineConfig) + com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetGuestAttributes(); + case 15: + return internalGetMetadata(); + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 14: + return internalGetMutableGuestAttributes(); + case 15: + return internalGetMutableMetadata(); + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.class, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.VirtualMachineConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + zone_ = ""; + machineType_ = ""; + if (containerImagesBuilder_ == null) { + containerImages_ = java.util.Collections.emptyList(); + } else { + containerImages_ = null; + containerImagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + dataDisk_ = null; + if (dataDiskBuilder_ != null) { + dataDiskBuilder_.dispose(); + dataDiskBuilder_ = null; + } + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + shieldedInstanceConfig_ = null; + if (shieldedInstanceConfigBuilder_ != null) { + shieldedInstanceConfigBuilder_.dispose(); + shieldedInstanceConfigBuilder_ = null; + } + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + network_ = ""; + subnet_ = ""; + internalIpOnly_ = false; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableGuestAttributes().clear(); + internalGetMutableMetadata().clear(); + internalGetMutableLabels().clear(); + nicType_ = 0; + reservedIpRange_ = ""; + bootImage_ = null; + if (bootImageBuilder_ != null) { + bootImageBuilder_.dispose(); + bootImageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig build() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig buildPartial() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig result = + new com.google.events.cloud.notebooks.v1.VirtualMachineConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig result) { + if (containerImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + containerImages_ = java.util.Collections.unmodifiableList(containerImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.containerImages_ = containerImages_; + } else { + result.containerImages_ = containerImagesBuilder_.build(); + } + if (((bitField0_ & 0x00000400) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.tags_ = tags_; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.VirtualMachineConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.zone_ = zone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.machineType_ = machineType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dataDisk_ = dataDiskBuilder_ == null ? dataDisk_ : dataDiskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.shieldedInstanceConfig_ = + shieldedInstanceConfigBuilder_ == null + ? shieldedInstanceConfig_ + : shieldedInstanceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.acceleratorConfig_ = + acceleratorConfigBuilder_ == null + ? acceleratorConfig_ + : acceleratorConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.subnet_ = subnet_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.internalIpOnly_ = internalIpOnly_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.guestAttributes_ = internalGetGuestAttributes(); + result.guestAttributes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.nicType_ = nicType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.reservedIpRange_ = reservedIpRange_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.bootImage_ = bootImageBuilder_ == null ? bootImage_ : bootImageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.VirtualMachineConfig) { + return mergeFrom((com.google.events.cloud.notebooks.v1.VirtualMachineConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.VirtualMachineConfig other) { + if (other == com.google.events.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance()) + return this; + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (containerImagesBuilder_ == null) { + if (!other.containerImages_.isEmpty()) { + if (containerImages_.isEmpty()) { + containerImages_ = other.containerImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureContainerImagesIsMutable(); + containerImages_.addAll(other.containerImages_); + } + onChanged(); + } + } else { + if (!other.containerImages_.isEmpty()) { + if (containerImagesBuilder_.isEmpty()) { + containerImagesBuilder_.dispose(); + containerImagesBuilder_ = null; + containerImages_ = other.containerImages_; + bitField0_ = (bitField0_ & ~0x00000004); + containerImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainerImagesFieldBuilder() + : null; + } else { + containerImagesBuilder_.addAllMessages(other.containerImages_); + } + } + } + if (other.hasDataDisk()) { + mergeDataDisk(other.getDataDisk()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getSubnet().isEmpty()) { + subnet_ = other.subnet_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.getInternalIpOnly() != false) { + setInternalIpOnly(other.getInternalIpOnly()); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + internalGetMutableGuestAttributes().mergeFrom(other.internalGetGuestAttributes()); + bitField0_ |= 0x00000800; + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + bitField0_ |= 0x00001000; + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00002000; + if (other.nicType_ != 0) { + setNicTypeValue(other.getNicTypeValue()); + } + if (!other.getReservedIpRange().isEmpty()) { + reservedIpRange_ = other.reservedIpRange_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.hasBootImage()) { + mergeBootImage(other.getBootImage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.events.cloud.notebooks.v1.ContainerImage m = + input.readMessage( + com.google.events.cloud.notebooks.v1.ContainerImage.parser(), + extensionRegistry); + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.add(m); + } else { + containerImagesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getDataDiskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getAcceleratorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + subnet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + internalIpOnly_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 106 + case 114: + { + com.google.protobuf.MapEntry guestAttributes__ = + input.readMessage( + GuestAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableGuestAttributes() + .getMutableMap() + .put(guestAttributes__.getKey(), guestAttributes__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 122: + { + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 122 + case 130: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00002000; + break; + } // case 130 + case 136: + { + nicType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 136 + case 146: + { + reservedIpRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 146 + case 154: + { + input.readMessage(getBootImageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List containerImages_ = + java.util.Collections.emptyList(); + + private void ensureContainerImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + containerImages_ = + new java.util.ArrayList( + containerImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImagesBuilder_; + + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public java.util.List + getContainerImagesList() { + if (containerImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(containerImages_); + } else { + return containerImagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public int getContainerImagesCount() { + if (containerImagesBuilder_ == null) { + return containerImages_.size(); + } else { + return containerImagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage getContainerImages(int index) { + if (containerImagesBuilder_ == null) { + return containerImages_.get(index); + } else { + return containerImagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder setContainerImages( + int index, com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.set(index, value); + onChanged(); + } else { + containerImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder setContainerImages( + int index, com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.set(index, builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder addContainerImages(com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.add(value); + onChanged(); + } else { + containerImagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder addContainerImages( + int index, com.google.events.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.add(index, value); + onChanged(); + } else { + containerImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder addContainerImages( + com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.add(builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder addContainerImages( + int index, com.google.events.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.add(index, builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder addAllContainerImages( + java.lang.Iterable values) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containerImages_); + onChanged(); + } else { + containerImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder clearContainerImages() { + if (containerImagesBuilder_ == null) { + containerImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + containerImagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public Builder removeContainerImages(int index) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.remove(index); + onChanged(); + } else { + containerImagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder getContainerImagesBuilder( + int index) { + return getContainerImagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder( + int index) { + if (containerImagesBuilder_ == null) { + return containerImages_.get(index); + } else { + return containerImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public java.util.List + getContainerImagesOrBuilderList() { + if (containerImagesBuilder_ != null) { + return containerImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containerImages_); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder addContainerImagesBuilder() { + return getContainerImagesFieldBuilder() + .addBuilder(com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public com.google.events.cloud.notebooks.v1.ContainerImage.Builder addContainerImagesBuilder( + int index) { + return getContainerImagesFieldBuilder() + .addBuilder( + index, com.google.events.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to use as Kernels in the notebook
+     * instance.
+     * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + public java.util.List + getContainerImagesBuilderList() { + return getContainerImagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImagesFieldBuilder() { + if (containerImagesBuilder_ == null) { + containerImagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.events.cloud.notebooks.v1.ContainerImage, + com.google.events.cloud.notebooks.v1.ContainerImage.Builder, + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder>( + containerImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + containerImages_ = null; + } + return containerImagesBuilder_; + } + + private com.google.events.cloud.notebooks.v1.LocalDisk dataDisk_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk, + com.google.events.cloud.notebooks.v1.LocalDisk.Builder, + com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder> + dataDiskBuilder_; + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return Whether the dataDisk field is set. + */ + public boolean hasDataDisk() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return The dataDisk. + */ + public com.google.events.cloud.notebooks.v1.LocalDisk getDataDisk() { + if (dataDiskBuilder_ == null) { + return dataDisk_ == null + ? com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } else { + return dataDiskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public Builder setDataDisk(com.google.events.cloud.notebooks.v1.LocalDisk value) { + if (dataDiskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataDisk_ = value; + } else { + dataDiskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public Builder setDataDisk( + com.google.events.cloud.notebooks.v1.LocalDisk.Builder builderForValue) { + if (dataDiskBuilder_ == null) { + dataDisk_ = builderForValue.build(); + } else { + dataDiskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public Builder mergeDataDisk(com.google.events.cloud.notebooks.v1.LocalDisk value) { + if (dataDiskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && dataDisk_ != null + && dataDisk_ != com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance()) { + getDataDiskBuilder().mergeFrom(value); + } else { + dataDisk_ = value; + } + } else { + dataDiskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public Builder clearDataDisk() { + bitField0_ = (bitField0_ & ~0x00000008); + dataDisk_ = null; + if (dataDiskBuilder_ != null) { + dataDiskBuilder_.dispose(); + dataDiskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public com.google.events.cloud.notebooks.v1.LocalDisk.Builder getDataDiskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDataDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + public com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder() { + if (dataDiskBuilder_ != null) { + return dataDiskBuilder_.getMessageOrBuilder(); + } else { + return dataDisk_ == null + ? com.google.events.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk, + com.google.events.cloud.notebooks.v1.LocalDisk.Builder, + com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder> + getDataDiskFieldBuilder() { + if (dataDiskBuilder_ == null) { + dataDiskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.LocalDisk, + com.google.events.cloud.notebooks.v1.LocalDisk.Builder, + com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder>( + getDataDisk(), getParentForChildren(), isClean()); + dataDisk_ = null; + } + return dataDiskBuilder_; + } + + private com.google.events.cloud.notebooks.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.EncryptionConfig, + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + public com.google.events.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public Builder setEncryptionConfig( + com.google.events.cloud.notebooks.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public Builder setEncryptionConfig( + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public Builder mergeEncryptionConfig( + com.google.events.cloud.notebooks.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + public com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.events.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.EncryptionConfig, + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.EncryptionConfig, + com.google.events.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder> + shieldedInstanceConfigBuilder_; + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return The shieldedInstanceConfig. + */ + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + .getDefaultInstance() + : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public Builder setShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public Builder setShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder + builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public Builder mergeShieldedInstanceConfig( + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && shieldedInstanceConfig_ != null + && shieldedInstanceConfig_ + != com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + .getDefaultInstance()) { + getShieldedInstanceConfigBuilder().mergeFrom(value); + } else { + shieldedInstanceConfig_ = value; + } + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public Builder clearShieldedInstanceConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + shieldedInstanceConfig_ = null; + if (shieldedInstanceConfigBuilder_ != null) { + shieldedInstanceConfigBuilder_.dispose(); + shieldedInstanceConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder + getShieldedInstanceConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + public com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + .getDefaultInstance() + : shieldedInstanceConfig_; + } + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + + private com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * + * @return The acceleratorConfig. + */ + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + } else { + acceleratorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public Builder setAcceleratorConfig( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public Builder mergeAcceleratorConfig( + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && acceleratorConfig_ != null + && acceleratorConfig_ + != com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig + .getDefaultInstance()) { + getAcceleratorConfigBuilder().mergeFrom(value); + } else { + acceleratorConfig_ = value; + } + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public Builder clearAcceleratorConfig() { + bitField0_ = (bitField0_ & ~0x00000040); + acceleratorConfig_ = null; + if (acceleratorConfigBuilder_ != null) { + acceleratorConfigBuilder_.dispose(); + acceleratorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + public com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+     * * `projects/[project_id]/global/networks/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+     * * `projects/[project_id]/global/networks/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+     * * `projects/[project_id]/global/networks/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+     * * `projects/[project_id]/global/networks/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+     * * `projects/[project_id]/global/networks/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object subnet_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9; + * + * @return The subnet. + */ + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9; + * + * @return The bytes for subnet. + */ + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9; + * + * @param value The subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnet_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9; + * + * @return This builder for chaining. + */ + public Builder clearSubnet() { + subnet_ = getDefaultInstance().getSubnet(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9; + * + * @param value The bytes for subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnet_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private boolean internalIpOnly_; + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10; + * + * @return The internalIpOnly. + */ + @java.lang.Override + public boolean getInternalIpOnly() { + return internalIpOnly_; + } + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10; + * + * @param value The internalIpOnly to set. + * @return This builder for chaining. + */ + public Builder setInternalIpOnly(boolean value) { + + internalIpOnly_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10; + * + * @return This builder for chaining. + */ + public Builder clearInternalIpOnly() { + bitField0_ = (bitField0_ & ~0x00000200); + internalIpOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000400; + } + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField guestAttributes_; + + private com.google.protobuf.MapField + internalGetGuestAttributes() { + if (guestAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + return guestAttributes_; + } + + private com.google.protobuf.MapField + internalGetMutableGuestAttributes() { + if (guestAttributes_ == null) { + guestAttributes_ = + com.google.protobuf.MapField.newMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + if (!guestAttributes_.isMutable()) { + guestAttributes_ = guestAttributes_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return guestAttributes_; + } + + public int getGuestAttributesCount() { + return internalGetGuestAttributes().getMap().size(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public boolean containsGuestAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetGuestAttributes().getMap().containsKey(key); + } + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getGuestAttributes() { + return getGuestAttributesMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public java.util.Map getGuestAttributesMap() { + return internalGetGuestAttributes().getMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public /* nullable */ java.lang.String getGuestAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearGuestAttributes() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableGuestAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + public Builder removeGuestAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableGuestAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableGuestAttributes() { + bitField0_ |= 0x00000800; + return internalGetMutableGuestAttributes().getMutableMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + public Builder putGuestAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableGuestAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * map<string, string> guest_attributes = 14; + */ + public Builder putAllGuestAttributes(java.util.Map values) { + internalGetMutableGuestAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00001000; + onChanged(); + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + bitField0_ |= 0x00001000; + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine.
+     * (see [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15; + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00002000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00002000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00002000; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00002000; + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00002000; + return this; + } + + private int nicType_ = 0; + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @param value The enum numeric value on the wire for nicType to set. + * @return This builder for chaining. + */ + public Builder setNicTypeValue(int value) { + nicType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The nicType. + */ + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType() { + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType result = + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.forNumber(nicType_); + return result == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @param value The nicType to set. + * @return This builder for chaining. + */ + public Builder setNicType( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + nicType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return This builder for chaining. + */ + public Builder clearNicType() { + bitField0_ = (bitField0_ & ~0x00004000); + nicType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object reservedIpRange_ = ""; + /** + * + * + *
+     * Optional. Reserved IP Range name is used for VPC Peering.
+     * The subnetwork allocation will use the range *name* if it's assigned.
+     * Example: managed-notebooks-range-c
+     *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+     *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+     *       --global \
+     *       --prefix-length=24 \
+     *       --description="Google Cloud Managed Notebooks Range 24 c" \
+     *       --network=$NETWORK \
+     *       --addresses=192.168.0.0 \
+     *       --purpose=VPC_PEERING
+     * Field value will be: `managed-notebooks-range-c`
+     * 
+ * + * string reserved_ip_range = 18; + * + * @return The reservedIpRange. + */ + public java.lang.String getReservedIpRange() { + java.lang.Object ref = reservedIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reservedIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Reserved IP Range name is used for VPC Peering.
+     * The subnetwork allocation will use the range *name* if it's assigned.
+     * Example: managed-notebooks-range-c
+     *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+     *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+     *       --global \
+     *       --prefix-length=24 \
+     *       --description="Google Cloud Managed Notebooks Range 24 c" \
+     *       --network=$NETWORK \
+     *       --addresses=192.168.0.0 \
+     *       --purpose=VPC_PEERING
+     * Field value will be: `managed-notebooks-range-c`
+     * 
+ * + * string reserved_ip_range = 18; + * + * @return The bytes for reservedIpRange. + */ + public com.google.protobuf.ByteString getReservedIpRangeBytes() { + java.lang.Object ref = reservedIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reservedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Reserved IP Range name is used for VPC Peering.
+     * The subnetwork allocation will use the range *name* if it's assigned.
+     * Example: managed-notebooks-range-c
+     *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+     *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+     *       --global \
+     *       --prefix-length=24 \
+     *       --description="Google Cloud Managed Notebooks Range 24 c" \
+     *       --network=$NETWORK \
+     *       --addresses=192.168.0.0 \
+     *       --purpose=VPC_PEERING
+     * Field value will be: `managed-notebooks-range-c`
+     * 
+ * + * string reserved_ip_range = 18; + * + * @param value The reservedIpRange to set. + * @return This builder for chaining. + */ + public Builder setReservedIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reservedIpRange_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Reserved IP Range name is used for VPC Peering.
+     * The subnetwork allocation will use the range *name* if it's assigned.
+     * Example: managed-notebooks-range-c
+     *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+     *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+     *       --global \
+     *       --prefix-length=24 \
+     *       --description="Google Cloud Managed Notebooks Range 24 c" \
+     *       --network=$NETWORK \
+     *       --addresses=192.168.0.0 \
+     *       --purpose=VPC_PEERING
+     * Field value will be: `managed-notebooks-range-c`
+     * 
+ * + * string reserved_ip_range = 18; + * + * @return This builder for chaining. + */ + public Builder clearReservedIpRange() { + reservedIpRange_ = getDefaultInstance().getReservedIpRange(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Reserved IP Range name is used for VPC Peering.
+     * The subnetwork allocation will use the range *name* if it's assigned.
+     * Example: managed-notebooks-range-c
+     *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+     *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+     *       --global \
+     *       --prefix-length=24 \
+     *       --description="Google Cloud Managed Notebooks Range 24 c" \
+     *       --network=$NETWORK \
+     *       --addresses=192.168.0.0 \
+     *       --purpose=VPC_PEERING
+     * Field value will be: `managed-notebooks-range-c`
+     * 
+ * + * string reserved_ip_range = 18; + * + * @param value The bytes for reservedIpRange to set. + * @return This builder for chaining. + */ + public Builder setReservedIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reservedIpRange_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage bootImage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder> + bootImageBuilder_; + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * + * @return Whether the bootImage field is set. + */ + public boolean hasBootImage() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * + * @return The bootImage. + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage getBootImage() { + if (bootImageBuilder_ == null) { + return bootImage_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + .getDefaultInstance() + : bootImage_; + } else { + return bootImageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public Builder setBootImage( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage value) { + if (bootImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bootImage_ = value; + } else { + bootImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public Builder setBootImage( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder + builderForValue) { + if (bootImageBuilder_ == null) { + bootImage_ = builderForValue.build(); + } else { + bootImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public Builder mergeBootImage( + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage value) { + if (bootImageBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && bootImage_ != null + && bootImage_ + != com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + .getDefaultInstance()) { + getBootImageBuilder().mergeFrom(value); + } else { + bootImage_ = value; + } + } else { + bootImageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public Builder clearBootImage() { + bitField0_ = (bitField0_ & ~0x00010000); + bootImage_ = null; + if (bootImageBuilder_ != null) { + bootImageBuilder_.dispose(); + bootImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder + getBootImageBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getBootImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder + getBootImageOrBuilder() { + if (bootImageBuilder_ != null) { + return bootImageBuilder_.getMessageOrBuilder(); + } else { + return bootImage_ == null + ? com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage + .getDefaultInstance() + : bootImage_; + } + } + /** + * + * + *
+     * Optional. Boot image metadata used for runtime upgradeability.
+     * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder> + getBootImageFieldBuilder() { + if (bootImageBuilder_ == null) { + bootImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage.Builder, + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder>( + getBootImage(), getParentForChildren(), isClean()); + bootImage_ = null; + } + return bootImageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.VirtualMachineConfig) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.VirtualMachineConfig) + private static final com.google.events.cloud.notebooks.v1.VirtualMachineConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.VirtualMachineConfig(); + } + + public static com.google.events.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java new file mode 100644 index 00000000..9cb07cb5 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java @@ -0,0 +1,791 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface VirtualMachineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.VirtualMachineConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + java.util.List getContainerImagesList(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + com.google.events.cloud.notebooks.v1.ContainerImage getContainerImages(int index); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + int getContainerImagesCount(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + java.util.List + getContainerImagesOrBuilderList(); + /** + * + * + *
+   * Optional. Use a list of container images to use as Kernels in the notebook
+   * instance.
+   * 
+ * + * repeated .google.events.cloud.notebooks.v1.ContainerImage container_images = 3; + */ + com.google.events.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder( + int index); + + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return Whether the dataDisk field is set. + */ + boolean hasDataDisk(); + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + * + * @return The dataDisk. + */ + com.google.events.cloud.notebooks.v1.LocalDisk getDataDisk(); + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.LocalDisk data_disk = 4; + */ + com.google.events.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder(); + + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + com.google.events.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * .google.events.cloud.notebooks.v1.EncryptionConfig encryption_config = 5; + */ + com.google.events.cloud.notebooks.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + * + * @return The shieldedInstanceConfig. + */ + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6; + * + */ + com.google.events.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + * + * @return The acceleratorConfig. + */ + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * .google.events.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7; + */ + com.google.events.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+   * * `projects/[project_id]/global/networks/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
+   * * `projects/[project_id]/global/networks/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9; + * + * @return The subnet. + */ + java.lang.String getSubnet(); + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9; + * + * @return The bytes for subnet. + */ + com.google.protobuf.ByteString getSubnetBytes(); + + /** + * + * + *
+   * Optional. If true, runtime will only have internal IP
+   * addresses. By default, runtimes are not restricted to internal IP
+   * addresses, and will have ephemeral external IP addresses assigned to each
+   * vm. This `internal_ip_only` restriction can only be enabled for
+   * subnetwork enabled networks, and all dependencies must be
+   * configured to be accessible without external IP addresses.
+   * 
+ * + * bool internal_ip_only = 10; + * + * @return The internalIpOnly. + */ + boolean getInternalIpOnly(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + int getGuestAttributesCount(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + boolean containsGuestAttributes(java.lang.String key); + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getGuestAttributes(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + java.util.Map getGuestAttributesMap(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + /* nullable */ + java.lang.String getGuestAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * map<string, string> guest_attributes = 14; + */ + java.lang.String getGuestAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + int getMetadataCount(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + /* nullable */ + java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine.
+   * (see [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The enum numeric value on the wire for nicType. + */ + int getNicTypeValue(); + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17; + * + * @return The nicType. + */ + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType(); + + /** + * + * + *
+   * Optional. Reserved IP Range name is used for VPC Peering.
+   * The subnetwork allocation will use the range *name* if it's assigned.
+   * Example: managed-notebooks-range-c
+   *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+   *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+   *       --global \
+   *       --prefix-length=24 \
+   *       --description="Google Cloud Managed Notebooks Range 24 c" \
+   *       --network=$NETWORK \
+   *       --addresses=192.168.0.0 \
+   *       --purpose=VPC_PEERING
+   * Field value will be: `managed-notebooks-range-c`
+   * 
+ * + * string reserved_ip_range = 18; + * + * @return The reservedIpRange. + */ + java.lang.String getReservedIpRange(); + /** + * + * + *
+   * Optional. Reserved IP Range name is used for VPC Peering.
+   * The subnetwork allocation will use the range *name* if it's assigned.
+   * Example: managed-notebooks-range-c
+   *     PEERING_RANGE_NAME_3=managed-notebooks-range-c
+   *     gcloud compute addresses create $PEERING_RANGE_NAME_3 \
+   *       --global \
+   *       --prefix-length=24 \
+   *       --description="Google Cloud Managed Notebooks Range 24 c" \
+   *       --network=$NETWORK \
+   *       --addresses=192.168.0.0 \
+   *       --purpose=VPC_PEERING
+   * Field value will be: `managed-notebooks-range-c`
+   * 
+ * + * string reserved_ip_range = 18; + * + * @return The bytes for reservedIpRange. + */ + com.google.protobuf.ByteString getReservedIpRangeBytes(); + + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * @return Whether the bootImage field is set. + */ + boolean hasBootImage(); + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + * + * @return The bootImage. + */ + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage getBootImage(); + /** + * + * + *
+   * Optional. Boot image metadata used for runtime upgradeability.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19; + */ + com.google.events.cloud.notebooks.v1.VirtualMachineConfig.BootImageOrBuilder + getBootImageOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineOrBuilder.java new file mode 100644 index 00000000..9762be49 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VirtualMachineOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface VirtualMachineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.VirtualMachine) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1; + * + * @return The instanceName. + */ + java.lang.String getInstanceName(); + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1; + * + * @return The bytes for instanceName. + */ + com.google.protobuf.ByteString getInstanceNameBytes(); + + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return Whether the virtualMachineConfig field is set. + */ + boolean hasVirtualMachineConfig(); + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return The virtualMachineConfig. + */ + com.google.events.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig(); + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.events.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + com.google.events.cloud.notebooks.v1.VirtualMachineConfigOrBuilder + getVirtualMachineConfigOrBuilder(); +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImage.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImage.java new file mode 100644 index 00000000..e740e3b8 --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImage.java @@ -0,0 +1,1192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a custom Compute Engine virtual machine image for starting a
+ * notebook instance with the environment installed directly on the VM.
+ * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VmImage} + */ +public final class VmImage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.events.cloud.notebooks.v1.VmImage) + VmImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmImage.newBuilder() to construct. + private VmImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmImage() { + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VmImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VmImage.class, + com.google.events.cloud.notebooks.v1.VmImage.Builder.class); + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public enum ImageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IMAGE_NAME(2), + IMAGE_FAMILY(3), + IMAGE_NOT_SET(0); + private final int value; + + private ImageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageCase valueOf(int value) { + return forNumber(value); + } + + public static ImageCase forNumber(int value) { + switch (value) { + case 2: + return IMAGE_NAME; + case 3: + return IMAGE_FAMILY; + case 0: + return IMAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs
+   * to. Format: `{project_id}`
+   * 
+ * + * string project = 1; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs
+   * to. Format: `{project_id}`
+   * 
+ * + * string project = 1; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_NAME_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + public boolean hasImageName() { + return imageCase_ == 2; + } + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + public java.lang.String getImageName() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + public com.google.protobuf.ByteString getImageNameBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_FAMILY_FIELD_NUMBER = 3; + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + public boolean hasImageFamily() { + return imageCase_ == 3; + } + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + public java.lang.String getImageFamily() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 3) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + public com.google.protobuf.ByteString getImageFamilyBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 3) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + } + if (imageCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, image_); + } + if (imageCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + } + if (imageCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, image_); + } + if (imageCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.events.cloud.notebooks.v1.VmImage)) { + return super.equals(obj); + } + com.google.events.cloud.notebooks.v1.VmImage other = + (com.google.events.cloud.notebooks.v1.VmImage) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getImageCase().equals(other.getImageCase())) return false; + switch (imageCase_) { + case 2: + if (!getImageName().equals(other.getImageName())) return false; + break; + case 3: + if (!getImageFamily().equals(other.getImageFamily())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + switch (imageCase_) { + case 2: + hash = (37 * hash) + IMAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getImageName().hashCode(); + break; + case 3: + hash = (37 * hash) + IMAGE_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getImageFamily().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.events.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.events.cloud.notebooks.v1.VmImage 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; + } + /** + * + * + *
+   * Definition of a custom Compute Engine virtual machine image for starting a
+   * notebook instance with the environment installed directly on the VM.
+   * 
+ * + * Protobuf type {@code google.events.cloud.notebooks.v1.VmImage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.notebooks.v1.VmImage) + com.google.events.cloud.notebooks.v1.VmImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VmImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.events.cloud.notebooks.v1.VmImage.class, + com.google.events.cloud.notebooks.v1.VmImage.Builder.class); + } + + // Construct using com.google.events.cloud.notebooks.v1.VmImage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + imageCase_ = 0; + image_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.events.cloud.notebooks.v1.Data + .internal_static_google_events_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getDefaultInstanceForType() { + return com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage build() { + com.google.events.cloud.notebooks.v1.VmImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage buildPartial() { + com.google.events.cloud.notebooks.v1.VmImage result = + new com.google.events.cloud.notebooks.v1.VmImage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.events.cloud.notebooks.v1.VmImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + } + + private void buildPartialOneofs(com.google.events.cloud.notebooks.v1.VmImage result) { + result.imageCase_ = imageCase_; + result.image_ = this.image_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.events.cloud.notebooks.v1.VmImage) { + return mergeFrom((com.google.events.cloud.notebooks.v1.VmImage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.events.cloud.notebooks.v1.VmImage other) { + if (other == com.google.events.cloud.notebooks.v1.VmImage.getDefaultInstance()) return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getImageCase()) { + case IMAGE_NAME: + { + imageCase_ = 2; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_FAMILY: + { + imageCase_ = 3; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 2; + image_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 3; + image_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public Builder clearImage() { + imageCase_ = 0; + image_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object project_ = ""; + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs
+     * to. Format: `{project_id}`
+     * 
+ * + * string project = 1; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs
+     * to. Format: `{project_id}`
+     * 
+ * + * string project = 1; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs
+     * to. Format: `{project_id}`
+     * 
+ * + * string project = 1; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs
+     * to. Format: `{project_id}`
+     * 
+ * + * string project = 1; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs
+     * to. Format: `{project_id}`
+     * 
+ * + * string project = 1; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + @java.lang.Override + public boolean hasImageName() { + return imageCase_ == 2; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + @java.lang.Override + public java.lang.String getImageName() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageNameBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @param value The imageName to set. + * @return This builder for chaining. + */ + public Builder setImageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearImageName() { + if (imageCase_ == 2) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @param value The bytes for imageName to set. + * @return This builder for chaining. + */ + public Builder setImageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + @java.lang.Override + public boolean hasImageFamily() { + return imageCase_ == 3; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + @java.lang.Override + public java.lang.String getImageFamily() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 3) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageFamilyBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 3) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @param value The imageFamily to set. + * @return This builder for chaining. + */ + public Builder setImageFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 3; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return This builder for chaining. + */ + public Builder clearImageFamily() { + if (imageCase_ == 3) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @param value The bytes for imageFamily to set. + * @return This builder for chaining. + */ + public Builder setImageFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 3; + image_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.events.cloud.notebooks.v1.VmImage) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.notebooks.v1.VmImage) + private static final com.google.events.cloud.notebooks.v1.VmImage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.events.cloud.notebooks.v1.VmImage(); + } + + public static com.google.events.cloud.notebooks.v1.VmImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.events.cloud.notebooks.v1.VmImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImageOrBuilder.java b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImageOrBuilder.java new file mode 100644 index 00000000..d61309dd --- /dev/null +++ b/google-cloudevent-types/src/main/java/com/google/events/cloud/notebooks/v1/VmImageOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/notebooks/v1/data.proto + +package com.google.events.cloud.notebooks.v1; + +public interface VmImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.notebooks.v1.VmImage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs
+   * to. Format: `{project_id}`
+   * 
+ * + * string project = 1; + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs
+   * to. Format: `{project_id}`
+   * 
+ * + * string project = 1; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + boolean hasImageName(); + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + java.lang.String getImageName(); + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + com.google.protobuf.ByteString getImageNameBytes(); + + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + boolean hasImageFamily(); + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + java.lang.String getImageFamily(); + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + com.google.protobuf.ByteString getImageFamilyBytes(); + + public com.google.events.cloud.notebooks.v1.VmImage.ImageCase getImageCase(); +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/datastore/v1/EntityEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/datastore/v1/EntityEventDataTest.java new file mode 100644 index 00000000..0165a069 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/datastore/v1/EntityEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.datastore.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class EntityEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("EntityEventData")) { + System.out.println(file); + String json = readFileAsString(file); + EntityEventData.Builder builder = EntityEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + EntityEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("EntityEventData")) { + System.out.println(file); + String json = readFileAsString(file); + EntityEventData.Builder builder = EntityEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + EntityEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataTest.java new file mode 100644 index 00000000..b7ec2799 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/networkmanagement/v1/ConnectivityTestEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.networkmanagement.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class ConnectivityTestEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("ConnectivityTestEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ConnectivityTestEventData.Builder builder = ConnectivityTestEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + ConnectivityTestEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("ConnectivityTestEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ConnectivityTestEventData.Builder builder = ConnectivityTestEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + ConnectivityTestEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataTest.java new file mode 100644 index 00000000..67356dae --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/EnvironmentEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.notebooks.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class EnvironmentEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("EnvironmentEventData")) { + System.out.println(file); + String json = readFileAsString(file); + EnvironmentEventData.Builder builder = EnvironmentEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + EnvironmentEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("EnvironmentEventData")) { + System.out.println(file); + String json = readFileAsString(file); + EnvironmentEventData.Builder builder = EnvironmentEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + EnvironmentEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataTest.java new file mode 100644 index 00000000..23d96370 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ExecutionEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.notebooks.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class ExecutionEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("ExecutionEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ExecutionEventData.Builder builder = ExecutionEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + ExecutionEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("ExecutionEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ExecutionEventData.Builder builder = ExecutionEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + ExecutionEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/InstanceEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/InstanceEventDataTest.java new file mode 100644 index 00000000..3a006fa0 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/InstanceEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.notebooks.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class InstanceEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("InstanceEventData")) { + System.out.println(file); + String json = readFileAsString(file); + InstanceEventData.Builder builder = InstanceEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + InstanceEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("InstanceEventData")) { + System.out.println(file); + String json = readFileAsString(file); + InstanceEventData.Builder builder = InstanceEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + InstanceEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataTest.java new file mode 100644 index 00000000..3caf7710 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/RuntimeEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.notebooks.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class RuntimeEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("RuntimeEventData")) { + System.out.println(file); + String json = readFileAsString(file); + RuntimeEventData.Builder builder = RuntimeEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + RuntimeEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("RuntimeEventData")) { + System.out.println(file); + String json = readFileAsString(file); + RuntimeEventData.Builder builder = RuntimeEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + RuntimeEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataTest.java b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataTest.java new file mode 100644 index 00000000..be947d43 --- /dev/null +++ b/google-cloudevent-types/src/test/java/com/google/events/cloud/notebooks/v1/ScheduleEventDataTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by protoc-gen-java-snowpea. DO NOT EDIT. + +package com.google.events.cloud.notebooks.v1; + +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; + +public class ScheduleEventDataTest { + @Test + public void testStrictUnmarshal() throws Exception { + for (String file : getDataFiles("ScheduleEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ScheduleEventData.Builder builder = ScheduleEventData.newBuilder(); + JsonFormat.parser().merge(json, builder); + ScheduleEventData data = builder.build(); + assertTrue(data != null); + } + } + + @Test + public void testUnmarshal() throws Exception { + for (String file : getDataFiles("ScheduleEventData")) { + System.out.println(file); + String json = readFileAsString(file); + ScheduleEventData.Builder builder = ScheduleEventData.newBuilder(); + JsonFormat.parser().ignoringUnknownFields().merge(json, builder); + ScheduleEventData data = builder.build(); + assertTrue(data != null); + } + } + + String testDataPath = + System.getenv().getOrDefault("TEST_DATA_PATH", "../../google-cloudevents/testdata/"); + + public static String readFileAsString(String file) throws Exception { + return new String(Files.readAllBytes(Paths.get(file))); + } + + public List getDataFiles(String eventType) throws IOException { + try (Stream walk = Files.walk(Paths.get(testDataPath)); ) { + List result = + walk.filter(Files::isRegularFile).map(x -> x.toString()).collect(Collectors.toList()); + return result.stream().filter(file -> file.contains(eventType)).collect(Collectors.toList()); + } + } +} diff --git a/pom.xml b/pom.xml index 14809455..ad388610 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.google.cloud google-cloudevent-types-parent pom - 0.12.0 + 0.13.0 Google CloudEvents Types for Java Parent https://github.com/googleapis/google-cloudevents-java diff --git a/protoc-gen-java-snowpea/pom.xml b/protoc-gen-java-snowpea/pom.xml index 8e9a1d1b..b13063c3 100644 --- a/protoc-gen-java-snowpea/pom.xml +++ b/protoc-gen-java-snowpea/pom.xml @@ -13,7 +13,7 @@ com.google.cloud google-cloudevent-types-parent - 0.12.0 + 0.13.0 diff --git a/versions.txt b/versions.txt index 94b52629..1ef9fbba 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloudevent-types:0.12.0:0.12.0 +google-cloudevent-types:0.13.0:0.13.0