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

cd.go.contrib.plugins.configrepo.groovy.dsl.HgMaterial Maven / Gradle / Ivy

// Generated by delombok at Sat Aug 03 22:05:14 PDT 2024
/*
 * Copyright 2022 Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cd.go.contrib.plugins.configrepo.groovy.dsl;

import cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.Configurable;
import com.fasterxml.jackson.annotation.JsonProperty;
import groovy.lang.Closure;
import groovy.lang.DelegatesTo;
import groovy.transform.stc.ClosureParams;
import groovy.transform.stc.SimpleType;
import jakarta.validation.constraints.NotEmpty;
import java.util.function.Consumer;
import static groovy.lang.Closure.DELEGATE_ONLY;

/**
 * Represents a
 * hg material config.
 * 

* {@includeCode hg.material.groovy} * * @see hg material config. * for detailed description of hg config. */ public class HgMaterial extends ScmMaterial { @JsonProperty("url") @NotEmpty private String url; public HgMaterial() { this(null); } public HgMaterial(@DelegatesTo(value = HgMaterial.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.HgMaterial") Closure cl) { this(null, cl); } public HgMaterial(String name, @DelegatesTo(value = HgMaterial.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.HgMaterial") Closure cl) { super(name); configure(cl); } public HgMaterial(String name, Consumer configure) { super(name, configure); } @Override public HgMaterial dup(@DelegatesTo(value = HgMaterial.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.HgMaterial") Closure config) { return Configurable.applyTo(config, deepClone()); } @Override protected HgMaterial deepClone() { return new HgMaterial(name, h -> { injectSettings(h); h.url = url; }); } @java.lang.SuppressWarnings("all") @lombok.Generated public String getUrl() { return this.url; } @JsonProperty("url") @java.lang.SuppressWarnings("all") @lombok.Generated public void setUrl(final String url) { this.url = url; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof HgMaterial)) return false; final HgMaterial other = (HgMaterial) o; if (!other.canEqual((java.lang.Object) this)) return false; if (!super.equals(o)) return false; final java.lang.Object this$url = this.getUrl(); final java.lang.Object other$url = other.getUrl(); if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false; return true; } @java.lang.SuppressWarnings("all") @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof HgMaterial; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public int hashCode() { final int PRIME = 59; int result = super.hashCode(); final java.lang.Object $url = this.getUrl(); result = result * PRIME + ($url == null ? 43 : $url.hashCode()); return result; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public java.lang.String toString() { return "HgMaterial(super=" + super.toString() + ", url=" + this.getUrl() + ")"; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy