Class Message

java.lang.Object
com.google.api.generator.gapic.model.Message

public abstract class Message extends Object
  • Constructor Details

    • Message

      public Message()
  • Method Details

    • name

      public abstract String name()
    • fullProtoName

      public abstract String fullProtoName()
    • fields

      public abstract com.google.common.collect.ImmutableList<Field> fields()
    • enumValues

      public abstract com.google.common.collect.ImmutableMap<String,Integer> enumValues()
      This Message POJO is used to represent both proto-messages and proto-enums.
      Returns:
      an empty map if this instance represents a proto-message, otherwise the proto-enum's String-number value map.
    • type

      public abstract TypeNode type()
    • fieldMap

      public abstract com.google.common.collect.ImmutableMap<String,Field> fieldMap()
    • operationResponse

      @Nullable public abstract OperationResponse operationResponse()
    • operationRequestFields

      public abstract Map<String,String> operationRequestFields()
    • operationResponseFields

      public abstract com.google.common.collect.BiMap<String,String> operationResponseFields()
    • resource

      @Nullable public abstract ResourceName resource()
    • outerNestedTypes

      public abstract com.google.common.collect.ImmutableList<String> outerNestedTypes()
    • nestedEnums

      public abstract com.google.common.collect.ImmutableList<String> nestedEnums()
      This Message POJO is used to represent both proto-messages and proto-enums.

      If this instance represents a proto-enum (this.isEnum() == true), this method will always return an empty list, since enums cannot contain nested enums.

      If this instance represents a proto-message (this.isEnum() == false), this method returns a list of any nested proto-enums defined in this proto-message.

    • toBuilder

      public abstract Message.Builder toBuilder()
    • isEnum

      public boolean isEnum()
      This Message POJO is used to represent both proto-messages and proto-enums.
      Returns:
      true, when this instance represents a proto-enum.
    • hasResource

      public boolean hasResource()
    • validateField

      public void validateField(String fieldName, Map<String,Message> messageTypes, TypeNode type)
      Validates if the field or fields exist in the message and the type of the leaf level field.
      Parameters:
      fieldName - The field name. For nested field, concatenate each field name with dot. For example: abc.def.ghi
      messageTypes - All messages configured in a rpc service.
      type - TypeNode The expected type for the leaf level field
    • findAndUnwrapPaginatedRepeatedField

      @Nullable public Field findAndUnwrapPaginatedRepeatedField()
      Returns the first list repeated field in a message, unwrapped from its list type.
    • builder

      public static Message.Builder builder()