content: package creational.builder;
  
  import lombok.Getter;
  
  @Getter
  public class House {
      private final String material;
      private final String structure;
      private final String roof;
      private final boolean hasGarage;
      private final boolean hasSwimmingPool;
      private final boolean hasGarden;
  
      public House(Builder builder) {
          this.material = builder.material;
          this.structure = builder.structure;
          this.roof = builder.roof;
          this.hasGarage = builder.hasGarage;
          this.hasSwimmingPool = builder.hasSwimmingPool;
          this.hasGarden = builder.hasGarden;
      }
  
      @Override
      public String toString() {
          return "House{" +
                  "material='" + material + '\'' +
                  ", structure='" + structure + '\'' +
                  ", roof='" + roof + '\'' +
                  ", hasGarage=" + hasGarage +
                  ", hasSwimmingPool=" + hasSwimmingPool +
                  ", hasGarden=" + hasGarden +
                  '}';
      }
  
      public static class Builder {
          private final String material;
          private final String structure;
          private final String roof;
          private boolean hasGarage;
          private boolean hasSwimmingPool;
          private boolean hasGarden;
  
          public Builder(String material, String structure, String roof) {
              this.material = material;
              this.structure = structure;
              this.roof = roof;
          }
  
          public Builder hasGarage(boolean hasGarage) {
              this.hasGarage = hasGarage;
              return this;
          }
  
          public Builder hasSwimmingPool(boolean hasSwimmingPool) {
              this.hasGarage = hasSwimmingPool;
              return this;
          }
  
          public Builder hasGarden(boolean hasGarden) {
              this.hasGarden = hasGarden;
              return this;
          }
  
          public House build() {
              return new House(this);
          }
      }
  }
  