Class Restrictions.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder>
com.google.api.apikeys.v2.Restrictions.Builder
All Implemented Interfaces:
RestrictionsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Restrictions

public static final class Restrictions.Builder extends com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder> implements RestrictionsOrBuilder
 Describes the restrictions on the key.
 
Protobuf type google.api.apikeys.v2.Restrictions
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder>
    • clear

      public Restrictions.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder>
    • getDefaultInstanceForType

      public Restrictions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Restrictions build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Restrictions buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Restrictions.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Restrictions.Builder>
    • mergeFrom

      public Restrictions.Builder mergeFrom(Restrictions other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Restrictions.Builder>
    • mergeFrom

      public Restrictions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Restrictions.Builder>
      Throws:
      IOException
    • getClientRestrictionsCase

      public Restrictions.ClientRestrictionsCase getClientRestrictionsCase()
      Specified by:
      getClientRestrictionsCase in interface RestrictionsOrBuilder
    • clearClientRestrictions

      public Restrictions.Builder clearClientRestrictions()
    • hasBrowserKeyRestrictions

      public boolean hasBrowserKeyRestrictions()
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
      Specified by:
      hasBrowserKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      Whether the browserKeyRestrictions field is set.
    • getBrowserKeyRestrictions

      public BrowserKeyRestrictions getBrowserKeyRestrictions()
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
      Specified by:
      getBrowserKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      The browserKeyRestrictions.
    • setBrowserKeyRestrictions

      public Restrictions.Builder setBrowserKeyRestrictions(BrowserKeyRestrictions value)
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
    • setBrowserKeyRestrictions

      public Restrictions.Builder setBrowserKeyRestrictions(BrowserKeyRestrictions.Builder builderForValue)
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
    • mergeBrowserKeyRestrictions

      public Restrictions.Builder mergeBrowserKeyRestrictions(BrowserKeyRestrictions value)
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
    • clearBrowserKeyRestrictions

      public Restrictions.Builder clearBrowserKeyRestrictions()
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
    • getBrowserKeyRestrictionsBuilder

      public BrowserKeyRestrictions.Builder getBrowserKeyRestrictionsBuilder()
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
    • getBrowserKeyRestrictionsOrBuilder

      public BrowserKeyRestrictionsOrBuilder getBrowserKeyRestrictionsOrBuilder()
       The HTTP referrers (websites) that are allowed to use the key.
       
      .google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1;
      Specified by:
      getBrowserKeyRestrictionsOrBuilder in interface RestrictionsOrBuilder
    • 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;
      Specified by:
      hasServerKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      Whether the serverKeyRestrictions field is set.
    • 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;
      Specified by:
      getServerKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      The serverKeyRestrictions.
    • setServerKeyRestrictions

      public Restrictions.Builder setServerKeyRestrictions(ServerKeyRestrictions value)
       The IP addresses of callers that are allowed to use the key.
       
      .google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;
    • setServerKeyRestrictions

      public Restrictions.Builder setServerKeyRestrictions(ServerKeyRestrictions.Builder builderForValue)
       The IP addresses of callers that are allowed to use the key.
       
      .google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;
    • mergeServerKeyRestrictions

      public Restrictions.Builder mergeServerKeyRestrictions(ServerKeyRestrictions value)
       The IP addresses of callers that are allowed to use the key.
       
      .google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;
    • clearServerKeyRestrictions

      public Restrictions.Builder clearServerKeyRestrictions()
       The IP addresses of callers that are allowed to use the key.
       
      .google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;
    • getServerKeyRestrictionsBuilder

      public ServerKeyRestrictions.Builder getServerKeyRestrictionsBuilder()
       The IP addresses of callers that are allowed to use the key.
       
      .google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2;
    • 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;
      Specified by:
      getServerKeyRestrictionsOrBuilder in interface RestrictionsOrBuilder
    • hasAndroidKeyRestrictions

      public boolean hasAndroidKeyRestrictions()
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
      Specified by:
      hasAndroidKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      Whether the androidKeyRestrictions field is set.
    • getAndroidKeyRestrictions

      public AndroidKeyRestrictions getAndroidKeyRestrictions()
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
      Specified by:
      getAndroidKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      The androidKeyRestrictions.
    • setAndroidKeyRestrictions

      public Restrictions.Builder setAndroidKeyRestrictions(AndroidKeyRestrictions value)
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
    • setAndroidKeyRestrictions

      public Restrictions.Builder setAndroidKeyRestrictions(AndroidKeyRestrictions.Builder builderForValue)
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
    • mergeAndroidKeyRestrictions

      public Restrictions.Builder mergeAndroidKeyRestrictions(AndroidKeyRestrictions value)
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
    • clearAndroidKeyRestrictions

      public Restrictions.Builder clearAndroidKeyRestrictions()
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
    • getAndroidKeyRestrictionsBuilder

      public AndroidKeyRestrictions.Builder getAndroidKeyRestrictionsBuilder()
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
    • getAndroidKeyRestrictionsOrBuilder

      public AndroidKeyRestrictionsOrBuilder getAndroidKeyRestrictionsOrBuilder()
       The Android apps that are allowed to use the key.
       
      .google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3;
      Specified by:
      getAndroidKeyRestrictionsOrBuilder in interface RestrictionsOrBuilder
    • hasIosKeyRestrictions

      public boolean hasIosKeyRestrictions()
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
      Specified by:
      hasIosKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      Whether the iosKeyRestrictions field is set.
    • getIosKeyRestrictions

      public IosKeyRestrictions getIosKeyRestrictions()
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
      Specified by:
      getIosKeyRestrictions in interface RestrictionsOrBuilder
      Returns:
      The iosKeyRestrictions.
    • setIosKeyRestrictions

      public Restrictions.Builder setIosKeyRestrictions(IosKeyRestrictions value)
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
    • setIosKeyRestrictions

      public Restrictions.Builder setIosKeyRestrictions(IosKeyRestrictions.Builder builderForValue)
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
    • mergeIosKeyRestrictions

      public Restrictions.Builder mergeIosKeyRestrictions(IosKeyRestrictions value)
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
    • clearIosKeyRestrictions

      public Restrictions.Builder clearIosKeyRestrictions()
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
    • getIosKeyRestrictionsBuilder

      public IosKeyRestrictions.Builder getIosKeyRestrictionsBuilder()
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
    • getIosKeyRestrictionsOrBuilder

      public IosKeyRestrictionsOrBuilder getIosKeyRestrictionsOrBuilder()
       The iOS apps that are allowed to use the key.
       
      .google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4;
      Specified by:
      getIosKeyRestrictionsOrBuilder in interface RestrictionsOrBuilder
    • 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;
      Specified by:
      getApiTargetsList in interface RestrictionsOrBuilder
    • 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;
      Specified by:
      getApiTargetsCount in interface RestrictionsOrBuilder
    • getApiTargets

      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;
      Specified by:
      getApiTargets in interface RestrictionsOrBuilder
    • setApiTargets

      public Restrictions.Builder setApiTargets(int index, ApiTarget value)
       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;
    • setApiTargets

      public Restrictions.Builder setApiTargets(int index, ApiTarget.Builder builderForValue)
       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;
    • addApiTargets

      public Restrictions.Builder addApiTargets(ApiTarget value)
       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;
    • addApiTargets

      public Restrictions.Builder addApiTargets(int index, ApiTarget value)
       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;
    • addApiTargets

      public Restrictions.Builder addApiTargets(ApiTarget.Builder builderForValue)
       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;
    • addApiTargets

      public Restrictions.Builder addApiTargets(int index, ApiTarget.Builder builderForValue)
       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;
    • addAllApiTargets

      public Restrictions.Builder addAllApiTargets(Iterable<? extends ApiTarget> values)
       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;
    • clearApiTargets

      public Restrictions.Builder clearApiTargets()
       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;
    • removeApiTargets

      public Restrictions.Builder removeApiTargets(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;
    • getApiTargetsBuilder

      public ApiTarget.Builder getApiTargetsBuilder(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;
    • getApiTargetsOrBuilder

      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;
      Specified by:
      getApiTargetsOrBuilder in interface RestrictionsOrBuilder
    • 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;
      Specified by:
      getApiTargetsOrBuilderList in interface RestrictionsOrBuilder
    • addApiTargetsBuilder

      public ApiTarget.Builder addApiTargetsBuilder()
       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;
    • addApiTargetsBuilder

      public ApiTarget.Builder addApiTargetsBuilder(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;
    • getApiTargetsBuilderList

      public List<ApiTarget.Builder> getApiTargetsBuilderList()
       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;