Class LocationPolicy (1.7.2)

public final class LocationPolicy extends GeneratedMessageV3 implements LocationPolicyOrBuilder

Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).

Protobuf type google.cloud.compute.v1.LocationPolicy

Static Fields

LOCATIONS_FIELD_NUMBER

public static final int LOCATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LocationPolicy getDefaultInstance()
Returns
TypeDescription
LocationPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static LocationPolicy.Builder newBuilder()
Returns
TypeDescription
LocationPolicy.Builder

newBuilder(LocationPolicy prototype)

public static LocationPolicy.Builder newBuilder(LocationPolicy prototype)
Parameter
NameDescription
prototypeLocationPolicy
Returns
TypeDescription
LocationPolicy.Builder

parseDelimitedFrom(InputStream input)

public static LocationPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static LocationPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LocationPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LocationPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static LocationPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static LocationPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LocationPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocationPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<LocationPolicy> parser()
Returns
TypeDescription
Parser<LocationPolicy>

Methods

containsLocations(String key)

public boolean containsLocations(String key)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public LocationPolicy getDefaultInstanceForType()
Returns
TypeDescription
LocationPolicy

getLocations()

public Map<String,LocationPolicyLocation> getLocations()

Use #getLocationsMap() instead.

Returns
TypeDescription
Map<String,LocationPolicyLocation>

getLocationsCount()

public int getLocationsCount()

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Returns
TypeDescription
int

getLocationsMap()

public Map<String,LocationPolicyLocation> getLocationsMap()

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Returns
TypeDescription
Map<String,LocationPolicyLocation>

getLocationsOrDefault(String key, LocationPolicyLocation defaultValue)

public LocationPolicyLocation getLocationsOrDefault(String key, LocationPolicyLocation defaultValue)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameters
NameDescription
keyString
defaultValueLocationPolicyLocation
Returns
TypeDescription
LocationPolicyLocation

getLocationsOrThrow(String key)

public LocationPolicyLocation getLocationsOrThrow(String key)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
keyString
Returns
TypeDescription
LocationPolicyLocation

getParserForType()

public Parser<LocationPolicy> getParserForType()
Returns
TypeDescription
Parser<LocationPolicy>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public LocationPolicy.Builder newBuilderForType()
Returns
TypeDescription
LocationPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LocationPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
LocationPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public LocationPolicy.Builder toBuilder()
Returns
TypeDescription
LocationPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException