Class InvocationPolicyOuterClass.FlagPolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.FlagPolicy
All Implemented Interfaces:
InvocationPolicyOuterClass.FlagPolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
InvocationPolicyOuterClass

public static final class InvocationPolicyOuterClass.FlagPolicy extends com.google.protobuf.GeneratedMessage implements InvocationPolicyOuterClass.FlagPolicyOrBuilder
 A policy for controlling the value of a flag.
 
Protobuf type blaze.invocation_policy.FlagPolicy
See Also:
  • Field Details

    • FLAG_NAME_FIELD_NUMBER

      public static final int FLAG_NAME_FIELD_NUMBER
      See Also:
    • COMMANDS_FIELD_NUMBER

      public static final int COMMANDS_FIELD_NUMBER
      See Also:
    • SET_VALUE_FIELD_NUMBER

      public static final int SET_VALUE_FIELD_NUMBER
      See Also:
    • USE_DEFAULT_FIELD_NUMBER

      public static final int USE_DEFAULT_FIELD_NUMBER
      See Also:
    • DISALLOW_VALUES_FIELD_NUMBER

      public static final int DISALLOW_VALUES_FIELD_NUMBER
      See Also:
    • ALLOW_VALUES_FIELD_NUMBER

      public static final int ALLOW_VALUES_FIELD_NUMBER
      See Also:
  • 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
    • getOperationCase

      Specified by:
      getOperationCase in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
    • hasFlagName

      public boolean hasFlagName()
       The name of the flag to enforce this policy on.
      
       Note that this should be the full name of the flag, not the abbreviated
       name of the flag. If the user specifies the abbreviated name of a flag,
       that flag will be matched using its full name.
      
       The "no" prefix will not be parsed, so for boolean flags, use
       the flag's full name and explicitly set it to true or false.
       
      optional string flag_name = 1;
      Specified by:
      hasFlagName in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      Whether the flagName field is set.
    • getFlagName

      public String getFlagName()
       The name of the flag to enforce this policy on.
      
       Note that this should be the full name of the flag, not the abbreviated
       name of the flag. If the user specifies the abbreviated name of a flag,
       that flag will be matched using its full name.
      
       The "no" prefix will not be parsed, so for boolean flags, use
       the flag's full name and explicitly set it to true or false.
       
      optional string flag_name = 1;
      Specified by:
      getFlagName in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The flagName.
    • getFlagNameBytes

      public com.google.protobuf.ByteString getFlagNameBytes()
       The name of the flag to enforce this policy on.
      
       Note that this should be the full name of the flag, not the abbreviated
       name of the flag. If the user specifies the abbreviated name of a flag,
       that flag will be matched using its full name.
      
       The "no" prefix will not be parsed, so for boolean flags, use
       the flag's full name and explicitly set it to true or false.
       
      optional string flag_name = 1;
      Specified by:
      getFlagNameBytes in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The bytes for flagName.
    • getCommandsList

      public com.google.protobuf.ProtocolStringList getCommandsList()
       If set, this flag policy is applied only if one of the given commands or a
       command that inherits from one of the given commands is being run. For
       instance, if "build" is one of the commands here, then this policy will
       apply to any command that inherits from build, such as info, coverage, or
       test. If empty, this flag policy is applied for all commands. This allows
       the policy setter to add all policies to the proto without having to
       determine which Bazel command the user is actually running. Additionally,
       Bazel allows multiple flags to be defined by the same name, and the
       specific flag definition is determined by the command.
       
      repeated string commands = 2;
      Specified by:
      getCommandsList in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      A list containing the commands.
    • getCommandsCount

      public int getCommandsCount()
       If set, this flag policy is applied only if one of the given commands or a
       command that inherits from one of the given commands is being run. For
       instance, if "build" is one of the commands here, then this policy will
       apply to any command that inherits from build, such as info, coverage, or
       test. If empty, this flag policy is applied for all commands. This allows
       the policy setter to add all policies to the proto without having to
       determine which Bazel command the user is actually running. Additionally,
       Bazel allows multiple flags to be defined by the same name, and the
       specific flag definition is determined by the command.
       
      repeated string commands = 2;
      Specified by:
      getCommandsCount in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The count of commands.
    • getCommands

      public String getCommands(int index)
       If set, this flag policy is applied only if one of the given commands or a
       command that inherits from one of the given commands is being run. For
       instance, if "build" is one of the commands here, then this policy will
       apply to any command that inherits from build, such as info, coverage, or
       test. If empty, this flag policy is applied for all commands. This allows
       the policy setter to add all policies to the proto without having to
       determine which Bazel command the user is actually running. Additionally,
       Bazel allows multiple flags to be defined by the same name, and the
       specific flag definition is determined by the command.
       
      repeated string commands = 2;
      Specified by:
      getCommands in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The commands at the given index.
    • getCommandsBytes

      public com.google.protobuf.ByteString getCommandsBytes(int index)
       If set, this flag policy is applied only if one of the given commands or a
       command that inherits from one of the given commands is being run. For
       instance, if "build" is one of the commands here, then this policy will
       apply to any command that inherits from build, such as info, coverage, or
       test. If empty, this flag policy is applied for all commands. This allows
       the policy setter to add all policies to the proto without having to
       determine which Bazel command the user is actually running. Additionally,
       Bazel allows multiple flags to be defined by the same name, and the
       specific flag definition is determined by the command.
       
      repeated string commands = 2;
      Specified by:
      getCommandsBytes in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the commands at the given index.
    • hasSetValue

      public boolean hasSetValue()
      .blaze.invocation_policy.SetValue set_value = 3;
      Specified by:
      hasSetValue in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      Whether the setValue field is set.
    • getSetValue

      .blaze.invocation_policy.SetValue set_value = 3;
      Specified by:
      getSetValue in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The setValue.
    • getSetValueOrBuilder

      public InvocationPolicyOuterClass.SetValueOrBuilder getSetValueOrBuilder()
      .blaze.invocation_policy.SetValue set_value = 3;
      Specified by:
      getSetValueOrBuilder in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
    • hasUseDefault

      public boolean hasUseDefault()
      .blaze.invocation_policy.UseDefault use_default = 4;
      Specified by:
      hasUseDefault in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      Whether the useDefault field is set.
    • getUseDefault

      public InvocationPolicyOuterClass.UseDefault getUseDefault()
      .blaze.invocation_policy.UseDefault use_default = 4;
      Specified by:
      getUseDefault in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The useDefault.
    • getUseDefaultOrBuilder

      public InvocationPolicyOuterClass.UseDefaultOrBuilder getUseDefaultOrBuilder()
      .blaze.invocation_policy.UseDefault use_default = 4;
      Specified by:
      getUseDefaultOrBuilder in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
    • hasDisallowValues

      public boolean hasDisallowValues()
      .blaze.invocation_policy.DisallowValues disallow_values = 5;
      Specified by:
      hasDisallowValues in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      Whether the disallowValues field is set.
    • getDisallowValues

      public InvocationPolicyOuterClass.DisallowValues getDisallowValues()
      .blaze.invocation_policy.DisallowValues disallow_values = 5;
      Specified by:
      getDisallowValues in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The disallowValues.
    • getDisallowValuesOrBuilder

      public InvocationPolicyOuterClass.DisallowValuesOrBuilder getDisallowValuesOrBuilder()
      .blaze.invocation_policy.DisallowValues disallow_values = 5;
      Specified by:
      getDisallowValuesOrBuilder in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
    • hasAllowValues

      public boolean hasAllowValues()
      .blaze.invocation_policy.AllowValues allow_values = 6;
      Specified by:
      hasAllowValues in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      Whether the allowValues field is set.
    • getAllowValues

      public InvocationPolicyOuterClass.AllowValues getAllowValues()
      .blaze.invocation_policy.AllowValues allow_values = 6;
      Specified by:
      getAllowValues in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
      Returns:
      The allowValues.
    • getAllowValuesOrBuilder

      public InvocationPolicyOuterClass.AllowValuesOrBuilder getAllowValuesOrBuilder()
      .blaze.invocation_policy.AllowValues allow_values = 6;
      Specified by:
      getAllowValuesOrBuilder in interface InvocationPolicyOuterClass.FlagPolicyOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InvocationPolicyOuterClass.FlagPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected InvocationPolicyOuterClass.FlagPolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static InvocationPolicyOuterClass.FlagPolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<InvocationPolicyOuterClass.FlagPolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<InvocationPolicyOuterClass.FlagPolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public InvocationPolicyOuterClass.FlagPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder