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

software.amazon.awssdk.services.cloudwatch.model.DashboardValidationMessage Maven / Gradle / Ivy

Go to download

A single bundled dependency that includes all service and dependent JARs with third-party libraries relocated to different namespaces.

There is a newer version: 2.5.20
Show newest version
/*
 * Copyright 2013-2018 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.cloudwatch.model;

import java.util.Objects;
import java.util.Optional;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* An error or warning for the operation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DashboardValidationMessage implements ToCopyableBuilder { private final String dataPath; private final String message; private DashboardValidationMessage(BuilderImpl builder) { this.dataPath = builder.dataPath; this.message = builder.message; } /** *

* The data path related to the message. *

* * @return The data path related to the message. */ public String dataPath() { return dataPath; } /** *

* A message describing the error or warning. *

* * @return A message describing the error or warning. */ public String message() { return message; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(dataPath()); hashCode = 31 * hashCode + Objects.hashCode(message()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DashboardValidationMessage)) { return false; } DashboardValidationMessage other = (DashboardValidationMessage) obj; return Objects.equals(dataPath(), other.dataPath()) && Objects.equals(message(), other.message()); } @Override public String toString() { return ToString.builder("DashboardValidationMessage").add("DataPath", dataPath()).add("Message", message()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "DataPath": return Optional.ofNullable(clazz.cast(dataPath())); case "Message": return Optional.ofNullable(clazz.cast(message())); default: return Optional.empty(); } } public interface Builder extends CopyableBuilder { /** *

* The data path related to the message. *

* * @param dataPath * The data path related to the message. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataPath(String dataPath); /** *

* A message describing the error or warning. *

* * @param message * A message describing the error or warning. * @return Returns a reference to this object so that method calls can be chained together. */ Builder message(String message); } static final class BuilderImpl implements Builder { private String dataPath; private String message; private BuilderImpl() { } private BuilderImpl(DashboardValidationMessage model) { dataPath(model.dataPath); message(model.message); } public final String getDataPath() { return dataPath; } @Override public final Builder dataPath(String dataPath) { this.dataPath = dataPath; return this; } public final void setDataPath(String dataPath) { this.dataPath = dataPath; } public final String getMessage() { return message; } @Override public final Builder message(String message) { this.message = message; return this; } public final void setMessage(String message) { this.message = message; } @Override public DashboardValidationMessage build() { return new DashboardValidationMessage(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy