Package p4.v1

Class P4RuntimeOuterClass.TableEntry

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
p4.v1.P4RuntimeOuterClass.TableEntry
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, P4RuntimeOuterClass.TableEntryOrBuilder
Enclosing class:
P4RuntimeOuterClass

public static final class P4RuntimeOuterClass.TableEntry extends com.google.protobuf.GeneratedMessage implements P4RuntimeOuterClass.TableEntryOrBuilder
Protobuf type p4.v1.TableEntry
See Also:
  • Field Details

    • TABLE_ID_FIELD_NUMBER

      public static final int TABLE_ID_FIELD_NUMBER
      See Also:
    • MATCH_FIELD_NUMBER

      public static final int MATCH_FIELD_NUMBER
      See Also:
    • ACTION_FIELD_NUMBER

      public static final int ACTION_FIELD_NUMBER
      See Also:
    • PRIORITY_FIELD_NUMBER

      public static final int PRIORITY_FIELD_NUMBER
      See Also:
    • CONTROLLER_METADATA_FIELD_NUMBER

      public static final int CONTROLLER_METADATA_FIELD_NUMBER
      See Also:
    • METER_CONFIG_FIELD_NUMBER

      public static final int METER_CONFIG_FIELD_NUMBER
      See Also:
    • COUNTER_DATA_FIELD_NUMBER

      public static final int COUNTER_DATA_FIELD_NUMBER
      See Also:
    • METER_COUNTER_DATA_FIELD_NUMBER

      public static final int METER_COUNTER_DATA_FIELD_NUMBER
      See Also:
    • IS_DEFAULT_ACTION_FIELD_NUMBER

      public static final int IS_DEFAULT_ACTION_FIELD_NUMBER
      See Also:
    • IDLE_TIMEOUT_NS_FIELD_NUMBER

      public static final int IDLE_TIMEOUT_NS_FIELD_NUMBER
      See Also:
    • TIME_SINCE_LAST_HIT_FIELD_NUMBER

      public static final int TIME_SINCE_LAST_HIT_FIELD_NUMBER
      See Also:
    • METADATA_FIELD_NUMBER

      public static final int METADATA_FIELD_NUMBER
      See Also:
    • IS_CONST_FIELD_NUMBER

      public static final int IS_CONST_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getTableId

      public int getTableId()
      uint32 table_id = 1;
      Specified by:
      getTableId in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The tableId.
    • getMatchList

      public List<P4RuntimeOuterClass.FieldMatch> getMatchList()
      repeated .p4.v1.FieldMatch match = 2;
      Specified by:
      getMatchList in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getMatchOrBuilderList

      public List<? extends P4RuntimeOuterClass.FieldMatchOrBuilder> getMatchOrBuilderList()
      repeated .p4.v1.FieldMatch match = 2;
      Specified by:
      getMatchOrBuilderList in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getMatchCount

      public int getMatchCount()
      repeated .p4.v1.FieldMatch match = 2;
      Specified by:
      getMatchCount in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getMatch

      public P4RuntimeOuterClass.FieldMatch getMatch(int index)
      repeated .p4.v1.FieldMatch match = 2;
      Specified by:
      getMatch in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getMatchOrBuilder

      public P4RuntimeOuterClass.FieldMatchOrBuilder getMatchOrBuilder(int index)
      repeated .p4.v1.FieldMatch match = 2;
      Specified by:
      getMatchOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • hasAction

      public boolean hasAction()
      .p4.v1.TableAction action = 3;
      Specified by:
      hasAction in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      Whether the action field is set.
    • getAction

      public P4RuntimeOuterClass.TableAction getAction()
      .p4.v1.TableAction action = 3;
      Specified by:
      getAction in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The action.
    • getActionOrBuilder

      public P4RuntimeOuterClass.TableActionOrBuilder getActionOrBuilder()
      .p4.v1.TableAction action = 3;
      Specified by:
      getActionOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getPriority

      public int getPriority()
       Should only be set if the match implies a TCAM lookup, i.e. at least one of
       the match fields is Optional, Ternary or Range.  A higher number indicates
       higher priority.  Only a highest priority entry that matches the packet
       must be selected.  Multiple entries in the same table with the same
       priority value are permitted.  See Section "TableEntry" in the
       specification for details of the behavior.
       
      int32 priority = 4;
      Specified by:
      getPriority in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The priority.
    • getControllerMetadata

      @Deprecated public long getControllerMetadata()
      Deprecated.
      p4.v1.TableEntry.controller_metadata is deprecated. See p4/v1/p4runtime.proto;l=164
       Metadata (cookie) opaque to the target. There is no requirement of where
       this is stored, as long as it is returned with the rest of the entry in
       a Read RPC. This is deprecated in favor of the more flexible metadata
       field.
       
      uint64 controller_metadata = 5 [deprecated = true];
      Specified by:
      getControllerMetadata in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The controllerMetadata.
    • hasMeterConfig

      public boolean hasMeterConfig()
       meter_config, counter_data and meter_counter_data are convenience fields
       that enable the controller to configure the direct resources associated
       with the table at the same time as a match-action entry is inserted or
       modified.
       Table write:
       - If the table does not contain a direct resource, then setting the
       corresponding direct resource field in any table write operation will
       return an error.
       - When inserting a new table entry, leaving these fields unset means that
       the direct resources of this table (if any) will assume default values.
       For counters, the default value is 0, and for meters, the default value
       is always green.
       - When updating a table entry, leaving meter_config unset will reset the
       meter (if any) to its default configuration, while leaving counter_data
       or meter_counter_data unset means that the counter (if any) will not be
       updated.
       Table read:
       - If the table does not contain a direct resource, then the corresponding
       field will not be set in the read table entry.
       - If meter_config is unset in the request, or if the meter has a default
       configuration, meter_config will not be set in the response.
       - If counter_data or meter_counter_data is unset in the request, it will
       be unset in the response as well.
       
      .p4.v1.MeterConfig meter_config = 6;
      Specified by:
      hasMeterConfig in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      Whether the meterConfig field is set.
    • getMeterConfig

      public P4RuntimeOuterClass.MeterConfig getMeterConfig()
       meter_config, counter_data and meter_counter_data are convenience fields
       that enable the controller to configure the direct resources associated
       with the table at the same time as a match-action entry is inserted or
       modified.
       Table write:
       - If the table does not contain a direct resource, then setting the
       corresponding direct resource field in any table write operation will
       return an error.
       - When inserting a new table entry, leaving these fields unset means that
       the direct resources of this table (if any) will assume default values.
       For counters, the default value is 0, and for meters, the default value
       is always green.
       - When updating a table entry, leaving meter_config unset will reset the
       meter (if any) to its default configuration, while leaving counter_data
       or meter_counter_data unset means that the counter (if any) will not be
       updated.
       Table read:
       - If the table does not contain a direct resource, then the corresponding
       field will not be set in the read table entry.
       - If meter_config is unset in the request, or if the meter has a default
       configuration, meter_config will not be set in the response.
       - If counter_data or meter_counter_data is unset in the request, it will
       be unset in the response as well.
       
      .p4.v1.MeterConfig meter_config = 6;
      Specified by:
      getMeterConfig in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The meterConfig.
    • getMeterConfigOrBuilder

      public P4RuntimeOuterClass.MeterConfigOrBuilder getMeterConfigOrBuilder()
       meter_config, counter_data and meter_counter_data are convenience fields
       that enable the controller to configure the direct resources associated
       with the table at the same time as a match-action entry is inserted or
       modified.
       Table write:
       - If the table does not contain a direct resource, then setting the
       corresponding direct resource field in any table write operation will
       return an error.
       - When inserting a new table entry, leaving these fields unset means that
       the direct resources of this table (if any) will assume default values.
       For counters, the default value is 0, and for meters, the default value
       is always green.
       - When updating a table entry, leaving meter_config unset will reset the
       meter (if any) to its default configuration, while leaving counter_data
       or meter_counter_data unset means that the counter (if any) will not be
       updated.
       Table read:
       - If the table does not contain a direct resource, then the corresponding
       field will not be set in the read table entry.
       - If meter_config is unset in the request, or if the meter has a default
       configuration, meter_config will not be set in the response.
       - If counter_data or meter_counter_data is unset in the request, it will
       be unset in the response as well.
       
      .p4.v1.MeterConfig meter_config = 6;
      Specified by:
      getMeterConfigOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • hasCounterData

      public boolean hasCounterData()
      .p4.v1.CounterData counter_data = 7;
      Specified by:
      hasCounterData in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      Whether the counterData field is set.
    • getCounterData

      public P4RuntimeOuterClass.CounterData getCounterData()
      .p4.v1.CounterData counter_data = 7;
      Specified by:
      getCounterData in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The counterData.
    • getCounterDataOrBuilder

      public P4RuntimeOuterClass.CounterDataOrBuilder getCounterDataOrBuilder()
      .p4.v1.CounterData counter_data = 7;
      Specified by:
      getCounterDataOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • hasMeterCounterData

      public boolean hasMeterCounterData()
       Per color counters for tables with a direct meter.
       Added in v1.4.0
       
      .p4.v1.MeterCounterData meter_counter_data = 12;
      Specified by:
      hasMeterCounterData in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      Whether the meterCounterData field is set.
    • getMeterCounterData

      public P4RuntimeOuterClass.MeterCounterData getMeterCounterData()
       Per color counters for tables with a direct meter.
       Added in v1.4.0
       
      .p4.v1.MeterCounterData meter_counter_data = 12;
      Specified by:
      getMeterCounterData in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The meterCounterData.
    • getMeterCounterDataOrBuilder

      public P4RuntimeOuterClass.MeterCounterDataOrBuilder getMeterCounterDataOrBuilder()
       Per color counters for tables with a direct meter.
       Added in v1.4.0
       
      .p4.v1.MeterCounterData meter_counter_data = 12;
      Specified by:
      getMeterCounterDataOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getIsDefaultAction

      public boolean getIsDefaultAction()
       Set to true if the table entry is being used to update the non-const
       default action of the table. If true, the "match" field must be empty and
       the "action" field must be populated with a valid direct action.
       
      bool is_default_action = 8;
      Specified by:
      getIsDefaultAction in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The isDefaultAction.
    • getIdleTimeoutNs

      public long getIdleTimeoutNs()
       The TTL for the entry, in nanoseconds. A value of 0 means that the table
       entry never "expires".
       
      int64 idle_timeout_ns = 9;
      Specified by:
      getIdleTimeoutNs in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The idleTimeoutNs.
    • hasTimeSinceLastHit

      public boolean hasTimeSinceLastHit()
       Table write: this field should be left unset.
       Table read: if the table supports idle timeout and time_since_last_hit is
       set in the request, this field will be set in the response.
       
      .p4.v1.TableEntry.IdleTimeout time_since_last_hit = 10;
      Specified by:
      hasTimeSinceLastHit in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      Whether the timeSinceLastHit field is set.
    • getTimeSinceLastHit

      public P4RuntimeOuterClass.TableEntry.IdleTimeout getTimeSinceLastHit()
       Table write: this field should be left unset.
       Table read: if the table supports idle timeout and time_since_last_hit is
       set in the request, this field will be set in the response.
       
      .p4.v1.TableEntry.IdleTimeout time_since_last_hit = 10;
      Specified by:
      getTimeSinceLastHit in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The timeSinceLastHit.
    • getTimeSinceLastHitOrBuilder

      public P4RuntimeOuterClass.TableEntry.IdleTimeoutOrBuilder getTimeSinceLastHitOrBuilder()
       Table write: this field should be left unset.
       Table read: if the table supports idle timeout and time_since_last_hit is
       set in the request, this field will be set in the response.
       
      .p4.v1.TableEntry.IdleTimeout time_since_last_hit = 10;
      Specified by:
      getTimeSinceLastHitOrBuilder in interface P4RuntimeOuterClass.TableEntryOrBuilder
    • getMetadata

      public com.google.protobuf.ByteString getMetadata()
       Arbitrary metadata from the controller that is opaque to the target.
       
      bytes metadata = 11;
      Specified by:
      getMetadata in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The metadata.
    • getIsConst

      public boolean getIsConst()
       True if and only if the entry cannot be deleted or modified,
       i.e. any of the following:
       + Any entry read from a table declared with `const entries`
       + The default entry read from a table declared with `const
       default_action`
       + Any entry declared with `entries` without the `const` qualifier
       before `entries`, where the individual entry has the `const`
       qualifier on it in the P4 source code.
       Note: Older P4Runtime API servers before the `is_const` field was
       added to this message will not return a value for `is_const` in
       the first two cases above, but newer P4Runtime API servers will.
       Added in 1.4.0.
       
      bool is_const = 13;
      Specified by:
      getIsConst in interface P4RuntimeOuterClass.TableEntryOrBuilder
      Returns:
      The isConst.
    • 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 P4RuntimeOuterClass.TableEntry parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static P4RuntimeOuterClass.TableEntry parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static P4RuntimeOuterClass.TableEntry parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

      public P4RuntimeOuterClass.TableEntry.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static P4RuntimeOuterClass.TableEntry.Builder newBuilder()
    • newBuilder

    • toBuilder

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

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

      public static P4RuntimeOuterClass.TableEntry getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<P4RuntimeOuterClass.TableEntry> parser()
    • getParserForType

      public com.google.protobuf.Parser<P4RuntimeOuterClass.TableEntry> 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 P4RuntimeOuterClass.TableEntry getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder