Package p4.config.v1

Class P4InfoOuterClass.Preamble.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<P4InfoOuterClass.Preamble.Builder>
com.google.protobuf.GeneratedMessage.Builder<P4InfoOuterClass.Preamble.Builder>
p4.config.v1.P4InfoOuterClass.Preamble.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, P4InfoOuterClass.PreambleOrBuilder
Enclosing class:
P4InfoOuterClass.Preamble

public static final class P4InfoOuterClass.Preamble.Builder extends com.google.protobuf.GeneratedMessage.Builder<P4InfoOuterClass.Preamble.Builder> implements P4InfoOuterClass.PreambleOrBuilder
Protobuf type p4.config.v1.Preamble
  • 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<P4InfoOuterClass.Preamble.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<P4InfoOuterClass.Preamble.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<P4InfoOuterClass.Preamble.Builder>
    • getDefaultInstanceForType

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

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

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

      public P4InfoOuterClass.Preamble.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<P4InfoOuterClass.Preamble.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<P4InfoOuterClass.Preamble.Builder>
    • mergeFrom

      public P4InfoOuterClass.Preamble.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<P4InfoOuterClass.Preamble.Builder>
      Throws:
      IOException
    • getId

      public int getId()
       ids share the same number-space; e.g. table ids cannot overlap with counter
       ids. Even though this is irrelevant to this proto definition, the ids are
       allocated in such a way that it is possible based on an id to deduce the
       resource type (e.g. table, action, counter, ...). This means that code
       using these ids can detect if the wrong resource type is used
       somewhere. This also means that ids of different types can be mixed
       (e.g. direct resource list for a table) without ambiguity. Note that id 0
       is reserved and means "invalid id".
       
      uint32 id = 1;
      Specified by:
      getId in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The id.
    • setId

      public P4InfoOuterClass.Preamble.Builder setId(int value)
       ids share the same number-space; e.g. table ids cannot overlap with counter
       ids. Even though this is irrelevant to this proto definition, the ids are
       allocated in such a way that it is possible based on an id to deduce the
       resource type (e.g. table, action, counter, ...). This means that code
       using these ids can detect if the wrong resource type is used
       somewhere. This also means that ids of different types can be mixed
       (e.g. direct resource list for a table) without ambiguity. Note that id 0
       is reserved and means "invalid id".
       
      uint32 id = 1;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

       ids share the same number-space; e.g. table ids cannot overlap with counter
       ids. Even though this is irrelevant to this proto definition, the ids are
       allocated in such a way that it is possible based on an id to deduce the
       resource type (e.g. table, action, counter, ...). This means that code
       using these ids can detect if the wrong resource type is used
       somewhere. This also means that ids of different types can be mixed
       (e.g. direct resource list for a table) without ambiguity. Note that id 0
       is reserved and means "invalid id".
       
      uint32 id = 1;
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       fully qualified name of the P4 object, e.g. c1.c2.ipv4_lpm
       
      string name = 2;
      Specified by:
      getName in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       fully qualified name of the P4 object, e.g. c1.c2.ipv4_lpm
       
      string name = 2;
      Specified by:
      getNameBytes in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The bytes for name.
    • setName

      public P4InfoOuterClass.Preamble.Builder setName(String value)
       fully qualified name of the P4 object, e.g. c1.c2.ipv4_lpm
       
      string name = 2;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       fully qualified name of the P4 object, e.g. c1.c2.ipv4_lpm
       
      string name = 2;
      Returns:
      This builder for chaining.
    • setNameBytes

      public P4InfoOuterClass.Preamble.Builder setNameBytes(com.google.protobuf.ByteString value)
       fully qualified name of the P4 object, e.g. c1.c2.ipv4_lpm
       
      string name = 2;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getAlias

      public String getAlias()
       an alias (alternative name) for the P4 object, probably shorter than its
       fully qualified name. The only constraint is for it to be unique with
       respect to other P4 objects of the same type. By default, the compiler uses
       the shortest suffix of the name that uniquely identifies the object. For
       example if the P4 program contains two tables with names s.c1.t and s.c2.t,
       the default aliases will respectively be c1.t and c2.t. In the future, the
       P4 programmer may also be able to override the default alias for any P4
       object (TBD).
       
      string alias = 3;
      Specified by:
      getAlias in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The alias.
    • getAliasBytes

      public com.google.protobuf.ByteString getAliasBytes()
       an alias (alternative name) for the P4 object, probably shorter than its
       fully qualified name. The only constraint is for it to be unique with
       respect to other P4 objects of the same type. By default, the compiler uses
       the shortest suffix of the name that uniquely identifies the object. For
       example if the P4 program contains two tables with names s.c1.t and s.c2.t,
       the default aliases will respectively be c1.t and c2.t. In the future, the
       P4 programmer may also be able to override the default alias for any P4
       object (TBD).
       
      string alias = 3;
      Specified by:
      getAliasBytes in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The bytes for alias.
    • setAlias

      public P4InfoOuterClass.Preamble.Builder setAlias(String value)
       an alias (alternative name) for the P4 object, probably shorter than its
       fully qualified name. The only constraint is for it to be unique with
       respect to other P4 objects of the same type. By default, the compiler uses
       the shortest suffix of the name that uniquely identifies the object. For
       example if the P4 program contains two tables with names s.c1.t and s.c2.t,
       the default aliases will respectively be c1.t and c2.t. In the future, the
       P4 programmer may also be able to override the default alias for any P4
       object (TBD).
       
      string alias = 3;
      Parameters:
      value - The alias to set.
      Returns:
      This builder for chaining.
    • clearAlias

      public P4InfoOuterClass.Preamble.Builder clearAlias()
       an alias (alternative name) for the P4 object, probably shorter than its
       fully qualified name. The only constraint is for it to be unique with
       respect to other P4 objects of the same type. By default, the compiler uses
       the shortest suffix of the name that uniquely identifies the object. For
       example if the P4 program contains two tables with names s.c1.t and s.c2.t,
       the default aliases will respectively be c1.t and c2.t. In the future, the
       P4 programmer may also be able to override the default alias for any P4
       object (TBD).
       
      string alias = 3;
      Returns:
      This builder for chaining.
    • setAliasBytes

      public P4InfoOuterClass.Preamble.Builder setAliasBytes(com.google.protobuf.ByteString value)
       an alias (alternative name) for the P4 object, probably shorter than its
       fully qualified name. The only constraint is for it to be unique with
       respect to other P4 objects of the same type. By default, the compiler uses
       the shortest suffix of the name that uniquely identifies the object. For
       example if the P4 program contains two tables with names s.c1.t and s.c2.t,
       the default aliases will respectively be c1.t and c2.t. In the future, the
       P4 programmer may also be able to override the default alias for any P4
       object (TBD).
       
      string alias = 3;
      Parameters:
      value - The bytes for alias to set.
      Returns:
      This builder for chaining.
    • getAnnotationsList

      public com.google.protobuf.ProtocolStringList getAnnotationsList()
      repeated string annotations = 4;
      Specified by:
      getAnnotationsList in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      A list containing the annotations.
    • getAnnotationsCount

      public int getAnnotationsCount()
      repeated string annotations = 4;
      Specified by:
      getAnnotationsCount in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The count of annotations.
    • getAnnotations

      public String getAnnotations(int index)
      repeated string annotations = 4;
      Specified by:
      getAnnotations in interface P4InfoOuterClass.PreambleOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The annotations at the given index.
    • getAnnotationsBytes

      public com.google.protobuf.ByteString getAnnotationsBytes(int index)
      repeated string annotations = 4;
      Specified by:
      getAnnotationsBytes in interface P4InfoOuterClass.PreambleOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the annotations at the given index.
    • setAnnotations

      public P4InfoOuterClass.Preamble.Builder setAnnotations(int index, String value)
      repeated string annotations = 4;
      Parameters:
      index - The index to set the value at.
      value - The annotations to set.
      Returns:
      This builder for chaining.
    • addAnnotations

      public P4InfoOuterClass.Preamble.Builder addAnnotations(String value)
      repeated string annotations = 4;
      Parameters:
      value - The annotations to add.
      Returns:
      This builder for chaining.
    • addAllAnnotations

      public P4InfoOuterClass.Preamble.Builder addAllAnnotations(Iterable<String> values)
      repeated string annotations = 4;
      Parameters:
      values - The annotations to add.
      Returns:
      This builder for chaining.
    • clearAnnotations

      public P4InfoOuterClass.Preamble.Builder clearAnnotations()
      repeated string annotations = 4;
      Returns:
      This builder for chaining.
    • addAnnotationsBytes

      public P4InfoOuterClass.Preamble.Builder addAnnotationsBytes(com.google.protobuf.ByteString value)
      repeated string annotations = 4;
      Parameters:
      value - The bytes of the annotations to add.
      Returns:
      This builder for chaining.
    • getAnnotationLocationsList

      public List<P4Types.SourceLocation> getAnnotationLocationsList()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
      Specified by:
      getAnnotationLocationsList in interface P4InfoOuterClass.PreambleOrBuilder
    • getAnnotationLocationsCount

      public int getAnnotationLocationsCount()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
      Specified by:
      getAnnotationLocationsCount in interface P4InfoOuterClass.PreambleOrBuilder
    • getAnnotationLocations

      public P4Types.SourceLocation getAnnotationLocations(int index)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
      Specified by:
      getAnnotationLocations in interface P4InfoOuterClass.PreambleOrBuilder
    • setAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder setAnnotationLocations(int index, P4Types.SourceLocation value)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • setAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder setAnnotationLocations(int index, P4Types.SourceLocation.Builder builderForValue)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder addAnnotationLocations(P4Types.SourceLocation value)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder addAnnotationLocations(int index, P4Types.SourceLocation value)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder addAnnotationLocations(P4Types.SourceLocation.Builder builderForValue)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder addAnnotationLocations(int index, P4Types.SourceLocation.Builder builderForValue)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAllAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder addAllAnnotationLocations(Iterable<? extends P4Types.SourceLocation> values)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • clearAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder clearAnnotationLocations()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • removeAnnotationLocations

      public P4InfoOuterClass.Preamble.Builder removeAnnotationLocations(int index)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • getAnnotationLocationsBuilder

      public P4Types.SourceLocation.Builder getAnnotationLocationsBuilder(int index)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • getAnnotationLocationsOrBuilder

      public P4Types.SourceLocationOrBuilder getAnnotationLocationsOrBuilder(int index)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
      Specified by:
      getAnnotationLocationsOrBuilder in interface P4InfoOuterClass.PreambleOrBuilder
    • getAnnotationLocationsOrBuilderList

      public List<? extends P4Types.SourceLocationOrBuilder> getAnnotationLocationsOrBuilderList()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
      Specified by:
      getAnnotationLocationsOrBuilderList in interface P4InfoOuterClass.PreambleOrBuilder
    • addAnnotationLocationsBuilder

      public P4Types.SourceLocation.Builder addAnnotationLocationsBuilder()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • addAnnotationLocationsBuilder

      public P4Types.SourceLocation.Builder addAnnotationLocationsBuilder(int index)
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • getAnnotationLocationsBuilderList

      public List<P4Types.SourceLocation.Builder> getAnnotationLocationsBuilderList()
       Optional. If present, the location of `annotations[i]` is given by
       `annotation_locations[i]`.
       
      repeated .p4.config.v1.SourceLocation annotation_locations = 7;
    • hasDoc

      public boolean hasDoc()
       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
      Specified by:
      hasDoc in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      Whether the doc field is set.
    • getDoc

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
      Specified by:
      getDoc in interface P4InfoOuterClass.PreambleOrBuilder
      Returns:
      The doc.
    • setDoc

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
    • setDoc

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
    • mergeDoc

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
    • clearDoc

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
    • getDocBuilder

       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
    • getDocOrBuilder

      public P4InfoOuterClass.DocumentationOrBuilder getDocOrBuilder()
       Documentation of the entity
       
      .p4.config.v1.Documentation doc = 5;
      Specified by:
      getDocOrBuilder in interface P4InfoOuterClass.PreambleOrBuilder
    • getStructuredAnnotationsList

      public List<P4Types.StructuredAnnotation> getStructuredAnnotationsList()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
      Specified by:
      getStructuredAnnotationsList in interface P4InfoOuterClass.PreambleOrBuilder
    • getStructuredAnnotationsCount

      public int getStructuredAnnotationsCount()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
      Specified by:
      getStructuredAnnotationsCount in interface P4InfoOuterClass.PreambleOrBuilder
    • getStructuredAnnotations

      public P4Types.StructuredAnnotation getStructuredAnnotations(int index)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
      Specified by:
      getStructuredAnnotations in interface P4InfoOuterClass.PreambleOrBuilder
    • setStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder setStructuredAnnotations(int index, P4Types.StructuredAnnotation value)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • setStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder setStructuredAnnotations(int index, P4Types.StructuredAnnotation.Builder builderForValue)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder addStructuredAnnotations(P4Types.StructuredAnnotation value)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder addStructuredAnnotations(int index, P4Types.StructuredAnnotation value)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder addStructuredAnnotations(P4Types.StructuredAnnotation.Builder builderForValue)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder addStructuredAnnotations(int index, P4Types.StructuredAnnotation.Builder builderForValue)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addAllStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder addAllStructuredAnnotations(Iterable<? extends P4Types.StructuredAnnotation> values)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • clearStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder clearStructuredAnnotations()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • removeStructuredAnnotations

      public P4InfoOuterClass.Preamble.Builder removeStructuredAnnotations(int index)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • getStructuredAnnotationsBuilder

      public P4Types.StructuredAnnotation.Builder getStructuredAnnotationsBuilder(int index)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • getStructuredAnnotationsOrBuilder

      public P4Types.StructuredAnnotationOrBuilder getStructuredAnnotationsOrBuilder(int index)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
      Specified by:
      getStructuredAnnotationsOrBuilder in interface P4InfoOuterClass.PreambleOrBuilder
    • getStructuredAnnotationsOrBuilderList

      public List<? extends P4Types.StructuredAnnotationOrBuilder> getStructuredAnnotationsOrBuilderList()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
      Specified by:
      getStructuredAnnotationsOrBuilderList in interface P4InfoOuterClass.PreambleOrBuilder
    • addStructuredAnnotationsBuilder

      public P4Types.StructuredAnnotation.Builder addStructuredAnnotationsBuilder()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • addStructuredAnnotationsBuilder

      public P4Types.StructuredAnnotation.Builder addStructuredAnnotationsBuilder(int index)
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;
    • getStructuredAnnotationsBuilderList

      public List<P4Types.StructuredAnnotation.Builder> getStructuredAnnotationsBuilderList()
      repeated .p4.config.v1.StructuredAnnotation structured_annotations = 6;