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

io.syndesis.common.model.metrics.ImmutableIntegrationMetricsSummary Maven / Gradle / Ivy

There is a newer version: 1.13.2
Show newest version
/*
 * Copyright (C) 2016 Red Hat, 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 io.syndesis.common.model.metrics;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.Var;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.syndesis.common.model.WithResourceId;
import java.io.ObjectStreamException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validation;
import javax.validation.Validator;
import org.immutables.value.Generated;

/**
 * Immutable implementation of {@link IntegrationMetricsSummary}.
 * 

* Use the builder to create immutable instances: * {@code new IntegrationMetricsSummary.Builder()}. * Use the static factory method to create immutable instances: * {@code ImmutableIntegrationMetricsSummary.of()}. */ @Generated(from = "IntegrationMetricsSummary", generator = "Immutables") @SuppressWarnings({"all"}) @SuppressFBWarnings @ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue final class ImmutableIntegrationMetricsSummary implements IntegrationMetricsSummary { private final @Nullable String id; private final String metricsProvider; private final Long messages; private final Long errors; private final @Nullable Date start; private final @Nullable Date lastProcessed; private final @Nullable List integrationDeploymentMetrics; private final @Nullable Map topIntegrations; @SuppressWarnings("unchecked") // safe covariant cast private ImmutableIntegrationMetricsSummary( Optional id, String metricsProvider, Long messages, Long errors, Optional start, Optional lastProcessed, Optional> integrationDeploymentMetrics, Optional> topIntegrations) { this.id = id.orElse(null); this.metricsProvider = metricsProvider; this.messages = messages; this.errors = errors; this.start = start.orElse(null); this.lastProcessed = lastProcessed.orElse(null); this.integrationDeploymentMetrics = integrationDeploymentMetrics.orElse(null); this.topIntegrations = topIntegrations.orElse(null); } private ImmutableIntegrationMetricsSummary( ImmutableIntegrationMetricsSummary original, @Nullable String id, String metricsProvider, Long messages, Long errors, @Nullable Date start, @Nullable Date lastProcessed, @Nullable List integrationDeploymentMetrics, @Nullable Map topIntegrations) { this.id = id; this.metricsProvider = metricsProvider; this.messages = messages; this.errors = errors; this.start = start; this.lastProcessed = lastProcessed; this.integrationDeploymentMetrics = integrationDeploymentMetrics; this.topIntegrations = topIntegrations; } /** * @return The value of the {@code id} attribute */ @JsonProperty("id") @Override public Optional getId() { return Optional.ofNullable(id); } /** * @return The value of the {@code metricsProvider} attribute */ @JsonProperty("metricsProvider") @Override public String getMetricsProvider() { return metricsProvider; } /** * @return The value of the {@code messages} attribute */ @JsonProperty("messages") @Override public Long getMessages() { return messages; } /** * @return The value of the {@code errors} attribute */ @JsonProperty("errors") @Override public Long getErrors() { return errors; } /** * @return The value of the {@code start} attribute */ @JsonProperty("start") @Override public Optional getStart() { return Optional.ofNullable(start); } /** * @return The value of the {@code lastProcessed} attribute */ @JsonProperty("lastProcessed") @Override public Optional getLastProcessed() { return Optional.ofNullable(lastProcessed); } /** * @return The value of the {@code integrationDeploymentMetrics} attribute */ @JsonProperty("integrationDeploymentMetrics") @Override public Optional> getIntegrationDeploymentMetrics() { return Optional.ofNullable(integrationDeploymentMetrics); } /** * @return The value of the {@code topIntegrations} attribute */ @JsonProperty("topIntegrations") @Override public Optional> getTopIntegrations() { return Optional.ofNullable(topIntegrations); } /** * Copy the current immutable object by setting a present value for the optional {@link IntegrationMetricsSummary#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableIntegrationMetricsSummary( this, newValue, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting an optional value for the {@link IntegrationMetricsSummary#getId() id} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withId(Optional optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.id, value)) return this; return validate(new ImmutableIntegrationMetricsSummary( this, value, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a value for the {@link IntegrationMetricsSummary#getMetricsProvider() metricsProvider} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for metricsProvider (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationMetricsSummary withMetricsProvider(String value) { if (Objects.equals(this.metricsProvider, value)) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, value, this.messages, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a value for the {@link IntegrationMetricsSummary#getMessages() messages} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for messages (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationMetricsSummary withMessages(Long value) { if (Objects.equals(this.messages, value)) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, value, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a value for the {@link IntegrationMetricsSummary#getErrors() errors} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for errors (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationMetricsSummary withErrors(Long value) { if (Objects.equals(this.errors, value)) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, value, this.start, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a present value for the optional {@link IntegrationMetricsSummary#getStart() start} attribute. * @param value The value for start * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withStart(Date value) { @Nullable Date newValue = Objects.requireNonNull(value, "start"); if (this.start == newValue) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, newValue, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting an optional value for the {@link IntegrationMetricsSummary#getStart() start} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for start * @return A modified copy of {@code this} object */ @SuppressWarnings("unchecked") // safe covariant cast public final ImmutableIntegrationMetricsSummary withStart(Optional optional) { @Nullable Date value = optional.orElse(null); if (this.start == value) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, value, this.lastProcessed, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a present value for the optional {@link IntegrationMetricsSummary#getLastProcessed() lastProcessed} attribute. * @param value The value for lastProcessed * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withLastProcessed(Date value) { @Nullable Date newValue = Objects.requireNonNull(value, "lastProcessed"); if (this.lastProcessed == newValue) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, newValue, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting an optional value for the {@link IntegrationMetricsSummary#getLastProcessed() lastProcessed} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for lastProcessed * @return A modified copy of {@code this} object */ @SuppressWarnings("unchecked") // safe covariant cast public final ImmutableIntegrationMetricsSummary withLastProcessed(Optional optional) { @Nullable Date value = optional.orElse(null); if (this.lastProcessed == value) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, value, this.integrationDeploymentMetrics, this.topIntegrations)); } /** * Copy the current immutable object by setting a present value for the optional {@link IntegrationMetricsSummary#getIntegrationDeploymentMetrics() integrationDeploymentMetrics} attribute. * @param value The value for integrationDeploymentMetrics * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withIntegrationDeploymentMetrics(List value) { @Nullable List newValue = Objects.requireNonNull(value, "integrationDeploymentMetrics"); if (this.integrationDeploymentMetrics == newValue) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, newValue, this.topIntegrations)); } /** * Copy the current immutable object by setting an optional value for the {@link IntegrationMetricsSummary#getIntegrationDeploymentMetrics() integrationDeploymentMetrics} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for integrationDeploymentMetrics * @return A modified copy of {@code this} object */ @SuppressWarnings("unchecked") // safe covariant cast public final ImmutableIntegrationMetricsSummary withIntegrationDeploymentMetrics(Optional> optional) { @Nullable List value = optional.orElse(null); if (this.integrationDeploymentMetrics == value) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, value, this.topIntegrations)); } /** * Copy the current immutable object by setting a present value for the optional {@link IntegrationMetricsSummary#getTopIntegrations() topIntegrations} attribute. * @param value The value for topIntegrations * @return A modified copy of {@code this} object */ public final ImmutableIntegrationMetricsSummary withTopIntegrations(Map value) { @Nullable Map newValue = Objects.requireNonNull(value, "topIntegrations"); if (this.topIntegrations == newValue) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, newValue)); } /** * Copy the current immutable object by setting an optional value for the {@link IntegrationMetricsSummary#getTopIntegrations() topIntegrations} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for topIntegrations * @return A modified copy of {@code this} object */ @SuppressWarnings("unchecked") // safe covariant cast public final ImmutableIntegrationMetricsSummary withTopIntegrations(Optional> optional) { @Nullable Map value = optional.orElse(null); if (this.topIntegrations == value) return this; return validate(new ImmutableIntegrationMetricsSummary( this, this.id, this.metricsProvider, this.messages, this.errors, this.start, this.lastProcessed, this.integrationDeploymentMetrics, value)); } /** * This instance is equal to all instances of {@code ImmutableIntegrationMetricsSummary} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableIntegrationMetricsSummary && equalTo((ImmutableIntegrationMetricsSummary) another); } private boolean equalTo(ImmutableIntegrationMetricsSummary another) { return Objects.equals(id, another.id) && Objects.equals(metricsProvider, another.metricsProvider) && Objects.equals(messages, another.messages) && Objects.equals(errors, another.errors) && Objects.equals(start, another.start) && Objects.equals(lastProcessed, another.lastProcessed) && Objects.equals(integrationDeploymentMetrics, another.integrationDeploymentMetrics) && Objects.equals(topIntegrations, another.topIntegrations); } /** * Computes a hash code from attributes: {@code id}, {@code metricsProvider}, {@code messages}, {@code errors}, {@code start}, {@code lastProcessed}, {@code integrationDeploymentMetrics}, {@code topIntegrations}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + Objects.hashCode(id); h += (h << 5) + Objects.hashCode(metricsProvider); h += (h << 5) + Objects.hashCode(messages); h += (h << 5) + Objects.hashCode(errors); h += (h << 5) + Objects.hashCode(start); h += (h << 5) + Objects.hashCode(lastProcessed); h += (h << 5) + Objects.hashCode(integrationDeploymentMetrics); h += (h << 5) + Objects.hashCode(topIntegrations); return h; } /** * Prints the immutable value {@code IntegrationMetricsSummary} with attribute values. * @return A string representation of the value */ @Override public String toString() { StringBuilder builder = new StringBuilder("IntegrationMetricsSummary{"); if (id != null) { builder.append("id=").append(id); } if (metricsProvider != null) { if (builder.length() > 26) builder.append(", "); builder.append("metricsProvider=").append(metricsProvider); } if (messages != null) { if (builder.length() > 26) builder.append(", "); builder.append("messages=").append(messages); } if (errors != null) { if (builder.length() > 26) builder.append(", "); builder.append("errors=").append(errors); } if (start != null) { if (builder.length() > 26) builder.append(", "); builder.append("start=").append(start); } if (lastProcessed != null) { if (builder.length() > 26) builder.append(", "); builder.append("lastProcessed=").append(lastProcessed); } if (integrationDeploymentMetrics != null) { if (builder.length() > 26) builder.append(", "); builder.append("integrationDeploymentMetrics=").append(integrationDeploymentMetrics); } if (topIntegrations != null) { if (builder.length() > 26) builder.append(", "); builder.append("topIntegrations=").append(topIntegrations); } return builder.append("}").toString(); } /** * Construct a new immutable {@code IntegrationMetricsSummary} instance. * @param id The value for the {@code id} attribute * @param metricsProvider The value for the {@code metricsProvider} attribute * @param messages The value for the {@code messages} attribute * @param errors The value for the {@code errors} attribute * @param start The value for the {@code start} attribute * @param lastProcessed The value for the {@code lastProcessed} attribute * @param integrationDeploymentMetrics The value for the {@code integrationDeploymentMetrics} attribute * @param topIntegrations The value for the {@code topIntegrations} attribute * @return An immutable IntegrationMetricsSummary instance */ public static IntegrationMetricsSummary of(Optional id, String metricsProvider, Long messages, Long errors, Optional start, Optional lastProcessed, Optional> integrationDeploymentMetrics, Optional> topIntegrations) { return validate(new ImmutableIntegrationMetricsSummary(id, metricsProvider, messages, errors, start, lastProcessed, integrationDeploymentMetrics, topIntegrations)); } private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); private static ImmutableIntegrationMetricsSummary validate(ImmutableIntegrationMetricsSummary instance) { Set> constraintViolations = validator.validate(instance); if (!constraintViolations.isEmpty()) { throw new ConstraintViolationException(constraintViolations); } return instance; } /** * Creates an immutable copy of a {@link IntegrationMetricsSummary} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable IntegrationMetricsSummary instance */ public static IntegrationMetricsSummary copyOf(IntegrationMetricsSummary instance) { if (instance instanceof ImmutableIntegrationMetricsSummary) { return (ImmutableIntegrationMetricsSummary) instance; } return new IntegrationMetricsSummary.Builder() .createFrom(instance) .build(); } private Object readResolve() throws ObjectStreamException { return validate(this); } /** * Builds instances of type {@link IntegrationMetricsSummary IntegrationMetricsSummary}. * Initialize attributes and then invoke the {@link #build()} method to create an * immutable instance. *

{@code Builder} is not thread-safe and generally should not be stored in a field or collection, * but instead used immediately to create instances. */ @Generated(from = "IntegrationMetricsSummary", generator = "Immutables") @NotThreadSafe public static class Builder { private @Nullable String id; private @Nullable String metricsProvider; private @Nullable Long messages; private @Nullable Long errors; private @Nullable Date start; private @Nullable Date lastProcessed; private @Nullable List integrationDeploymentMetrics; private @Nullable Map topIntegrations; /** * Creates a builder for {@link IntegrationMetricsSummary IntegrationMetricsSummary} instances. *

     * new IntegrationMetricsSummary.Builder()
     *    .id(String) // optional {@link IntegrationMetricsSummary#getId() id}
     *    .metricsProvider(String | null) // nullable {@link IntegrationMetricsSummary#getMetricsProvider() metricsProvider}
     *    .messages(Long | null) // nullable {@link IntegrationMetricsSummary#getMessages() messages}
     *    .errors(Long | null) // nullable {@link IntegrationMetricsSummary#getErrors() errors}
     *    .start(Date) // optional {@link IntegrationMetricsSummary#getStart() start}
     *    .lastProcessed(Date) // optional {@link IntegrationMetricsSummary#getLastProcessed() lastProcessed}
     *    .integrationDeploymentMetrics(List&lt;io.syndesis.common.model.metrics.IntegrationDeploymentMetrics&gt;) // optional {@link IntegrationMetricsSummary#getIntegrationDeploymentMetrics() integrationDeploymentMetrics}
     *    .topIntegrations(Map&lt;String, Long&gt;) // optional {@link IntegrationMetricsSummary#getTopIntegrations() topIntegrations}
     *    .build();
     * 
*/ public Builder() { if (!(this instanceof IntegrationMetricsSummary.Builder)) { throw new UnsupportedOperationException("Use: new IntegrationMetricsSummary.Builder()"); } } /** * Fill a builder with attribute values from the provided {@code io.syndesis.common.model.WithResourceId} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder createFrom(WithResourceId instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return (IntegrationMetricsSummary.Builder) this; } /** * Fill a builder with attribute values from the provided {@code io.syndesis.common.model.metrics.IntegrationMetricsSummary} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder createFrom(IntegrationMetricsSummary instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return (IntegrationMetricsSummary.Builder) this; } private void from(Object object) { if (object instanceof WithResourceId) { WithResourceId instance = (WithResourceId) object; Optional idOptional = instance.getId(); if (idOptional.isPresent()) { id(idOptional); } } if (object instanceof IntegrationMetricsSummary) { IntegrationMetricsSummary instance = (IntegrationMetricsSummary) object; Optional> integrationDeploymentMetricsOptional = instance.getIntegrationDeploymentMetrics(); if (integrationDeploymentMetricsOptional.isPresent()) { integrationDeploymentMetrics(integrationDeploymentMetricsOptional); } String metricsProviderValue = instance.getMetricsProvider(); if (metricsProviderValue != null) { metricsProvider(metricsProviderValue); } Optional lastProcessedOptional = instance.getLastProcessed(); if (lastProcessedOptional.isPresent()) { lastProcessed(lastProcessedOptional); } Optional> topIntegrationsOptional = instance.getTopIntegrations(); if (topIntegrationsOptional.isPresent()) { topIntegrations(topIntegrationsOptional); } Optional startOptional = instance.getStart(); if (startOptional.isPresent()) { start(startOptional); } Long messagesValue = instance.getMessages(); if (messagesValue != null) { messages(messagesValue); } Long errorsValue = instance.getErrors(); if (errorsValue != null) { errors(errorsValue); } } } /** * Initializes the optional value {@link IntegrationMetricsSummary#getId() id} to id. * @param id The value for id * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder id(String id) { this.id = Objects.requireNonNull(id, "id"); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getId() id} to id. * @param id The value for id * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("id") public final IntegrationMetricsSummary.Builder id(Optional id) { this.id = id.orElse(null); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the value for the {@link IntegrationMetricsSummary#getMetricsProvider() metricsProvider} attribute. * @param metricsProvider The value for metricsProvider (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("metricsProvider") public final IntegrationMetricsSummary.Builder metricsProvider(String metricsProvider) { this.metricsProvider = metricsProvider; return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the value for the {@link IntegrationMetricsSummary#getMessages() messages} attribute. * @param messages The value for messages (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("messages") public final IntegrationMetricsSummary.Builder messages(Long messages) { this.messages = messages; return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the value for the {@link IntegrationMetricsSummary#getErrors() errors} attribute. * @param errors The value for errors (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("errors") public final IntegrationMetricsSummary.Builder errors(Long errors) { this.errors = errors; return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getStart() start} to start. * @param start The value for start * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder start(Date start) { this.start = Objects.requireNonNull(start, "start"); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getStart() start} to start. * @param start The value for start * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("start") public final IntegrationMetricsSummary.Builder start(Optional start) { this.start = start.orElse(null); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getLastProcessed() lastProcessed} to lastProcessed. * @param lastProcessed The value for lastProcessed * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder lastProcessed(Date lastProcessed) { this.lastProcessed = Objects.requireNonNull(lastProcessed, "lastProcessed"); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getLastProcessed() lastProcessed} to lastProcessed. * @param lastProcessed The value for lastProcessed * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("lastProcessed") public final IntegrationMetricsSummary.Builder lastProcessed(Optional lastProcessed) { this.lastProcessed = lastProcessed.orElse(null); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getIntegrationDeploymentMetrics() integrationDeploymentMetrics} to integrationDeploymentMetrics. * @param integrationDeploymentMetrics The value for integrationDeploymentMetrics * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder integrationDeploymentMetrics(List integrationDeploymentMetrics) { this.integrationDeploymentMetrics = Objects.requireNonNull(integrationDeploymentMetrics, "integrationDeploymentMetrics"); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getIntegrationDeploymentMetrics() integrationDeploymentMetrics} to integrationDeploymentMetrics. * @param integrationDeploymentMetrics The value for integrationDeploymentMetrics * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("integrationDeploymentMetrics") public final IntegrationMetricsSummary.Builder integrationDeploymentMetrics(Optional> integrationDeploymentMetrics) { this.integrationDeploymentMetrics = integrationDeploymentMetrics.orElse(null); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getTopIntegrations() topIntegrations} to topIntegrations. * @param topIntegrations The value for topIntegrations * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final IntegrationMetricsSummary.Builder topIntegrations(Map topIntegrations) { this.topIntegrations = Objects.requireNonNull(topIntegrations, "topIntegrations"); return (IntegrationMetricsSummary.Builder) this; } /** * Initializes the optional value {@link IntegrationMetricsSummary#getTopIntegrations() topIntegrations} to topIntegrations. * @param topIntegrations The value for topIntegrations * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("topIntegrations") public final IntegrationMetricsSummary.Builder topIntegrations(Optional> topIntegrations) { this.topIntegrations = topIntegrations.orElse(null); return (IntegrationMetricsSummary.Builder) this; } /** * Builds a new {@link IntegrationMetricsSummary IntegrationMetricsSummary}. * @return An immutable instance of IntegrationMetricsSummary * @throws java.lang.IllegalStateException if any required attributes are missing */ public IntegrationMetricsSummary build() { return ImmutableIntegrationMetricsSummary.validate(new ImmutableIntegrationMetricsSummary( null, id, metricsProvider, messages, errors, start, lastProcessed, integrationDeploymentMetrics, topIntegrations)); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy