All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dekorate.jib.config.JibBuildConfig Maven / Gradle / Ivy

The newest version!
package io.dekorate.jib.config;

import io.dekorate.project.Project;
import io.dekorate.kubernetes.config.ConfigKey;
import io.dekorate.kubernetes.config.ImageConfiguration;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import io.sundr.builder.annotations.Buildable;

/**
 * Generated
 */
@Buildable(refs = {@io.sundr.builder.annotations.BuildableReference(io.dekorate.project.Project.class),@io.sundr.builder.annotations.BuildableReference(io.dekorate.project.BuildInfo.class)} ,builderPackage = "io.fabric8.kubernetes.api.builder")
public class JibBuildConfig extends ImageConfiguration{
  public JibBuildConfig() {
  }
  
  public JibBuildConfig(Project project,Map attributes,Boolean enabled,String registry,String group,String name,String version,String image,String dockerFile,Boolean autoBuildEnabled,Boolean autoPushEnabled,Boolean autoLoadEnabled,Boolean dockerBuild,String from,Boolean autoDeployEnabled) {
    super(project, attributes, enabled, registry, group, name, version, image, dockerFile, autoBuildEnabled, autoPushEnabled, autoLoadEnabled);
    this.dockerBuild = dockerBuild;
    this.from = from;
    this.autoDeployEnabled = autoDeployEnabled;
  }
  private Boolean dockerBuild;
  private String from;
  private Boolean autoDeployEnabled;
  
  
  /**
   * Flag that indicates whether to perform a docker build (build using the docker daemon) or not.
   * @return true, if docker build is desired, false otherwise.
   */
  public Boolean getDockerBuild() {
    return this.dockerBuild;
  }
  
  
  /**
   * Flag that indicates whether to perform a docker build (build using the docker daemon) or not.
   * @return true, if docker build is desired, false otherwise.
   */
  public boolean isDockerBuild() {
    return this.dockerBuild != null &&  this.dockerBuild;
  }
  
  
  /**
   * The base image to use.
   * @return The base image.
   */
  public String getFrom() {
    return this.from;
  }
  
  
  /**
   * Flag to trigger the registration of the deploy hook. It's generally
   * preferable to use `-Ddekorate.deploy=true` instead of hardcoding this here.
   * @return True for automatic registration of the build hook.
   */
  public Boolean getAutoDeployEnabled() {
    return this.autoDeployEnabled;
  }
  
  
  /**
   * Flag to trigger the registration of the deploy hook. It's generally
   * preferable to use `-Ddekorate.deploy=true` instead of hardcoding this here.
   * @return True for automatic registration of the build hook.
   */
  public boolean isAutoDeployEnabled() {
    return this.autoDeployEnabled != null &&  this.autoDeployEnabled;
  }
  
  public static JibBuildConfigBuilder newJibBuildConfigBuilder() {
    return new JibBuildConfigBuilder();
  }
  
  public static JibBuildConfigBuilder newJibBuildConfigBuilderFromDefaults() {
    return new JibBuildConfigBuilder().withEnabled(true).withDockerBuild(true).withFrom("openjdk:8-jdk").withAutoPushEnabled(false).withAutoBuildEnabled(false).withAutoDeployEnabled(false);
  }
  
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    JibBuildConfig that = (JibBuildConfig) o;
    if (!java.util.Objects.equals(dockerBuild, that.dockerBuild)) return false;
    if (!java.util.Objects.equals(from, that.from)) return false;
    if (!java.util.Objects.equals(autoDeployEnabled, that.autoDeployEnabled)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(dockerBuild,  from,  autoDeployEnabled,  super.hashCode());
  }
  

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy