com.google.appengine.v1.Resources Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-appengine-admin-v1 Show documentation
Show all versions of proto-google-cloud-appengine-admin-v1 Show documentation
Proto library for google-cloud-appengine-admin
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/appengine/v1/version.proto
// Protobuf Java Version: 3.25.5
package com.google.appengine.v1;
/**
*
*
*
* Machine resources for a version.
*
*
* Protobuf type {@code google.appengine.v1.Resources}
*/
public final class Resources extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.appengine.v1.Resources)
ResourcesOrBuilder {
private static final long serialVersionUID = 0L;
// Use Resources.newBuilder() to construct.
private Resources(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Resources() {
volumes_ = java.util.Collections.emptyList();
kmsKeyReference_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Resources();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.appengine.v1.VersionProto
.internal_static_google_appengine_v1_Resources_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.VersionProto
.internal_static_google_appengine_v1_Resources_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.Resources.class,
com.google.appengine.v1.Resources.Builder.class);
}
public static final int CPU_FIELD_NUMBER = 1;
private double cpu_ = 0D;
/**
*
*
*
* Number of CPU cores needed.
*
*
* double cpu = 1;
*
* @return The cpu.
*/
@java.lang.Override
public double getCpu() {
return cpu_;
}
public static final int DISK_GB_FIELD_NUMBER = 2;
private double diskGb_ = 0D;
/**
*
*
*
* Disk size (GB) needed.
*
*
* double disk_gb = 2;
*
* @return The diskGb.
*/
@java.lang.Override
public double getDiskGb() {
return diskGb_;
}
public static final int MEMORY_GB_FIELD_NUMBER = 3;
private double memoryGb_ = 0D;
/**
*
*
*
* Memory (GB) needed.
*
*
* double memory_gb = 3;
*
* @return The memoryGb.
*/
@java.lang.Override
public double getMemoryGb() {
return memoryGb_;
}
public static final int VOLUMES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List volumes_;
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
@java.lang.Override
public java.util.List getVolumesList() {
return volumes_;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
@java.lang.Override
public java.util.List extends com.google.appengine.v1.VolumeOrBuilder>
getVolumesOrBuilderList() {
return volumes_;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
@java.lang.Override
public int getVolumesCount() {
return volumes_.size();
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
@java.lang.Override
public com.google.appengine.v1.Volume getVolumes(int index) {
return volumes_.get(index);
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
@java.lang.Override
public com.google.appengine.v1.VolumeOrBuilder getVolumesOrBuilder(int index) {
return volumes_.get(index);
}
public static final int KMS_KEY_REFERENCE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object kmsKeyReference_ = "";
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @return The kmsKeyReference.
*/
@java.lang.Override
public java.lang.String getKmsKeyReference() {
java.lang.Object ref = kmsKeyReference_;
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();
kmsKeyReference_ = s;
return s;
}
}
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @return The bytes for kmsKeyReference.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKmsKeyReferenceBytes() {
java.lang.Object ref = kmsKeyReference_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyReference_ = 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 (java.lang.Double.doubleToRawLongBits(cpu_) != 0) {
output.writeDouble(1, cpu_);
}
if (java.lang.Double.doubleToRawLongBits(diskGb_) != 0) {
output.writeDouble(2, diskGb_);
}
if (java.lang.Double.doubleToRawLongBits(memoryGb_) != 0) {
output.writeDouble(3, memoryGb_);
}
for (int i = 0; i < volumes_.size(); i++) {
output.writeMessage(4, volumes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyReference_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kmsKeyReference_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(cpu_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, cpu_);
}
if (java.lang.Double.doubleToRawLongBits(diskGb_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, diskGb_);
}
if (java.lang.Double.doubleToRawLongBits(memoryGb_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, memoryGb_);
}
for (int i = 0; i < volumes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, volumes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyReference_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, kmsKeyReference_);
}
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.appengine.v1.Resources)) {
return super.equals(obj);
}
com.google.appengine.v1.Resources other = (com.google.appengine.v1.Resources) obj;
if (java.lang.Double.doubleToLongBits(getCpu())
!= java.lang.Double.doubleToLongBits(other.getCpu())) return false;
if (java.lang.Double.doubleToLongBits(getDiskGb())
!= java.lang.Double.doubleToLongBits(other.getDiskGb())) return false;
if (java.lang.Double.doubleToLongBits(getMemoryGb())
!= java.lang.Double.doubleToLongBits(other.getMemoryGb())) return false;
if (!getVolumesList().equals(other.getVolumesList())) return false;
if (!getKmsKeyReference().equals(other.getKmsKeyReference())) 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) + CPU_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getCpu()));
hash = (37 * hash) + DISK_GB_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getDiskGb()));
hash = (37 * hash) + MEMORY_GB_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMemoryGb()));
if (getVolumesCount() > 0) {
hash = (37 * hash) + VOLUMES_FIELD_NUMBER;
hash = (53 * hash) + getVolumesList().hashCode();
}
hash = (37 * hash) + KMS_KEY_REFERENCE_FIELD_NUMBER;
hash = (53 * hash) + getKmsKeyReference().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.appengine.v1.Resources parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.Resources parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.Resources parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.Resources parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.Resources parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.Resources 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.appengine.v1.Resources 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;
}
/**
*
*
*
* Machine resources for a version.
*
*
* Protobuf type {@code google.appengine.v1.Resources}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.appengine.v1.Resources)
com.google.appengine.v1.ResourcesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.appengine.v1.VersionProto
.internal_static_google_appengine_v1_Resources_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.VersionProto
.internal_static_google_appengine_v1_Resources_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.Resources.class,
com.google.appengine.v1.Resources.Builder.class);
}
// Construct using com.google.appengine.v1.Resources.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
cpu_ = 0D;
diskGb_ = 0D;
memoryGb_ = 0D;
if (volumesBuilder_ == null) {
volumes_ = java.util.Collections.emptyList();
} else {
volumes_ = null;
volumesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
kmsKeyReference_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.appengine.v1.VersionProto
.internal_static_google_appengine_v1_Resources_descriptor;
}
@java.lang.Override
public com.google.appengine.v1.Resources getDefaultInstanceForType() {
return com.google.appengine.v1.Resources.getDefaultInstance();
}
@java.lang.Override
public com.google.appengine.v1.Resources build() {
com.google.appengine.v1.Resources result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.appengine.v1.Resources buildPartial() {
com.google.appengine.v1.Resources result = new com.google.appengine.v1.Resources(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.appengine.v1.Resources result) {
if (volumesBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
volumes_ = java.util.Collections.unmodifiableList(volumes_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.volumes_ = volumes_;
} else {
result.volumes_ = volumesBuilder_.build();
}
}
private void buildPartial0(com.google.appengine.v1.Resources result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.cpu_ = cpu_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.diskGb_ = diskGb_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.memoryGb_ = memoryGb_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.kmsKeyReference_ = kmsKeyReference_;
}
}
@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.appengine.v1.Resources) {
return mergeFrom((com.google.appengine.v1.Resources) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.appengine.v1.Resources other) {
if (other == com.google.appengine.v1.Resources.getDefaultInstance()) return this;
if (other.getCpu() != 0D) {
setCpu(other.getCpu());
}
if (other.getDiskGb() != 0D) {
setDiskGb(other.getDiskGb());
}
if (other.getMemoryGb() != 0D) {
setMemoryGb(other.getMemoryGb());
}
if (volumesBuilder_ == null) {
if (!other.volumes_.isEmpty()) {
if (volumes_.isEmpty()) {
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureVolumesIsMutable();
volumes_.addAll(other.volumes_);
}
onChanged();
}
} else {
if (!other.volumes_.isEmpty()) {
if (volumesBuilder_.isEmpty()) {
volumesBuilder_.dispose();
volumesBuilder_ = null;
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00000008);
volumesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getVolumesFieldBuilder()
: null;
} else {
volumesBuilder_.addAllMessages(other.volumes_);
}
}
}
if (!other.getKmsKeyReference().isEmpty()) {
kmsKeyReference_ = other.kmsKeyReference_;
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 9:
{
cpu_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17:
{
diskGb_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 25:
{
memoryGb_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 34:
{
com.google.appengine.v1.Volume m =
input.readMessage(com.google.appengine.v1.Volume.parser(), extensionRegistry);
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(m);
} else {
volumesBuilder_.addMessage(m);
}
break;
} // case 34
case 42:
{
kmsKeyReference_ = 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 double cpu_;
/**
*
*
*
* Number of CPU cores needed.
*
*
* double cpu = 1;
*
* @return The cpu.
*/
@java.lang.Override
public double getCpu() {
return cpu_;
}
/**
*
*
*
* Number of CPU cores needed.
*
*
* double cpu = 1;
*
* @param value The cpu to set.
* @return This builder for chaining.
*/
public Builder setCpu(double value) {
cpu_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Number of CPU cores needed.
*
*
* double cpu = 1;
*
* @return This builder for chaining.
*/
public Builder clearCpu() {
bitField0_ = (bitField0_ & ~0x00000001);
cpu_ = 0D;
onChanged();
return this;
}
private double diskGb_;
/**
*
*
*
* Disk size (GB) needed.
*
*
* double disk_gb = 2;
*
* @return The diskGb.
*/
@java.lang.Override
public double getDiskGb() {
return diskGb_;
}
/**
*
*
*
* Disk size (GB) needed.
*
*
* double disk_gb = 2;
*
* @param value The diskGb to set.
* @return This builder for chaining.
*/
public Builder setDiskGb(double value) {
diskGb_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Disk size (GB) needed.
*
*
* double disk_gb = 2;
*
* @return This builder for chaining.
*/
public Builder clearDiskGb() {
bitField0_ = (bitField0_ & ~0x00000002);
diskGb_ = 0D;
onChanged();
return this;
}
private double memoryGb_;
/**
*
*
*
* Memory (GB) needed.
*
*
* double memory_gb = 3;
*
* @return The memoryGb.
*/
@java.lang.Override
public double getMemoryGb() {
return memoryGb_;
}
/**
*
*
*
* Memory (GB) needed.
*
*
* double memory_gb = 3;
*
* @param value The memoryGb to set.
* @return This builder for chaining.
*/
public Builder setMemoryGb(double value) {
memoryGb_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Memory (GB) needed.
*
*
* double memory_gb = 3;
*
* @return This builder for chaining.
*/
public Builder clearMemoryGb() {
bitField0_ = (bitField0_ & ~0x00000004);
memoryGb_ = 0D;
onChanged();
return this;
}
private java.util.List volumes_ =
java.util.Collections.emptyList();
private void ensureVolumesIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
volumes_ = new java.util.ArrayList(volumes_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.appengine.v1.Volume,
com.google.appengine.v1.Volume.Builder,
com.google.appengine.v1.VolumeOrBuilder>
volumesBuilder_;
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public java.util.List getVolumesList() {
if (volumesBuilder_ == null) {
return java.util.Collections.unmodifiableList(volumes_);
} else {
return volumesBuilder_.getMessageList();
}
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public int getVolumesCount() {
if (volumesBuilder_ == null) {
return volumes_.size();
} else {
return volumesBuilder_.getCount();
}
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public com.google.appengine.v1.Volume getVolumes(int index) {
if (volumesBuilder_ == null) {
return volumes_.get(index);
} else {
return volumesBuilder_.getMessage(index);
}
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder setVolumes(int index, com.google.appengine.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.set(index, value);
onChanged();
} else {
volumesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder setVolumes(int index, com.google.appengine.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.set(index, builderForValue.build());
onChanged();
} else {
volumesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder addVolumes(com.google.appengine.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.add(value);
onChanged();
} else {
volumesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder addVolumes(int index, com.google.appengine.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.add(index, value);
onChanged();
} else {
volumesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder addVolumes(com.google.appengine.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(builderForValue.build());
onChanged();
} else {
volumesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder addVolumes(int index, com.google.appengine.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(index, builderForValue.build());
onChanged();
} else {
volumesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder addAllVolumes(
java.lang.Iterable extends com.google.appengine.v1.Volume> values) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_);
onChanged();
} else {
volumesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder clearVolumes() {
if (volumesBuilder_ == null) {
volumes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
volumesBuilder_.clear();
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public Builder removeVolumes(int index) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.remove(index);
onChanged();
} else {
volumesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public com.google.appengine.v1.Volume.Builder getVolumesBuilder(int index) {
return getVolumesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public com.google.appengine.v1.VolumeOrBuilder getVolumesOrBuilder(int index) {
if (volumesBuilder_ == null) {
return volumes_.get(index);
} else {
return volumesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public java.util.List extends com.google.appengine.v1.VolumeOrBuilder>
getVolumesOrBuilderList() {
if (volumesBuilder_ != null) {
return volumesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(volumes_);
}
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public com.google.appengine.v1.Volume.Builder addVolumesBuilder() {
return getVolumesFieldBuilder()
.addBuilder(com.google.appengine.v1.Volume.getDefaultInstance());
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public com.google.appengine.v1.Volume.Builder addVolumesBuilder(int index) {
return getVolumesFieldBuilder()
.addBuilder(index, com.google.appengine.v1.Volume.getDefaultInstance());
}
/**
*
*
*
* User specified volumes.
*
*
* repeated .google.appengine.v1.Volume volumes = 4;
*/
public java.util.List getVolumesBuilderList() {
return getVolumesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.appengine.v1.Volume,
com.google.appengine.v1.Volume.Builder,
com.google.appengine.v1.VolumeOrBuilder>
getVolumesFieldBuilder() {
if (volumesBuilder_ == null) {
volumesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.appengine.v1.Volume,
com.google.appengine.v1.Volume.Builder,
com.google.appengine.v1.VolumeOrBuilder>(
volumes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
volumes_ = null;
}
return volumesBuilder_;
}
private java.lang.Object kmsKeyReference_ = "";
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @return The kmsKeyReference.
*/
public java.lang.String getKmsKeyReference() {
java.lang.Object ref = kmsKeyReference_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kmsKeyReference_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @return The bytes for kmsKeyReference.
*/
public com.google.protobuf.ByteString getKmsKeyReferenceBytes() {
java.lang.Object ref = kmsKeyReference_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyReference_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @param value The kmsKeyReference to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyReference(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kmsKeyReference_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @return This builder for chaining.
*/
public Builder clearKmsKeyReference() {
kmsKeyReference_ = getDefaultInstance().getKmsKeyReference();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* The name of the encryption key that is stored in Google Cloud KMS.
* Only should be used by Cloud Composer to encrypt the vm disk
*
*
* string kms_key_reference = 5;
*
* @param value The bytes for kmsKeyReference to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyReferenceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kmsKeyReference_ = 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.appengine.v1.Resources)
}
// @@protoc_insertion_point(class_scope:google.appengine.v1.Resources)
private static final com.google.appengine.v1.Resources DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.appengine.v1.Resources();
}
public static com.google.appengine.v1.Resources getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Resources 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.appengine.v1.Resources getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy