Class ServerKeyRestrictions (0.14.0)

public final class ServerKeyRestrictions extends GeneratedMessageV3 implements ServerKeyRestrictionsOrBuilder

The IP addresses of callers that are allowed to use the key.

Protobuf type google.api.apikeys.v2.ServerKeyRestrictions

Static Fields

ALLOWED_IPS_FIELD_NUMBER

public static final int ALLOWED_IPS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ServerKeyRestrictions getDefaultInstance()
Returns
TypeDescription
ServerKeyRestrictions

getDescriptor()

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

newBuilder()

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

newBuilder(ServerKeyRestrictions prototype)

public static ServerKeyRestrictions.Builder newBuilder(ServerKeyRestrictions prototype)
Parameter
NameDescription
prototypeServerKeyRestrictions
Returns
TypeDescription
ServerKeyRestrictions.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAllowedIps(int index)

public String getAllowedIps(int index)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowedIps at the given index.

getAllowedIpsBytes(int index)

public ByteString getAllowedIpsBytes(int index)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowedIps at the given index.

getAllowedIpsCount()

public int getAllowedIpsCount()

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Returns
TypeDescription
int

The count of allowedIps.

getAllowedIpsList()

public ProtocolStringList getAllowedIpsList()

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the allowedIps.

getDefaultInstanceForType()

public ServerKeyRestrictions getDefaultInstanceForType()
Returns
TypeDescription
ServerKeyRestrictions

getParserForType()

public Parser<ServerKeyRestrictions> getParserForType()
Returns
TypeDescription
Parser<ServerKeyRestrictions>
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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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