Class AuthorizationPolicy.Rule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Builder>
com.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Builder
All Implemented Interfaces:
AuthorizationPolicy.RuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AuthorizationPolicy.Rule

public static final class AuthorizationPolicy.Rule.Builder extends com.google.protobuf.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Builder> implements AuthorizationPolicy.RuleOrBuilder
 Specification of rules.
 
Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy.Rule
  • 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<AuthorizationPolicy.Rule.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<AuthorizationPolicy.Rule.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<AuthorizationPolicy.Rule.Builder>
    • getDefaultInstanceForType

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

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

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

      public AuthorizationPolicy.Rule.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<AuthorizationPolicy.Rule.Builder>
    • mergeFrom

    • isInitialized

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

      public AuthorizationPolicy.Rule.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<AuthorizationPolicy.Rule.Builder>
      Throws:
      IOException
    • getSourcesList

      public List<AuthorizationPolicy.Rule.Source> getSourcesList()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourcesList in interface AuthorizationPolicy.RuleOrBuilder
    • getSourcesCount

      public int getSourcesCount()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourcesCount in interface AuthorizationPolicy.RuleOrBuilder
    • getSources

      public AuthorizationPolicy.Rule.Source getSources(int index)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSources in interface AuthorizationPolicy.RuleOrBuilder
    • setSources

       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • setSources

      public AuthorizationPolicy.Rule.Builder setSources(int index, AuthorizationPolicy.Rule.Source.Builder builderForValue)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addSources

       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addSources

       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addSources

       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addSources

      public AuthorizationPolicy.Rule.Builder addSources(int index, AuthorizationPolicy.Rule.Source.Builder builderForValue)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addAllSources

       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • clearSources

      public AuthorizationPolicy.Rule.Builder clearSources()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • removeSources

      public AuthorizationPolicy.Rule.Builder removeSources(int index)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getSourcesBuilder

      public AuthorizationPolicy.Rule.Source.Builder getSourcesBuilder(int index)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getSourcesOrBuilder

      public AuthorizationPolicy.Rule.SourceOrBuilder getSourcesOrBuilder(int index)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourcesOrBuilder in interface AuthorizationPolicy.RuleOrBuilder
    • getSourcesOrBuilderList

      public List<? extends AuthorizationPolicy.Rule.SourceOrBuilder> getSourcesOrBuilderList()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourcesOrBuilderList in interface AuthorizationPolicy.RuleOrBuilder
    • addSourcesBuilder

      public AuthorizationPolicy.Rule.Source.Builder addSourcesBuilder()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • addSourcesBuilder

      public AuthorizationPolicy.Rule.Source.Builder addSourcesBuilder(int index)
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getSourcesBuilderList

      public List<AuthorizationPolicy.Rule.Source.Builder> getSourcesBuilderList()
       Optional. List of attributes for the traffic source. All of the sources
       must match. A source is a match if both principals and ip_blocks match.
       If not set, the action specified in the 'action' field will be applied
       without any rule checks for the source.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getDestinationsList

      public List<AuthorizationPolicy.Rule.Destination> getDestinationsList()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDestinationsList in interface AuthorizationPolicy.RuleOrBuilder
    • getDestinationsCount

      public int getDestinationsCount()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDestinationsCount in interface AuthorizationPolicy.RuleOrBuilder
    • getDestinations

      public AuthorizationPolicy.Rule.Destination getDestinations(int index)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDestinations in interface AuthorizationPolicy.RuleOrBuilder
    • setDestinations

      public AuthorizationPolicy.Rule.Builder setDestinations(int index, AuthorizationPolicy.Rule.Destination value)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • setDestinations

      public AuthorizationPolicy.Rule.Builder setDestinations(int index, AuthorizationPolicy.Rule.Destination.Builder builderForValue)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addDestinations

       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addDestinations

      public AuthorizationPolicy.Rule.Builder addDestinations(int index, AuthorizationPolicy.Rule.Destination value)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addDestinations

       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addDestinations

      public AuthorizationPolicy.Rule.Builder addDestinations(int index, AuthorizationPolicy.Rule.Destination.Builder builderForValue)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addAllDestinations

       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • clearDestinations

      public AuthorizationPolicy.Rule.Builder clearDestinations()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • removeDestinations

      public AuthorizationPolicy.Rule.Builder removeDestinations(int index)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getDestinationsBuilder

      public AuthorizationPolicy.Rule.Destination.Builder getDestinationsBuilder(int index)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getDestinationsOrBuilder

      public AuthorizationPolicy.Rule.DestinationOrBuilder getDestinationsOrBuilder(int index)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDestinationsOrBuilder in interface AuthorizationPolicy.RuleOrBuilder
    • getDestinationsOrBuilderList

      public List<? extends AuthorizationPolicy.Rule.DestinationOrBuilder> getDestinationsOrBuilderList()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDestinationsOrBuilderList in interface AuthorizationPolicy.RuleOrBuilder
    • addDestinationsBuilder

      public AuthorizationPolicy.Rule.Destination.Builder addDestinationsBuilder()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addDestinationsBuilder

      public AuthorizationPolicy.Rule.Destination.Builder addDestinationsBuilder(int index)
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getDestinationsBuilderList

      public List<AuthorizationPolicy.Rule.Destination.Builder> getDestinationsBuilderList()
       Optional. List of attributes for the traffic destination. All of the
       destinations must match. A destination is a match if a request matches
       all the specified hosts, ports, methods and headers. If not set, the
       action specified in the 'action' field will be applied without any rule
       checks for the destination.
       
      repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL];