Send feedback
Class Restrictions (0.7.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.7.0 keyboard_arrow_down
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
API_TARGETS_FIELD_NUMBER
public static final int API_TARGETS_FIELD_NUMBER
Field Value
BROWSER_KEY_RESTRICTIONS_FIELD_NUMBER
public static final int BROWSER_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
IOS_KEY_RESTRICTIONS_FIELD_NUMBER
public static final int IOS_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
SERVER_KEY_RESTRICTIONS_FIELD_NUMBER
public static final int SERVER_KEY_RESTRICTIONS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Restrictions getDefaultInstance ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
newBuilder()
public static Restrictions . Builder newBuilder ()
Returns
newBuilder(Restrictions prototype)
public static Restrictions . Builder newBuilder ( Restrictions prototype )
Parameter
Returns
public static Restrictions parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static Restrictions parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Restrictions parseFrom ( byte [] data )
Parameter
Name Description data
byte []
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Restrictions parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Restrictions parseFrom ( ByteString data )
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Restrictions parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static Restrictions parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static Restrictions parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static Restrictions parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static Restrictions parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Restrictions parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Restrictions parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parser()
public static Parser<Restrictions> parser ()
Returns
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
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
getAndroidKeyRestrictionsOrBuilder()
public AndroidKeyRestrictionsOrBuilder getAndroidKeyRestrictionsOrBuilder ()
The Android apps that are allowed to use the key.
.google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
Returns
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
Returns
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
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
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
Returns
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
Type Description 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
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
getClientRestrictionsCase()
public Restrictions . ClientRestrictionsCase getClientRestrictionsCase ()
Returns
getDefaultInstanceForType()
public Restrictions getDefaultInstanceForType ()
Returns
getIosKeyRestrictions()
public IosKeyRestrictions getIosKeyRestrictions ()
The iOS apps that are allowed to use the key.
.google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
Returns
getIosKeyRestrictionsOrBuilder()
public IosKeyRestrictionsOrBuilder getIosKeyRestrictionsOrBuilder ()
The iOS apps that are allowed to use the key.
.google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
Returns
getParserForType()
public Parser<Restrictions> getParserForType ()
Returns
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
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
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
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Returns
Overrides
hasAndroidKeyRestrictions()
public boolean hasAndroidKeyRestrictions ()
The Android apps that are allowed to use the key.
.google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
Returns
Type Description 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
Type Description 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
Type Description 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
Type Description boolean
Whether the serverKeyRestrictions field is set.
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
newBuilderForType()
public Restrictions . Builder newBuilderForType ()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Restrictions . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
toBuilder()
public Restrictions . Builder toBuilder ()
Returns
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]