Class Restrictions (0.28.0)

public final class Restrictions extends GeneratedMessageV3 implements RestrictionsOrBuilder

Describes the restrictions on the key.

Protobuf type google.api.apikeys.v2.Restrictions

Static Fields

ANDROID_KEY_RESTRICTIONS_FIELD_NUMBER

public static final int ANDROID_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

API_TARGETS_FIELD_NUMBER

public static final int API_TARGETS_FIELD_NUMBER
Field Value
TypeDescription
int

BROWSER_KEY_RESTRICTIONS_FIELD_NUMBER

public static final int BROWSER_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

IOS_KEY_RESTRICTIONS_FIELD_NUMBER

public static final int IOS_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

SERVER_KEY_RESTRICTIONS_FIELD_NUMBER

public static final int SERVER_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Restrictions getDefaultInstance()
Returns
TypeDescription
Restrictions

getDescriptor()

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

newBuilder()

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

newBuilder(Restrictions prototype)

public static Restrictions.Builder newBuilder(Restrictions prototype)
Parameter
NameDescription
prototypeRestrictions
Returns
TypeDescription
Restrictions.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAndroidKeyRestrictions()

public AndroidKeyRestrictions getAndroidKeyRestrictions()

The Android apps that are allowed to use the key.

.google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;

Returns
TypeDescription
AndroidKeyRestrictions

The androidKeyRestrictions.

getAndroidKeyRestrictionsOrBuilder()

public AndroidKeyRestrictionsOrBuilder getAndroidKeyRestrictionsOrBuilder()

The Android apps that are allowed to use the key.

.google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;

Returns
TypeDescription
AndroidKeyRestrictionsOrBuilder

getApiTargets(int index)

public ApiTarget getApiTargets(int index)

A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.

repeated .google.api.apikeys.v2.ApiTarget api_targets = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
ApiTarget

getApiTargetsCount()

public int getApiTargetsCount()

A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.

repeated .google.api.apikeys.v2.ApiTarget api_targets = 5;

Returns
TypeDescription
int

getApiTargetsList()

public List<ApiTarget> getApiTargetsList()

A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.

repeated .google.api.apikeys.v2.ApiTarget api_targets = 5;

Returns
TypeDescription
List<ApiTarget>

getApiTargetsOrBuilder(int index)

public ApiTargetOrBuilder getApiTargetsOrBuilder(int index)

A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.

repeated .google.api.apikeys.v2.ApiTarget api_targets = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
ApiTargetOrBuilder

getApiTargetsOrBuilderList()

public List<? extends ApiTargetOrBuilder> getApiTargetsOrBuilderList()

A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.

repeated .google.api.apikeys.v2.ApiTarget api_targets = 5;

Returns
TypeDescription
List<? extends com.google.api.apikeys.v2.ApiTargetOrBuilder>

getBrowserKeyRestrictions()

public BrowserKeyRestrictions getBrowserKeyRestrictions()

The HTTP referrers (websites) that are allowed to use the key.

.google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;

Returns
TypeDescription
BrowserKeyRestrictions

The browserKeyRestrictions.

getBrowserKeyRestrictionsOrBuilder()

public BrowserKeyRestrictionsOrBuilder getBrowserKeyRestrictionsOrBuilder()

The HTTP referrers (websites) that are allowed to use the key.

.google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;

Returns
TypeDescription
BrowserKeyRestrictionsOrBuilder

getClientRestrictionsCase()

public Restrictions.ClientRestrictionsCase getClientRestrictionsCase()
Returns
TypeDescription
Restrictions.ClientRestrictionsCase

getDefaultInstanceForType()

public Restrictions getDefaultInstanceForType()
Returns
TypeDescription
Restrictions

getIosKeyRestrictions()

public IosKeyRestrictions getIosKeyRestrictions()

The iOS apps that are allowed to use the key.

.google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;

Returns
TypeDescription
IosKeyRestrictions

The iosKeyRestrictions.

getIosKeyRestrictionsOrBuilder()

public IosKeyRestrictionsOrBuilder getIosKeyRestrictionsOrBuilder()

The iOS apps that are allowed to use the key.

.google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;

Returns
TypeDescription
IosKeyRestrictionsOrBuilder

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServerKeyRestrictions()

public ServerKeyRestrictions getServerKeyRestrictions()

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

.google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;

Returns
TypeDescription
ServerKeyRestrictions

The serverKeyRestrictions.

getServerKeyRestrictionsOrBuilder()

public ServerKeyRestrictionsOrBuilder getServerKeyRestrictionsOrBuilder()

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

.google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;

Returns
TypeDescription
ServerKeyRestrictionsOrBuilder

hasAndroidKeyRestrictions()

public boolean hasAndroidKeyRestrictions()

The Android apps that are allowed to use the key.

.google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;

Returns
TypeDescription
boolean

Whether the androidKeyRestrictions field is set.

hasBrowserKeyRestrictions()

public boolean hasBrowserKeyRestrictions()

The HTTP referrers (websites) that are allowed to use the key.

.google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;

Returns
TypeDescription
boolean

Whether the browserKeyRestrictions field is set.

hasIosKeyRestrictions()

public boolean hasIosKeyRestrictions()

The iOS apps that are allowed to use the key.

.google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;

Returns
TypeDescription
boolean

Whether the iosKeyRestrictions field is set.

hasServerKeyRestrictions()

public boolean hasServerKeyRestrictions()

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

.google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;

Returns
TypeDescription
boolean

Whether the serverKeyRestrictions field is set.

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 Restrictions.Builder newBuilderForType()
Returns
TypeDescription
Restrictions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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