Class Bucket.IpFilter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Bucket.IpFilter.Builder>
com.google.storage.v2.Bucket.IpFilter.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Bucket.IpFilterOrBuilder, Cloneable
Enclosing class:
Bucket.IpFilter

public static final class Bucket.IpFilter.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Bucket.IpFilter.Builder> implements Bucket.IpFilterOrBuilder
 The [bucket IP
 filtering](https://cloud.google.com/storage/docs/ip-filtering-overview)
 configuration. Specifies the network sources that can access the bucket, as
 well as its underlying objects.
 
Protobuf type google.storage.v2.Bucket.IpFilter
  • Method Details

    • 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<Bucket.IpFilter.Builder>
    • clear

      public Bucket.IpFilter.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<Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • getDefaultInstanceForType

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

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

      public Bucket.IpFilter buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • setField

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • clearField

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • clearOneof

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • setRepeatedField

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • addRepeatedField

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • mergeFrom

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • mergeFrom

      public Bucket.IpFilter.Builder mergeFrom(Bucket.IpFilter other)
    • isInitialized

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

      public Bucket.IpFilter.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<Bucket.IpFilter.Builder>
      Throws:
      IOException
    • hasMode

      public boolean hasMode()
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Specified by:
      hasMode in interface Bucket.IpFilterOrBuilder
      Returns:
      Whether the mode field is set.
    • getMode

      public String getMode()
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Specified by:
      getMode in interface Bucket.IpFilterOrBuilder
      Returns:
      The mode.
    • getModeBytes

      public com.google.protobuf.ByteString getModeBytes()
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Specified by:
      getModeBytes in interface Bucket.IpFilterOrBuilder
      Returns:
      The bytes for mode.
    • setMode

      public Bucket.IpFilter.Builder setMode(String value)
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • clearMode

      public Bucket.IpFilter.Builder clearMode()
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Returns:
      This builder for chaining.
    • setModeBytes

      public Bucket.IpFilter.Builder setModeBytes(com.google.protobuf.ByteString value)
       The state of the IP filter configuration. Valid values are `Enabled` and
       `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
       bucket and all incoming requests to the bucket are evaluated against
       these rules. When set to `Disabled`, IP filtering rules are not applied
       to a bucket.".
       
      optional string mode = 1;
      Parameters:
      value - The bytes for mode to set.
      Returns:
      This builder for chaining.
    • hasPublicNetworkSource

      public boolean hasPublicNetworkSource()
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
      Specified by:
      hasPublicNetworkSource in interface Bucket.IpFilterOrBuilder
      Returns:
      Whether the publicNetworkSource field is set.
    • getPublicNetworkSource

      public Bucket.IpFilter.PublicNetworkSource getPublicNetworkSource()
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
      Specified by:
      getPublicNetworkSource in interface Bucket.IpFilterOrBuilder
      Returns:
      The publicNetworkSource.
    • setPublicNetworkSource

      public Bucket.IpFilter.Builder setPublicNetworkSource(Bucket.IpFilter.PublicNetworkSource value)
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
    • setPublicNetworkSource

      public Bucket.IpFilter.Builder setPublicNetworkSource(Bucket.IpFilter.PublicNetworkSource.Builder builderForValue)
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
    • mergePublicNetworkSource

      public Bucket.IpFilter.Builder mergePublicNetworkSource(Bucket.IpFilter.PublicNetworkSource value)
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
    • clearPublicNetworkSource

      public Bucket.IpFilter.Builder clearPublicNetworkSource()
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
    • getPublicNetworkSourceBuilder

      public Bucket.IpFilter.PublicNetworkSource.Builder getPublicNetworkSourceBuilder()
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
    • getPublicNetworkSourceOrBuilder

      public Bucket.IpFilter.PublicNetworkSourceOrBuilder getPublicNetworkSourceOrBuilder()
       Public IPs allowed to operate or access the bucket.
       
      optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2;
      Specified by:
      getPublicNetworkSourceOrBuilder in interface Bucket.IpFilterOrBuilder
    • getVpcNetworkSourcesList

      public List<Bucket.IpFilter.VpcNetworkSource> getVpcNetworkSourcesList()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getVpcNetworkSourcesList in interface Bucket.IpFilterOrBuilder
    • getVpcNetworkSourcesCount

      public int getVpcNetworkSourcesCount()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getVpcNetworkSourcesCount in interface Bucket.IpFilterOrBuilder
    • getVpcNetworkSources

      public Bucket.IpFilter.VpcNetworkSource getVpcNetworkSources(int index)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getVpcNetworkSources in interface Bucket.IpFilterOrBuilder
    • setVpcNetworkSources

      public Bucket.IpFilter.Builder setVpcNetworkSources(int index, Bucket.IpFilter.VpcNetworkSource value)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setVpcNetworkSources

      public Bucket.IpFilter.Builder setVpcNetworkSources(int index, Bucket.IpFilter.VpcNetworkSource.Builder builderForValue)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addVpcNetworkSources

      public Bucket.IpFilter.Builder addVpcNetworkSources(Bucket.IpFilter.VpcNetworkSource value)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addVpcNetworkSources

      public Bucket.IpFilter.Builder addVpcNetworkSources(int index, Bucket.IpFilter.VpcNetworkSource value)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addVpcNetworkSources

      public Bucket.IpFilter.Builder addVpcNetworkSources(Bucket.IpFilter.VpcNetworkSource.Builder builderForValue)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addVpcNetworkSources

      public Bucket.IpFilter.Builder addVpcNetworkSources(int index, Bucket.IpFilter.VpcNetworkSource.Builder builderForValue)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addAllVpcNetworkSources

      public Bucket.IpFilter.Builder addAllVpcNetworkSources(Iterable<? extends Bucket.IpFilter.VpcNetworkSource> values)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearVpcNetworkSources

      public Bucket.IpFilter.Builder clearVpcNetworkSources()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • removeVpcNetworkSources

      public Bucket.IpFilter.Builder removeVpcNetworkSources(int index)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getVpcNetworkSourcesBuilder

      public Bucket.IpFilter.VpcNetworkSource.Builder getVpcNetworkSourcesBuilder(int index)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getVpcNetworkSourcesOrBuilder

      public Bucket.IpFilter.VpcNetworkSourceOrBuilder getVpcNetworkSourcesOrBuilder(int index)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getVpcNetworkSourcesOrBuilder in interface Bucket.IpFilterOrBuilder
    • getVpcNetworkSourcesOrBuilderList

      public List<? extends Bucket.IpFilter.VpcNetworkSourceOrBuilder> getVpcNetworkSourcesOrBuilderList()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getVpcNetworkSourcesOrBuilderList in interface Bucket.IpFilterOrBuilder
    • addVpcNetworkSourcesBuilder

      public Bucket.IpFilter.VpcNetworkSource.Builder addVpcNetworkSourcesBuilder()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addVpcNetworkSourcesBuilder

      public Bucket.IpFilter.VpcNetworkSource.Builder addVpcNetworkSourcesBuilder(int index)
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getVpcNetworkSourcesBuilderList

      public List<Bucket.IpFilter.VpcNetworkSource.Builder> getVpcNetworkSourcesBuilderList()
       Optional. The list of network sources that are allowed to access
       operations on the bucket or the underlying objects.
       
      repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getAllowCrossOrgVpcs

      public boolean getAllowCrossOrgVpcs()
       Optional. Whether or not to allow VPCs from orgs different than the
       bucket's parent org to access the bucket. When set to true, validations
       on the existence of the VPCs won't be performed. If set to false, each
       VPC network source will be checked to belong to the same org as the
       bucket as well as validated for existence.
       
      bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowCrossOrgVpcs in interface Bucket.IpFilterOrBuilder
      Returns:
      The allowCrossOrgVpcs.
    • setAllowCrossOrgVpcs

      public Bucket.IpFilter.Builder setAllowCrossOrgVpcs(boolean value)
       Optional. Whether or not to allow VPCs from orgs different than the
       bucket's parent org to access the bucket. When set to true, validations
       on the existence of the VPCs won't be performed. If set to false, each
       VPC network source will be checked to belong to the same org as the
       bucket as well as validated for existence.
       
      bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The allowCrossOrgVpcs to set.
      Returns:
      This builder for chaining.
    • clearAllowCrossOrgVpcs

      public Bucket.IpFilter.Builder clearAllowCrossOrgVpcs()
       Optional. Whether or not to allow VPCs from orgs different than the
       bucket's parent org to access the bucket. When set to true, validations
       on the existence of the VPCs won't be performed. If set to false, each
       VPC network source will be checked to belong to the same org as the
       bucket as well as validated for existence.
       
      bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasAllowAllServiceAgentAccess

      public boolean hasAllowAllServiceAgentAccess()
       Whether or not to allow all P4SA access to the bucket. When set to true,
       IP filter config validation will not apply.
       
      optional bool allow_all_service_agent_access = 5;
      Specified by:
      hasAllowAllServiceAgentAccess in interface Bucket.IpFilterOrBuilder
      Returns:
      Whether the allowAllServiceAgentAccess field is set.
    • getAllowAllServiceAgentAccess

      public boolean getAllowAllServiceAgentAccess()
       Whether or not to allow all P4SA access to the bucket. When set to true,
       IP filter config validation will not apply.
       
      optional bool allow_all_service_agent_access = 5;
      Specified by:
      getAllowAllServiceAgentAccess in interface Bucket.IpFilterOrBuilder
      Returns:
      The allowAllServiceAgentAccess.
    • setAllowAllServiceAgentAccess

      public Bucket.IpFilter.Builder setAllowAllServiceAgentAccess(boolean value)
       Whether or not to allow all P4SA access to the bucket. When set to true,
       IP filter config validation will not apply.
       
      optional bool allow_all_service_agent_access = 5;
      Parameters:
      value - The allowAllServiceAgentAccess to set.
      Returns:
      This builder for chaining.
    • clearAllowAllServiceAgentAccess

      public Bucket.IpFilter.Builder clearAllowAllServiceAgentAccess()
       Whether or not to allow all P4SA access to the bucket. When set to true,
       IP filter config validation will not apply.
       
      optional bool allow_all_service_agent_access = 5;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Bucket.IpFilter.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<Bucket.IpFilter.Builder>
    • mergeUnknownFields

      public final Bucket.IpFilter.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<Bucket.IpFilter.Builder>