Class 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.GeneratedMessageV3.Builder<Restrictions.Builder>
    implements RestrictionsOrBuilder
     Describes the restrictions on the key.
     
    Protobuf type google.api.apikeys.v2.Restrictions
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Restrictions.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • setField

        public Restrictions.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • clearField

        public Restrictions.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • clearOneof

        public Restrictions.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • setRepeatedField

        public Restrictions.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • addRepeatedField

        public Restrictions.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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;
      • 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;
      • 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.
      • 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;
      • 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.
      • 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;
      • 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;
      • setUnknownFields

        public final Restrictions.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>
      • mergeUnknownFields

        public final Restrictions.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Restrictions.Builder>