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

cd.go.contrib.plugins.configrepo.groovy.dsl.P4Material 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
 * p4 material config.
 * 

* {@includeCode p4.material.groovy } * * @see p4 material config. * for detailed description of p4 config. */ public class P4Material extends ScmMaterial { @JsonProperty("port") private String port; @JsonProperty("use_tickets") private Boolean useTickets; @JsonProperty("view") @NotEmpty private String view; public P4Material(String name, Consumer configure) { super(name, configure); } public P4Material() { this(null); } public P4Material(@DelegatesTo(value = P4Material.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.P4Material") Closure cl) { this(null, cl); } public P4Material(String name, @DelegatesTo(value = P4Material.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.P4Material") Closure cl) { super(name); configure(cl); } @Override public P4Material dup(@DelegatesTo(value = P4Material.class, strategy = DELEGATE_ONLY) @ClosureParams(value = SimpleType.class, options = "cd.go.contrib.plugins.configrepo.groovy.dsl.P4Material") Closure config) { return Configurable.applyTo(config, deepClone()); } @Override protected P4Material deepClone() { return new P4Material(name, p -> { injectSettings(p); p.port = port; p.view = view; p.useTickets = useTickets; }); } @java.lang.SuppressWarnings("all") @lombok.Generated public String getPort() { return this.port; } @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getUseTickets() { return this.useTickets; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getView() { return this.view; } @JsonProperty("port") @java.lang.SuppressWarnings("all") @lombok.Generated public void setPort(final String port) { this.port = port; } @JsonProperty("use_tickets") @java.lang.SuppressWarnings("all") @lombok.Generated public void setUseTickets(final Boolean useTickets) { this.useTickets = useTickets; } @JsonProperty("view") @java.lang.SuppressWarnings("all") @lombok.Generated public void setView(final String view) { this.view = view; } @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 P4Material)) return false; final P4Material other = (P4Material) o; if (!other.canEqual((java.lang.Object) this)) return false; if (!super.equals(o)) return false; final java.lang.Object this$useTickets = this.getUseTickets(); final java.lang.Object other$useTickets = other.getUseTickets(); if (this$useTickets == null ? other$useTickets != null : !this$useTickets.equals(other$useTickets)) return false; final java.lang.Object this$port = this.getPort(); final java.lang.Object other$port = other.getPort(); if (this$port == null ? other$port != null : !this$port.equals(other$port)) return false; final java.lang.Object this$view = this.getView(); final java.lang.Object other$view = other.getView(); if (this$view == null ? other$view != null : !this$view.equals(other$view)) return false; return true; } @java.lang.SuppressWarnings("all") @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof P4Material; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public int hashCode() { final int PRIME = 59; int result = super.hashCode(); final java.lang.Object $useTickets = this.getUseTickets(); result = result * PRIME + ($useTickets == null ? 43 : $useTickets.hashCode()); final java.lang.Object $port = this.getPort(); result = result * PRIME + ($port == null ? 43 : $port.hashCode()); final java.lang.Object $view = this.getView(); result = result * PRIME + ($view == null ? 43 : $view.hashCode()); return result; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public java.lang.String toString() { return "P4Material(super=" + super.toString() + ", port=" + this.getPort() + ", useTickets=" + this.getUseTickets() + ", view=" + this.getView() + ")"; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy