
com.google.cloud.compute.v1.InstanceGroup Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;
/**
*
*
*
* Represents an Instance Group resource. Instance Groups can be used to configure a target for load balancing. Instance groups can either be managed or unmanaged. To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead. Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups. For more information, read Instance groups.
*
*
* Protobuf type {@code google.cloud.compute.v1.InstanceGroup}
*/
public final class InstanceGroup extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.InstanceGroup)
InstanceGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstanceGroup.newBuilder() to construct.
private InstanceGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InstanceGroup() {
creationTimestamp_ = "";
description_ = "";
fingerprint_ = "";
kind_ = "";
name_ = "";
namedPorts_ = java.util.Collections.emptyList();
network_ = "";
region_ = "";
selfLink_ = "";
subnetwork_ = "";
zone_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new InstanceGroup();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_InstanceGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_InstanceGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.InstanceGroup.class,
com.google.cloud.compute.v1.InstanceGroup.Builder.class);
}
private int bitField0_;
public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
@SuppressWarnings("serial")
private volatile java.lang.Object creationTimestamp_ = "";
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
@java.lang.Override
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
@java.lang.Override
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
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();
creationTimestamp_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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 FINGERPRINT_FIELD_NUMBER = 234678500;
@SuppressWarnings("serial")
private volatile java.lang.Object fingerprint_ = "";
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return Whether the fingerprint field is set.
*/
@java.lang.Override
public boolean hasFingerprint() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return The fingerprint.
*/
@java.lang.Override
public java.lang.String getFingerprint() {
java.lang.Object ref = fingerprint_;
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();
fingerprint_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return The bytes for fingerprint.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFingerprintBytes() {
java.lang.Object ref = fingerprint_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fingerprint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 3355;
private long id_ = 0L;
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int KIND_FIELD_NUMBER = 3292052;
@SuppressWarnings("serial")
private volatile java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
@java.lang.Override
public boolean hasKind() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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 NAME_FIELD_NUMBER = 3373707;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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 NAMED_PORTS_FIELD_NUMBER = 427598732;
@SuppressWarnings("serial")
private java.util.List namedPorts_;
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
@java.lang.Override
public java.util.List getNamedPortsList() {
return namedPorts_;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsOrBuilderList() {
return namedPorts_;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
@java.lang.Override
public int getNamedPortsCount() {
return namedPorts_.size();
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
@java.lang.Override
public com.google.cloud.compute.v1.NamedPort getNamedPorts(int index) {
return namedPorts_.get(index);
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
@java.lang.Override
public com.google.cloud.compute.v1.NamedPortOrBuilder getNamedPortsOrBuilder(int index) {
return namedPorts_.get(index);
}
public static final int NETWORK_FIELD_NUMBER = 232872494;
@SuppressWarnings("serial")
private volatile java.lang.Object network_ = "";
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @return Whether the network field is set.
*/
@java.lang.Override
public boolean hasNetwork() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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 REGION_FIELD_NUMBER = 138946292;
@SuppressWarnings("serial")
private volatile java.lang.Object region_ = "";
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
@java.lang.Override
public boolean hasRegion() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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 SELF_LINK_FIELD_NUMBER = 456214797;
@SuppressWarnings("serial")
private volatile java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
@java.lang.Override
public boolean hasSelfLink() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
@java.lang.Override
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
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();
selfLink_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SIZE_FIELD_NUMBER = 3530753;
private int size_ = 0;
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @return Whether the size field is set.
*/
@java.lang.Override
public boolean hasSize() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @return The size.
*/
@java.lang.Override
public int getSize() {
return size_;
}
public static final int SUBNETWORK_FIELD_NUMBER = 307827694;
@SuppressWarnings("serial")
private volatile java.lang.Object subnetwork_ = "";
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return Whether the subnetwork field is set.
*/
@java.lang.Override
public boolean hasSubnetwork() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return The subnetwork.
*/
@java.lang.Override
public java.lang.String getSubnetwork() {
java.lang.Object ref = subnetwork_;
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();
subnetwork_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return The bytes for subnetwork.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSubnetworkBytes() {
java.lang.Object ref = subnetwork_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
subnetwork_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ZONE_FIELD_NUMBER = 3744684;
@SuppressWarnings("serial")
private volatile java.lang.Object zone_ = "";
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @return Whether the zone field is set.
*/
@java.lang.Override
public boolean hasZone() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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 URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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;
}
}
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_ & 0x00000008) != 0)) {
output.writeUInt64(3355, id_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeInt32(3530753, size_);
}
if (((bitField0_ & 0x00000800) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000080) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_);
}
if (((bitField0_ & 0x00000400) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
}
for (int i = 0; i < namedPorts_.size(); i++) {
output.writeMessage(427598732, namedPorts_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3530753, size_);
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_);
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
}
for (int i = 0; i < namedPorts_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(427598732, namedPorts_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.compute.v1.InstanceGroup)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.InstanceGroup other =
(com.google.cloud.compute.v1.InstanceGroup) obj;
if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
if (hasCreationTimestamp()) {
if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription().equals(other.getDescription())) return false;
}
if (hasFingerprint() != other.hasFingerprint()) return false;
if (hasFingerprint()) {
if (!getFingerprint().equals(other.getFingerprint())) return false;
}
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId() != other.getId()) return false;
}
if (hasKind() != other.hasKind()) return false;
if (hasKind()) {
if (!getKind().equals(other.getKind())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName().equals(other.getName())) return false;
}
if (!getNamedPortsList().equals(other.getNamedPortsList())) return false;
if (hasNetwork() != other.hasNetwork()) return false;
if (hasNetwork()) {
if (!getNetwork().equals(other.getNetwork())) return false;
}
if (hasRegion() != other.hasRegion()) return false;
if (hasRegion()) {
if (!getRegion().equals(other.getRegion())) return false;
}
if (hasSelfLink() != other.hasSelfLink()) return false;
if (hasSelfLink()) {
if (!getSelfLink().equals(other.getSelfLink())) return false;
}
if (hasSize() != other.hasSize()) return false;
if (hasSize()) {
if (getSize() != other.getSize()) return false;
}
if (hasSubnetwork() != other.hasSubnetwork()) return false;
if (hasSubnetwork()) {
if (!getSubnetwork().equals(other.getSubnetwork())) return false;
}
if (hasZone() != other.hasZone()) return false;
if (hasZone()) {
if (!getZone().equals(other.getZone())) 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 (hasCreationTimestamp()) {
hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getCreationTimestamp().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasFingerprint()) {
hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
hash = (53 * hash) + getFingerprint().hashCode();
}
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
}
if (hasKind()) {
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getNamedPortsCount() > 0) {
hash = (37 * hash) + NAMED_PORTS_FIELD_NUMBER;
hash = (53 * hash) + getNamedPortsList().hashCode();
}
if (hasNetwork()) {
hash = (37 * hash) + NETWORK_FIELD_NUMBER;
hash = (53 * hash) + getNetwork().hashCode();
}
if (hasRegion()) {
hash = (37 * hash) + REGION_FIELD_NUMBER;
hash = (53 * hash) + getRegion().hashCode();
}
if (hasSelfLink()) {
hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
hash = (53 * hash) + getSelfLink().hashCode();
}
if (hasSize()) {
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + getSize();
}
if (hasSubnetwork()) {
hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
hash = (53 * hash) + getSubnetwork().hashCode();
}
if (hasZone()) {
hash = (37 * hash) + ZONE_FIELD_NUMBER;
hash = (53 * hash) + getZone().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.compute.v1.InstanceGroup parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.InstanceGroup parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.InstanceGroup parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.compute.v1.InstanceGroup 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;
}
/**
*
*
*
* Represents an Instance Group resource. Instance Groups can be used to configure a target for load balancing. Instance groups can either be managed or unmanaged. To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead. Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups. For more information, read Instance groups.
*
*
* Protobuf type {@code google.cloud.compute.v1.InstanceGroup}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.InstanceGroup)
com.google.cloud.compute.v1.InstanceGroupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_InstanceGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_InstanceGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.InstanceGroup.class,
com.google.cloud.compute.v1.InstanceGroup.Builder.class);
}
// Construct using com.google.cloud.compute.v1.InstanceGroup.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
creationTimestamp_ = "";
description_ = "";
fingerprint_ = "";
id_ = 0L;
kind_ = "";
name_ = "";
if (namedPortsBuilder_ == null) {
namedPorts_ = java.util.Collections.emptyList();
} else {
namedPorts_ = null;
namedPortsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
network_ = "";
region_ = "";
selfLink_ = "";
size_ = 0;
subnetwork_ = "";
zone_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_InstanceGroup_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.InstanceGroup getDefaultInstanceForType() {
return com.google.cloud.compute.v1.InstanceGroup.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.InstanceGroup build() {
com.google.cloud.compute.v1.InstanceGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.InstanceGroup buildPartial() {
com.google.cloud.compute.v1.InstanceGroup result =
new com.google.cloud.compute.v1.InstanceGroup(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.compute.v1.InstanceGroup result) {
if (namedPortsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.namedPorts_ = namedPorts_;
} else {
result.namedPorts_ = namedPortsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.compute.v1.InstanceGroup result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.creationTimestamp_ = creationTimestamp_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.fingerprint_ = fingerprint_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.kind_ = kind_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.network_ = network_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.region_ = region_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.selfLink_ = selfLink_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.size_ = size_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.subnetwork_ = subnetwork_;
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.zone_ = zone_;
to_bitField0_ |= 0x00000800;
}
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.cloud.compute.v1.InstanceGroup) {
return mergeFrom((com.google.cloud.compute.v1.InstanceGroup) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroup other) {
if (other == com.google.cloud.compute.v1.InstanceGroup.getDefaultInstance()) return this;
if (other.hasCreationTimestamp()) {
creationTimestamp_ = other.creationTimestamp_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasFingerprint()) {
fingerprint_ = other.fingerprint_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasId()) {
setId(other.getId());
}
if (other.hasKind()) {
kind_ = other.kind_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000020;
onChanged();
}
if (namedPortsBuilder_ == null) {
if (!other.namedPorts_.isEmpty()) {
if (namedPorts_.isEmpty()) {
namedPorts_ = other.namedPorts_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureNamedPortsIsMutable();
namedPorts_.addAll(other.namedPorts_);
}
onChanged();
}
} else {
if (!other.namedPorts_.isEmpty()) {
if (namedPortsBuilder_.isEmpty()) {
namedPortsBuilder_.dispose();
namedPortsBuilder_ = null;
namedPorts_ = other.namedPorts_;
bitField0_ = (bitField0_ & ~0x00000040);
namedPortsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getNamedPortsFieldBuilder()
: null;
} else {
namedPortsBuilder_.addAllMessages(other.namedPorts_);
}
}
}
if (other.hasNetwork()) {
network_ = other.network_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.hasRegion()) {
region_ = other.region_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasSelfLink()) {
selfLink_ = other.selfLink_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasSize()) {
setSize(other.getSize());
}
if (other.hasSubnetwork()) {
subnetwork_ = other.subnetwork_;
bitField0_ |= 0x00000800;
onChanged();
}
if (other.hasZone()) {
zone_ = other.zone_;
bitField0_ |= 0x00001000;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 26840:
{
id_ = input.readUInt64();
bitField0_ |= 0x00000008;
break;
} // case 26840
case 26336418:
{
kind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 26336418
case 26989658:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 26989658
case 28246024:
{
size_ = input.readInt32();
bitField0_ |= 0x00000400;
break;
} // case 28246024
case 29957474:
{
zone_ = input.readStringRequireUtf8();
bitField0_ |= 0x00001000;
break;
} // case 29957474
case 244202930:
{
creationTimestamp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 244202930
case 1111570338:
{
region_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 1111570338
case 1862979954:
{
network_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 1862979954
case 1877428002:
{
fingerprint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 1877428002
case -1832345742:
{
subnetwork_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case -1832345742
case -911466526:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case -911466526
case -874177438:
{
com.google.cloud.compute.v1.NamedPort m =
input.readMessage(
com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry);
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
namedPorts_.add(m);
} else {
namedPortsBuilder_.addMessage(m);
}
break;
} // case -874177438
case -645248918:
{
selfLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case -645248918
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 creationTimestamp_ = "";
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
creationTimestamp_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestamp(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
creationTimestamp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return This builder for chaining.
*/
public Builder clearCreationTimestamp() {
creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The creation timestamp for this instance group in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The bytes for creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
creationTimestamp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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;
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @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 java.lang.Object fingerprint_ = "";
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return Whether the fingerprint field is set.
*/
public boolean hasFingerprint() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return The fingerprint.
*/
public java.lang.String getFingerprint() {
java.lang.Object ref = fingerprint_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fingerprint_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return The bytes for fingerprint.
*/
public com.google.protobuf.ByteString getFingerprintBytes() {
java.lang.Object ref = fingerprint_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fingerprint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @param value The fingerprint to set.
* @return This builder for chaining.
*/
public Builder setFingerprint(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fingerprint_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @return This builder for chaining.
*/
public Builder clearFingerprint() {
fingerprint_ = getDefaultInstance().getFingerprint();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
*
*
* optional string fingerprint = 234678500;
*
* @param value The bytes for fingerprint to set.
* @return This builder for chaining.
*/
public Builder setFingerprintBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fingerprint_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private long id_;
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] A unique identifier for this instance group, generated by the server.
*
*
* optional uint64 id = 3355;
*
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000008);
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
*
*
* optional string kind = 3292052;
*
* @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_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
*
*
* optional string name = 3373707;
*
* @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_ |= 0x00000020;
onChanged();
return this;
}
private java.util.List namedPorts_ =
java.util.Collections.emptyList();
private void ensureNamedPortsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
namedPorts_ = new java.util.ArrayList(namedPorts_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.NamedPort,
com.google.cloud.compute.v1.NamedPort.Builder,
com.google.cloud.compute.v1.NamedPortOrBuilder>
namedPortsBuilder_;
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public java.util.List getNamedPortsList() {
if (namedPortsBuilder_ == null) {
return java.util.Collections.unmodifiableList(namedPorts_);
} else {
return namedPortsBuilder_.getMessageList();
}
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public int getNamedPortsCount() {
if (namedPortsBuilder_ == null) {
return namedPorts_.size();
} else {
return namedPortsBuilder_.getCount();
}
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public com.google.cloud.compute.v1.NamedPort getNamedPorts(int index) {
if (namedPortsBuilder_ == null) {
return namedPorts_.get(index);
} else {
return namedPortsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder setNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value) {
if (namedPortsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNamedPortsIsMutable();
namedPorts_.set(index, value);
onChanged();
} else {
namedPortsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder setNamedPorts(
int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
namedPorts_.set(index, builderForValue.build());
onChanged();
} else {
namedPortsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder addNamedPorts(com.google.cloud.compute.v1.NamedPort value) {
if (namedPortsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNamedPortsIsMutable();
namedPorts_.add(value);
onChanged();
} else {
namedPortsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder addNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value) {
if (namedPortsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNamedPortsIsMutable();
namedPorts_.add(index, value);
onChanged();
} else {
namedPortsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder addNamedPorts(com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
namedPorts_.add(builderForValue.build());
onChanged();
} else {
namedPortsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder addNamedPorts(
int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
namedPorts_.add(index, builderForValue.build());
onChanged();
} else {
namedPortsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder addAllNamedPorts(
java.lang.Iterable extends com.google.cloud.compute.v1.NamedPort> values) {
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namedPorts_);
onChanged();
} else {
namedPortsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder clearNamedPorts() {
if (namedPortsBuilder_ == null) {
namedPorts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
namedPortsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public Builder removeNamedPorts(int index) {
if (namedPortsBuilder_ == null) {
ensureNamedPortsIsMutable();
namedPorts_.remove(index);
onChanged();
} else {
namedPortsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public com.google.cloud.compute.v1.NamedPort.Builder getNamedPortsBuilder(int index) {
return getNamedPortsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public com.google.cloud.compute.v1.NamedPortOrBuilder getNamedPortsOrBuilder(int index) {
if (namedPortsBuilder_ == null) {
return namedPorts_.get(index);
} else {
return namedPortsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public java.util.List extends com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsOrBuilderList() {
if (namedPortsBuilder_ != null) {
return namedPortsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(namedPorts_);
}
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public com.google.cloud.compute.v1.NamedPort.Builder addNamedPortsBuilder() {
return getNamedPortsFieldBuilder()
.addBuilder(com.google.cloud.compute.v1.NamedPort.getDefaultInstance());
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public com.google.cloud.compute.v1.NamedPort.Builder addNamedPortsBuilder(int index) {
return getNamedPortsFieldBuilder()
.addBuilder(index, com.google.cloud.compute.v1.NamedPort.getDefaultInstance());
}
/**
*
*
*
* Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
*
*
* repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;
*/
public java.util.List
getNamedPortsBuilderList() {
return getNamedPortsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.NamedPort,
com.google.cloud.compute.v1.NamedPort.Builder,
com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsFieldBuilder() {
if (namedPortsBuilder_ == null) {
namedPortsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.NamedPort,
com.google.cloud.compute.v1.NamedPort.Builder,
com.google.cloud.compute.v1.NamedPortOrBuilder>(
namedPorts_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean());
namedPorts_ = null;
}
return namedPortsBuilder_;
}
private java.lang.Object network_ = "";
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @return Whether the network field is set.
*/
public boolean hasNetwork() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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;
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @return This builder for chaining.
*/
public Builder clearNetwork() {
network_ = getDefaultInstance().getNetwork();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string network = 232872494;
*
* @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 region_ = "";
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
public boolean hasRegion() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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;
}
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @return This builder for chaining.
*/
public Builder clearRegion() {
region_ = getDefaultInstance().getRegion();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the region where the instance group is located (for regional resources).
*
*
* optional string region = 138946292;
*
* @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_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
public boolean hasSelfLink() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLink_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @param value The selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLink(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
selfLink_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @return This builder for chaining.
*/
public Builder clearSelfLink() {
selfLink_ = getDefaultInstance().getSelfLink();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL for this instance group. The server generates this URL.
*
*
* optional string self_link = 456214797;
*
* @param value The bytes for selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
selfLink_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private int size_;
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @return Whether the size field is set.
*/
@java.lang.Override
public boolean hasSize() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @return The size.
*/
@java.lang.Override
public int getSize() {
return size_;
}
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(int value) {
size_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The total number of instances in the instance group.
*
*
* optional int32 size = 3530753;
*
* @return This builder for chaining.
*/
public Builder clearSize() {
bitField0_ = (bitField0_ & ~0x00000400);
size_ = 0;
onChanged();
return this;
}
private java.lang.Object subnetwork_ = "";
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return Whether the subnetwork field is set.
*/
public boolean hasSubnetwork() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return The subnetwork.
*/
public java.lang.String getSubnetwork() {
java.lang.Object ref = subnetwork_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subnetwork_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return The bytes for subnetwork.
*/
public com.google.protobuf.ByteString getSubnetworkBytes() {
java.lang.Object ref = subnetwork_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
subnetwork_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @param value The subnetwork to set.
* @return This builder for chaining.
*/
public Builder setSubnetwork(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subnetwork_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @return This builder for chaining.
*/
public Builder clearSubnetwork() {
subnetwork_ = getDefaultInstance().getSubnetwork();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
*
*
* optional string subnetwork = 307827694;
*
* @param value The bytes for subnetwork to set.
* @return This builder for chaining.
*/
public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subnetwork_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
private java.lang.Object zone_ = "";
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @return Whether the zone field is set.
*/
public boolean hasZone() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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 URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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 URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @return This builder for chaining.
*/
public Builder clearZone() {
zone_ = getDefaultInstance().getZone();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the zone where the instance group is located (for zonal resources).
*
*
* optional string zone = 3744684;
*
* @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_ |= 0x00001000;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.InstanceGroup)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.InstanceGroup)
private static final com.google.cloud.compute.v1.InstanceGroup DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceGroup();
}
public static com.google.cloud.compute.v1.InstanceGroup getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstanceGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.compute.v1.InstanceGroup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy