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

com.google.cloud.compute.v1.InstanceTemplate Maven / Gradle / Ivy

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

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

/**
 *
 *
 * 
 * Represents an Instance Template resource. Google Compute Engine has two Instance Template resources: * [Global](/compute/docs/reference/rest/v1/instanceTemplates) * [Regional](/compute/docs/reference/rest/v1/regionInstanceTemplates) You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a regional instance template. To create VMs, managed instance groups, and reservations, you can use either global or regional instance templates. For more information, read Instance Templates.
 * 
* * Protobuf type {@code google.cloud.compute.v1.InstanceTemplate} */ public final class InstanceTemplate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.InstanceTemplate) InstanceTemplateOrBuilder { private static final long serialVersionUID = 0L; // Use InstanceTemplate.newBuilder() to construct. private InstanceTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private InstanceTemplate() { creationTimestamp_ = ""; description_ = ""; kind_ = ""; name_ = ""; region_ = ""; selfLink_ = ""; sourceInstance_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new InstanceTemplate(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.InstanceTemplate.class, com.google.cloud.compute.v1.InstanceTemplate.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 template 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 template 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 template 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 ID_FIELD_NUMBER = 3355; private long id_ = 0L; /** * * *
   * [Output Only] A unique identifier for this instance template. The server defines this identifier.
   * 
* * optional uint64 id = 3355; * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * [Output Only] A unique identifier for this instance template. The server defines this identifier.
   * 
* * 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#instanceTemplate for instance templates.
   * 
* * optional string kind = 3292052; * * @return Whether the kind field is set. */ @java.lang.Override public boolean hasKind() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
   * 
* * 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#instanceTemplate for instance templates.
   * 
* * 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_ = ""; /** * * *
   * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * optional string name = 3373707; * * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * 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; } } /** * * *
   * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * 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 PROPERTIES_FIELD_NUMBER = 147688755; private com.google.cloud.compute.v1.InstanceProperties properties_; /** * * *
   * The instance properties for this instance template.
   * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; * * @return Whether the properties field is set. */ @java.lang.Override public boolean hasProperties() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * The instance properties for this instance template.
   * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; * * @return The properties. */ @java.lang.Override public com.google.cloud.compute.v1.InstanceProperties getProperties() { return properties_ == null ? com.google.cloud.compute.v1.InstanceProperties.getDefaultInstance() : properties_; } /** * * *
   * The instance properties for this instance template.
   * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ @java.lang.Override public com.google.cloud.compute.v1.InstancePropertiesOrBuilder getPropertiesOrBuilder() { return properties_ == null ? com.google.cloud.compute.v1.InstanceProperties.getDefaultInstance() : properties_; } public static final int REGION_FIELD_NUMBER = 138946292; @SuppressWarnings("serial") private volatile java.lang.Object region_ = ""; /** * * *
   * [Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
   * 
* * optional string region = 138946292; * * @return Whether the region field is set. */ @java.lang.Override public boolean hasRegion() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
   * [Output Only] URL of the region where the instance template resides. Only applicable 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] URL of the region where the instance template resides. Only applicable 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 template. The server defines this URL.
   * 
* * optional string self_link = 456214797; * * @return Whether the selfLink field is set. */ @java.lang.Override public boolean hasSelfLink() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
   * [Output Only] The URL for this instance template. The server defines 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 template. The server defines 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 SOURCE_INSTANCE_FIELD_NUMBER = 396315705; @SuppressWarnings("serial") private volatile java.lang.Object sourceInstance_ = ""; /** * * *
   * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
   * 
* * optional string source_instance = 396315705; * * @return Whether the sourceInstance field is set. */ @java.lang.Override public boolean hasSourceInstance() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
   * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
   * 
* * optional string source_instance = 396315705; * * @return The sourceInstance. */ @java.lang.Override public java.lang.String getSourceInstance() { java.lang.Object ref = sourceInstance_; 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(); sourceInstance_ = s; return s; } } /** * * *
   * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
   * 
* * optional string source_instance = 396315705; * * @return The bytes for sourceInstance. */ @java.lang.Override public com.google.protobuf.ByteString getSourceInstanceBytes() { java.lang.Object ref = sourceInstance_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sourceInstance_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SOURCE_INSTANCE_PARAMS_FIELD_NUMBER = 135342156; private com.google.cloud.compute.v1.SourceInstanceParams sourceInstanceParams_; /** * * *
   * The source instance params to use to create this instance template.
   * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * * * @return Whether the sourceInstanceParams field is set. */ @java.lang.Override public boolean hasSourceInstanceParams() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
   * The source instance params to use to create this instance template.
   * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * * * @return The sourceInstanceParams. */ @java.lang.Override public com.google.cloud.compute.v1.SourceInstanceParams getSourceInstanceParams() { return sourceInstanceParams_ == null ? com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance() : sourceInstanceParams_; } /** * * *
   * The source instance params to use to create this instance template.
   * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ @java.lang.Override public com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder getSourceInstanceParamsOrBuilder() { return sourceInstanceParams_ == null ? com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance() : sourceInstanceParams_; } 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_ & 0x00000004) != 0)) { output.writeUInt64(3355, id_); } if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); } if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); } if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(135342156, getSourceInstanceParams()); } if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(147688755, getProperties()); } if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 396315705, sourceInstance_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } if (((bitField0_ & 0x00000080) != 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_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); } if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 135342156, getSourceInstanceParams()); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(147688755, getProperties()); } if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(396315705, sourceInstance_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } if (((bitField0_ & 0x00000080) != 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.InstanceTemplate)) { return super.equals(obj); } com.google.cloud.compute.v1.InstanceTemplate other = (com.google.cloud.compute.v1.InstanceTemplate) 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 (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 (hasProperties() != other.hasProperties()) return false; if (hasProperties()) { if (!getProperties().equals(other.getProperties())) 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 (hasSourceInstance() != other.hasSourceInstance()) return false; if (hasSourceInstance()) { if (!getSourceInstance().equals(other.getSourceInstance())) return false; } if (hasSourceInstanceParams() != other.hasSourceInstanceParams()) return false; if (hasSourceInstanceParams()) { if (!getSourceInstanceParams().equals(other.getSourceInstanceParams())) 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 (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 (hasProperties()) { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getProperties().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 (hasSourceInstance()) { hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getSourceInstance().hashCode(); } if (hasSourceInstanceParams()) { hash = (37 * hash) + SOURCE_INSTANCE_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getSourceInstanceParams().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.compute.v1.InstanceTemplate parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.InstanceTemplate 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.InstanceTemplate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.InstanceTemplate 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.InstanceTemplate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.InstanceTemplate 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.InstanceTemplate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.InstanceTemplate 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.InstanceTemplate parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.InstanceTemplate 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.InstanceTemplate 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.InstanceTemplate 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.InstanceTemplate 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 Template resource. Google Compute Engine has two Instance Template resources: * [Global](/compute/docs/reference/rest/v1/instanceTemplates) * [Regional](/compute/docs/reference/rest/v1/regionInstanceTemplates) You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a regional instance template. To create VMs, managed instance groups, and reservations, you can use either global or regional instance templates. For more information, read Instance Templates.
   * 
* * Protobuf type {@code google.cloud.compute.v1.InstanceTemplate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.InstanceTemplate) com.google.cloud.compute.v1.InstanceTemplateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.InstanceTemplate.class, com.google.cloud.compute.v1.InstanceTemplate.Builder.class); } // Construct using com.google.cloud.compute.v1.InstanceTemplate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getPropertiesFieldBuilder(); getSourceInstanceParamsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; creationTimestamp_ = ""; description_ = ""; id_ = 0L; kind_ = ""; name_ = ""; properties_ = null; if (propertiesBuilder_ != null) { propertiesBuilder_.dispose(); propertiesBuilder_ = null; } region_ = ""; selfLink_ = ""; sourceInstance_ = ""; sourceInstanceParams_ = null; if (sourceInstanceParamsBuilder_ != null) { sourceInstanceParamsBuilder_.dispose(); sourceInstanceParamsBuilder_ = null; } 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_InstanceTemplate_descriptor; } @java.lang.Override public com.google.cloud.compute.v1.InstanceTemplate getDefaultInstanceForType() { return com.google.cloud.compute.v1.InstanceTemplate.getDefaultInstance(); } @java.lang.Override public com.google.cloud.compute.v1.InstanceTemplate build() { com.google.cloud.compute.v1.InstanceTemplate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.compute.v1.InstanceTemplate buildPartial() { com.google.cloud.compute.v1.InstanceTemplate result = new com.google.cloud.compute.v1.InstanceTemplate(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.compute.v1.InstanceTemplate 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.id_ = id_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.kind_ = kind_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { result.name_ = name_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000020) != 0)) { result.properties_ = propertiesBuilder_ == null ? properties_ : propertiesBuilder_.build(); to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000040) != 0)) { result.region_ = region_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000080) != 0)) { result.selfLink_ = selfLink_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000100) != 0)) { result.sourceInstance_ = sourceInstance_; to_bitField0_ |= 0x00000100; } if (((from_bitField0_ & 0x00000200) != 0)) { result.sourceInstanceParams_ = sourceInstanceParamsBuilder_ == null ? sourceInstanceParams_ : sourceInstanceParamsBuilder_.build(); to_bitField0_ |= 0x00000200; } 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.InstanceTemplate) { return mergeFrom((com.google.cloud.compute.v1.InstanceTemplate) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.compute.v1.InstanceTemplate other) { if (other == com.google.cloud.compute.v1.InstanceTemplate.getDefaultInstance()) return this; if (other.hasCreationTimestamp()) { creationTimestamp_ = other.creationTimestamp_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasDescription()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasId()) { setId(other.getId()); } if (other.hasKind()) { kind_ = other.kind_; bitField0_ |= 0x00000008; onChanged(); } if (other.hasName()) { name_ = other.name_; bitField0_ |= 0x00000010; onChanged(); } if (other.hasProperties()) { mergeProperties(other.getProperties()); } if (other.hasRegion()) { region_ = other.region_; bitField0_ |= 0x00000040; onChanged(); } if (other.hasSelfLink()) { selfLink_ = other.selfLink_; bitField0_ |= 0x00000080; onChanged(); } if (other.hasSourceInstance()) { sourceInstance_ = other.sourceInstance_; bitField0_ |= 0x00000100; onChanged(); } if (other.hasSourceInstanceParams()) { mergeSourceInstanceParams(other.getSourceInstanceParams()); } 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_ |= 0x00000004; break; } // case 26840 case 26336418: { kind_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 26336418 case 26989658: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 26989658 case 244202930: { creationTimestamp_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 244202930 case 1082737250: { input.readMessage( getSourceInstanceParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 1082737250 case 1111570338: { region_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case 1111570338 case 1181510042: { input.readMessage(getPropertiesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 1181510042 case -1124441654: { sourceInstance_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000100; break; } // case -1124441654 case -911466526: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case -911466526 case -645248918: { selfLink_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; 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 template 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 template 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 template 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 template 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 template 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 template 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 long id_; /** * * *
     * [Output Only] A unique identifier for this instance template. The server defines this identifier.
     * 
* * optional uint64 id = 3355; * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * [Output Only] A unique identifier for this instance template. The server defines this identifier.
     * 
* * optional uint64 id = 3355; * * @return The id. */ @java.lang.Override public long getId() { return id_; } /** * * *
     * [Output Only] A unique identifier for this instance template. The server defines this identifier.
     * 
* * optional uint64 id = 3355; * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { id_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * [Output Only] A unique identifier for this instance template. The server defines this identifier.
     * 
* * optional uint64 id = 3355; * * @return This builder for chaining. */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000004); id_ = 0L; onChanged(); return this; } private java.lang.Object kind_ = ""; /** * * *
     * [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
     * 
* * optional string kind = 3292052; * * @return Whether the kind field is set. */ public boolean hasKind() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
     * 
* * 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#instanceTemplate for instance templates.
     * 
* * 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#instanceTemplate for instance templates.
     * 
* * 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_ |= 0x00000008; onChanged(); return this; } /** * * *
     * [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
     * 
* * optional string kind = 3292052; * * @return This builder for chaining. */ public Builder clearKind() { kind_ = getDefaultInstance().getKind(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
     * 
* * 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_ |= 0x00000008; onChanged(); return this; } private java.lang.Object name_ = ""; /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * 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; } } /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * 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; } } /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * 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_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * 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_ |= 0x00000010; onChanged(); return this; } private com.google.cloud.compute.v1.InstanceProperties properties_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.InstanceProperties, com.google.cloud.compute.v1.InstanceProperties.Builder, com.google.cloud.compute.v1.InstancePropertiesOrBuilder> propertiesBuilder_; /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; * * @return Whether the properties field is set. */ public boolean hasProperties() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; * * @return The properties. */ public com.google.cloud.compute.v1.InstanceProperties getProperties() { if (propertiesBuilder_ == null) { return properties_ == null ? com.google.cloud.compute.v1.InstanceProperties.getDefaultInstance() : properties_; } else { return propertiesBuilder_.getMessage(); } } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public Builder setProperties(com.google.cloud.compute.v1.InstanceProperties value) { if (propertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } properties_ = value; } else { propertiesBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public Builder setProperties( com.google.cloud.compute.v1.InstanceProperties.Builder builderForValue) { if (propertiesBuilder_ == null) { properties_ = builderForValue.build(); } else { propertiesBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public Builder mergeProperties(com.google.cloud.compute.v1.InstanceProperties value) { if (propertiesBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && properties_ != null && properties_ != com.google.cloud.compute.v1.InstanceProperties.getDefaultInstance()) { getPropertiesBuilder().mergeFrom(value); } else { properties_ = value; } } else { propertiesBuilder_.mergeFrom(value); } if (properties_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public Builder clearProperties() { bitField0_ = (bitField0_ & ~0x00000020); properties_ = null; if (propertiesBuilder_ != null) { propertiesBuilder_.dispose(); propertiesBuilder_ = null; } onChanged(); return this; } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public com.google.cloud.compute.v1.InstanceProperties.Builder getPropertiesBuilder() { bitField0_ |= 0x00000020; onChanged(); return getPropertiesFieldBuilder().getBuilder(); } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ public com.google.cloud.compute.v1.InstancePropertiesOrBuilder getPropertiesOrBuilder() { if (propertiesBuilder_ != null) { return propertiesBuilder_.getMessageOrBuilder(); } else { return properties_ == null ? com.google.cloud.compute.v1.InstanceProperties.getDefaultInstance() : properties_; } } /** * * *
     * The instance properties for this instance template.
     * 
* * optional .google.cloud.compute.v1.InstanceProperties properties = 147688755; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.InstanceProperties, com.google.cloud.compute.v1.InstanceProperties.Builder, com.google.cloud.compute.v1.InstancePropertiesOrBuilder> getPropertiesFieldBuilder() { if (propertiesBuilder_ == null) { propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.InstanceProperties, com.google.cloud.compute.v1.InstanceProperties.Builder, com.google.cloud.compute.v1.InstancePropertiesOrBuilder>( getProperties(), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; } private java.lang.Object region_ = ""; /** * * *
     * [Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
     * 
* * optional string region = 138946292; * * @return Whether the region field is set. */ public boolean hasRegion() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * [Output Only] URL of the region where the instance template resides. Only applicable 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] URL of the region where the instance template resides. Only applicable 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] URL of the region where the instance template resides. Only applicable 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_ |= 0x00000040; onChanged(); return this; } /** * * *
     * [Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
     * 
* * optional string region = 138946292; * * @return This builder for chaining. */ public Builder clearRegion() { region_ = getDefaultInstance().getRegion(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * * *
     * [Output Only] URL of the region where the instance template resides. Only applicable 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_ |= 0x00000040; onChanged(); return this; } private java.lang.Object selfLink_ = ""; /** * * *
     * [Output Only] The URL for this instance template. The server defines this URL.
     * 
* * optional string self_link = 456214797; * * @return Whether the selfLink field is set. */ public boolean hasSelfLink() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * [Output Only] The URL for this instance template. The server defines 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 template. The server defines 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 template. The server defines 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_ |= 0x00000080; onChanged(); return this; } /** * * *
     * [Output Only] The URL for this instance template. The server defines this URL.
     * 
* * optional string self_link = 456214797; * * @return This builder for chaining. */ public Builder clearSelfLink() { selfLink_ = getDefaultInstance().getSelfLink(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * * *
     * [Output Only] The URL for this instance template. The server defines 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_ |= 0x00000080; onChanged(); return this; } private java.lang.Object sourceInstance_ = ""; /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @return Whether the sourceInstance field is set. */ public boolean hasSourceInstance() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @return The sourceInstance. */ public java.lang.String getSourceInstance() { java.lang.Object ref = sourceInstance_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); sourceInstance_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @return The bytes for sourceInstance. */ public com.google.protobuf.ByteString getSourceInstanceBytes() { java.lang.Object ref = sourceInstance_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sourceInstance_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @param value The sourceInstance to set. * @return This builder for chaining. */ public Builder setSourceInstance(java.lang.String value) { if (value == null) { throw new NullPointerException(); } sourceInstance_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @return This builder for chaining. */ public Builder clearSourceInstance() { sourceInstance_ = getDefaultInstance().getSourceInstance(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** * * *
     * The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
     * 
* * optional string source_instance = 396315705; * * @param value The bytes for sourceInstance to set. * @return This builder for chaining. */ public Builder setSourceInstanceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sourceInstance_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } private com.google.cloud.compute.v1.SourceInstanceParams sourceInstanceParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.SourceInstanceParams, com.google.cloud.compute.v1.SourceInstanceParams.Builder, com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder> sourceInstanceParamsBuilder_; /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * * * @return Whether the sourceInstanceParams field is set. */ public boolean hasSourceInstanceParams() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * * * @return The sourceInstanceParams. */ public com.google.cloud.compute.v1.SourceInstanceParams getSourceInstanceParams() { if (sourceInstanceParamsBuilder_ == null) { return sourceInstanceParams_ == null ? com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance() : sourceInstanceParams_; } else { return sourceInstanceParamsBuilder_.getMessage(); } } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public Builder setSourceInstanceParams(com.google.cloud.compute.v1.SourceInstanceParams value) { if (sourceInstanceParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sourceInstanceParams_ = value; } else { sourceInstanceParamsBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public Builder setSourceInstanceParams( com.google.cloud.compute.v1.SourceInstanceParams.Builder builderForValue) { if (sourceInstanceParamsBuilder_ == null) { sourceInstanceParams_ = builderForValue.build(); } else { sourceInstanceParamsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public Builder mergeSourceInstanceParams( com.google.cloud.compute.v1.SourceInstanceParams value) { if (sourceInstanceParamsBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && sourceInstanceParams_ != null && sourceInstanceParams_ != com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance()) { getSourceInstanceParamsBuilder().mergeFrom(value); } else { sourceInstanceParams_ = value; } } else { sourceInstanceParamsBuilder_.mergeFrom(value); } if (sourceInstanceParams_ != null) { bitField0_ |= 0x00000200; onChanged(); } return this; } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public Builder clearSourceInstanceParams() { bitField0_ = (bitField0_ & ~0x00000200); sourceInstanceParams_ = null; if (sourceInstanceParamsBuilder_ != null) { sourceInstanceParamsBuilder_.dispose(); sourceInstanceParamsBuilder_ = null; } onChanged(); return this; } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public com.google.cloud.compute.v1.SourceInstanceParams.Builder getSourceInstanceParamsBuilder() { bitField0_ |= 0x00000200; onChanged(); return getSourceInstanceParamsFieldBuilder().getBuilder(); } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ public com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder getSourceInstanceParamsOrBuilder() { if (sourceInstanceParamsBuilder_ != null) { return sourceInstanceParamsBuilder_.getMessageOrBuilder(); } else { return sourceInstanceParams_ == null ? com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance() : sourceInstanceParams_; } } /** * * *
     * The source instance params to use to create this instance template.
     * 
* * * optional .google.cloud.compute.v1.SourceInstanceParams source_instance_params = 135342156; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.SourceInstanceParams, com.google.cloud.compute.v1.SourceInstanceParams.Builder, com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder> getSourceInstanceParamsFieldBuilder() { if (sourceInstanceParamsBuilder_ == null) { sourceInstanceParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.SourceInstanceParams, com.google.cloud.compute.v1.SourceInstanceParams.Builder, com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder>( getSourceInstanceParams(), getParentForChildren(), isClean()); sourceInstanceParams_ = null; } return sourceInstanceParamsBuilder_; } @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.InstanceTemplate) } // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.InstanceTemplate) private static final com.google.cloud.compute.v1.InstanceTemplate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceTemplate(); } public static com.google.cloud.compute.v1.InstanceTemplate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public InstanceTemplate 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.InstanceTemplate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy