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

software.amazon.awssdk.services.glue.model.WorkflowRunStatistics Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Glue module holds the client classes that are used for communicating with AWS Glue Service

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file 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 software.amazon.awssdk.services.glue.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Workflow run statistics provides statistics about the workflow run. *

*/ @Generated("software.amazon.awssdk:codegen") public final class WorkflowRunStatistics implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TOTAL_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("TotalActions").getter(getter(WorkflowRunStatistics::totalActions)).setter(setter(Builder::totalActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TotalActions").build()).build(); private static final SdkField TIMEOUT_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("TimeoutActions").getter(getter(WorkflowRunStatistics::timeoutActions)) .setter(setter(Builder::timeoutActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TimeoutActions").build()).build(); private static final SdkField FAILED_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("FailedActions").getter(getter(WorkflowRunStatistics::failedActions)) .setter(setter(Builder::failedActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailedActions").build()).build(); private static final SdkField STOPPED_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("StoppedActions").getter(getter(WorkflowRunStatistics::stoppedActions)) .setter(setter(Builder::stoppedActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StoppedActions").build()).build(); private static final SdkField SUCCEEDED_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("SucceededActions").getter(getter(WorkflowRunStatistics::succeededActions)) .setter(setter(Builder::succeededActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SucceededActions").build()).build(); private static final SdkField RUNNING_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("RunningActions").getter(getter(WorkflowRunStatistics::runningActions)) .setter(setter(Builder::runningActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RunningActions").build()).build(); private static final SdkField ERRORED_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("ErroredActions").getter(getter(WorkflowRunStatistics::erroredActions)) .setter(setter(Builder::erroredActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ErroredActions").build()).build(); private static final SdkField WAITING_ACTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("WaitingActions").getter(getter(WorkflowRunStatistics::waitingActions)) .setter(setter(Builder::waitingActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WaitingActions").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TOTAL_ACTIONS_FIELD, TIMEOUT_ACTIONS_FIELD, FAILED_ACTIONS_FIELD, STOPPED_ACTIONS_FIELD, SUCCEEDED_ACTIONS_FIELD, RUNNING_ACTIONS_FIELD, ERRORED_ACTIONS_FIELD, WAITING_ACTIONS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("TotalActions", TOTAL_ACTIONS_FIELD); put("TimeoutActions", TIMEOUT_ACTIONS_FIELD); put("FailedActions", FAILED_ACTIONS_FIELD); put("StoppedActions", STOPPED_ACTIONS_FIELD); put("SucceededActions", SUCCEEDED_ACTIONS_FIELD); put("RunningActions", RUNNING_ACTIONS_FIELD); put("ErroredActions", ERRORED_ACTIONS_FIELD); put("WaitingActions", WAITING_ACTIONS_FIELD); } }); private static final long serialVersionUID = 1L; private final Integer totalActions; private final Integer timeoutActions; private final Integer failedActions; private final Integer stoppedActions; private final Integer succeededActions; private final Integer runningActions; private final Integer erroredActions; private final Integer waitingActions; private WorkflowRunStatistics(BuilderImpl builder) { this.totalActions = builder.totalActions; this.timeoutActions = builder.timeoutActions; this.failedActions = builder.failedActions; this.stoppedActions = builder.stoppedActions; this.succeededActions = builder.succeededActions; this.runningActions = builder.runningActions; this.erroredActions = builder.erroredActions; this.waitingActions = builder.waitingActions; } /** *

* Total number of Actions in the workflow run. *

* * @return Total number of Actions in the workflow run. */ public final Integer totalActions() { return totalActions; } /** *

* Total number of Actions that timed out. *

* * @return Total number of Actions that timed out. */ public final Integer timeoutActions() { return timeoutActions; } /** *

* Total number of Actions that have failed. *

* * @return Total number of Actions that have failed. */ public final Integer failedActions() { return failedActions; } /** *

* Total number of Actions that have stopped. *

* * @return Total number of Actions that have stopped. */ public final Integer stoppedActions() { return stoppedActions; } /** *

* Total number of Actions that have succeeded. *

* * @return Total number of Actions that have succeeded. */ public final Integer succeededActions() { return succeededActions; } /** *

* Total number Actions in running state. *

* * @return Total number Actions in running state. */ public final Integer runningActions() { return runningActions; } /** *

* Indicates the count of job runs in the ERROR state in the workflow run. *

* * @return Indicates the count of job runs in the ERROR state in the workflow run. */ public final Integer erroredActions() { return erroredActions; } /** *

* Indicates the count of job runs in WAITING state in the workflow run. *

* * @return Indicates the count of job runs in WAITING state in the workflow run. */ public final Integer waitingActions() { return waitingActions; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(totalActions()); hashCode = 31 * hashCode + Objects.hashCode(timeoutActions()); hashCode = 31 * hashCode + Objects.hashCode(failedActions()); hashCode = 31 * hashCode + Objects.hashCode(stoppedActions()); hashCode = 31 * hashCode + Objects.hashCode(succeededActions()); hashCode = 31 * hashCode + Objects.hashCode(runningActions()); hashCode = 31 * hashCode + Objects.hashCode(erroredActions()); hashCode = 31 * hashCode + Objects.hashCode(waitingActions()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof WorkflowRunStatistics)) { return false; } WorkflowRunStatistics other = (WorkflowRunStatistics) obj; return Objects.equals(totalActions(), other.totalActions()) && Objects.equals(timeoutActions(), other.timeoutActions()) && Objects.equals(failedActions(), other.failedActions()) && Objects.equals(stoppedActions(), other.stoppedActions()) && Objects.equals(succeededActions(), other.succeededActions()) && Objects.equals(runningActions(), other.runningActions()) && Objects.equals(erroredActions(), other.erroredActions()) && Objects.equals(waitingActions(), other.waitingActions()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("WorkflowRunStatistics").add("TotalActions", totalActions()) .add("TimeoutActions", timeoutActions()).add("FailedActions", failedActions()) .add("StoppedActions", stoppedActions()).add("SucceededActions", succeededActions()) .add("RunningActions", runningActions()).add("ErroredActions", erroredActions()) .add("WaitingActions", waitingActions()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TotalActions": return Optional.ofNullable(clazz.cast(totalActions())); case "TimeoutActions": return Optional.ofNullable(clazz.cast(timeoutActions())); case "FailedActions": return Optional.ofNullable(clazz.cast(failedActions())); case "StoppedActions": return Optional.ofNullable(clazz.cast(stoppedActions())); case "SucceededActions": return Optional.ofNullable(clazz.cast(succeededActions())); case "RunningActions": return Optional.ofNullable(clazz.cast(runningActions())); case "ErroredActions": return Optional.ofNullable(clazz.cast(erroredActions())); case "WaitingActions": return Optional.ofNullable(clazz.cast(waitingActions())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((WorkflowRunStatistics) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Total number of Actions in the workflow run. *

* * @param totalActions * Total number of Actions in the workflow run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalActions(Integer totalActions); /** *

* Total number of Actions that timed out. *

* * @param timeoutActions * Total number of Actions that timed out. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeoutActions(Integer timeoutActions); /** *

* Total number of Actions that have failed. *

* * @param failedActions * Total number of Actions that have failed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failedActions(Integer failedActions); /** *

* Total number of Actions that have stopped. *

* * @param stoppedActions * Total number of Actions that have stopped. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stoppedActions(Integer stoppedActions); /** *

* Total number of Actions that have succeeded. *

* * @param succeededActions * Total number of Actions that have succeeded. * @return Returns a reference to this object so that method calls can be chained together. */ Builder succeededActions(Integer succeededActions); /** *

* Total number Actions in running state. *

* * @param runningActions * Total number Actions in running state. * @return Returns a reference to this object so that method calls can be chained together. */ Builder runningActions(Integer runningActions); /** *

* Indicates the count of job runs in the ERROR state in the workflow run. *

* * @param erroredActions * Indicates the count of job runs in the ERROR state in the workflow run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder erroredActions(Integer erroredActions); /** *

* Indicates the count of job runs in WAITING state in the workflow run. *

* * @param waitingActions * Indicates the count of job runs in WAITING state in the workflow run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder waitingActions(Integer waitingActions); } static final class BuilderImpl implements Builder { private Integer totalActions; private Integer timeoutActions; private Integer failedActions; private Integer stoppedActions; private Integer succeededActions; private Integer runningActions; private Integer erroredActions; private Integer waitingActions; private BuilderImpl() { } private BuilderImpl(WorkflowRunStatistics model) { totalActions(model.totalActions); timeoutActions(model.timeoutActions); failedActions(model.failedActions); stoppedActions(model.stoppedActions); succeededActions(model.succeededActions); runningActions(model.runningActions); erroredActions(model.erroredActions); waitingActions(model.waitingActions); } public final Integer getTotalActions() { return totalActions; } public final void setTotalActions(Integer totalActions) { this.totalActions = totalActions; } @Override public final Builder totalActions(Integer totalActions) { this.totalActions = totalActions; return this; } public final Integer getTimeoutActions() { return timeoutActions; } public final void setTimeoutActions(Integer timeoutActions) { this.timeoutActions = timeoutActions; } @Override public final Builder timeoutActions(Integer timeoutActions) { this.timeoutActions = timeoutActions; return this; } public final Integer getFailedActions() { return failedActions; } public final void setFailedActions(Integer failedActions) { this.failedActions = failedActions; } @Override public final Builder failedActions(Integer failedActions) { this.failedActions = failedActions; return this; } public final Integer getStoppedActions() { return stoppedActions; } public final void setStoppedActions(Integer stoppedActions) { this.stoppedActions = stoppedActions; } @Override public final Builder stoppedActions(Integer stoppedActions) { this.stoppedActions = stoppedActions; return this; } public final Integer getSucceededActions() { return succeededActions; } public final void setSucceededActions(Integer succeededActions) { this.succeededActions = succeededActions; } @Override public final Builder succeededActions(Integer succeededActions) { this.succeededActions = succeededActions; return this; } public final Integer getRunningActions() { return runningActions; } public final void setRunningActions(Integer runningActions) { this.runningActions = runningActions; } @Override public final Builder runningActions(Integer runningActions) { this.runningActions = runningActions; return this; } public final Integer getErroredActions() { return erroredActions; } public final void setErroredActions(Integer erroredActions) { this.erroredActions = erroredActions; } @Override public final Builder erroredActions(Integer erroredActions) { this.erroredActions = erroredActions; return this; } public final Integer getWaitingActions() { return waitingActions; } public final void setWaitingActions(Integer waitingActions) { this.waitingActions = waitingActions; } @Override public final Builder waitingActions(Integer waitingActions) { this.waitingActions = waitingActions; return this; } @Override public WorkflowRunStatistics build() { return new WorkflowRunStatistics(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy