Class MetalakeDTO.Builder<S extends MetalakeDTO.Builder>

java.lang.Object
org.apache.gravitino.dto.MetalakeDTO.Builder<S>
Type Parameters:
S - The type of the builder subclass.
Enclosing class:
MetalakeDTO

public static class MetalakeDTO.Builder<S extends MetalakeDTO.Builder> extends Object
A builder class for constructing instances of MetalakeDTO.
  • Field Details

    • name

      protected String name
      The name of the Metalake DTO.
    • comment

      protected String comment
      The comment of the Metalake DTO.
    • properties

      protected Map<String,String> properties
      The properties of the Metalake DTO.
    • audit

      protected AuditDTO audit
      The audit information of the Metalake DTO.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor.
  • Method Details

    • withName

      public S withName(String name)
      Sets the name of the Metalake DTO.
      Parameters:
      name - The name of the Metalake DTO.
      Returns:
      The builder instance.
    • withComment

      public S withComment(String comment)
      Sets the comment of the Metalake DTO.
      Parameters:
      comment - The comment of the Metalake DTO.
      Returns:
      The builder instance.
    • withProperties

      public S withProperties(Map<String,String> properties)
      Sets the properties of the Metalake DTO.
      Parameters:
      properties - The properties of the Metalake DTO.
      Returns:
      The builder instance.
    • withAudit

      public S withAudit(AuditDTO audit)
      Sets the audit information of the Metalake DTO.
      Parameters:
      audit - The audit information of the Metalake DTO.
      Returns:
      The builder instance.
    • build

      public MetalakeDTO build()
      Builds an instance of MetalakeDTO using the builder's properties.
      Returns:
      An instance of MetalakeDTO.
      Throws:
      IllegalArgumentException - If the name or audit are not set.