
software.amazon.awssdk.services.quicksight.model.TableSideBorderOptions Maven / Gradle / Ivy
/*
* 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.quicksight.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
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;
/**
*
* The side border options for a table.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class TableSideBorderOptions implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField INNER_VERTICAL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("InnerVertical")
.getter(getter(TableSideBorderOptions::innerVertical)).setter(setter(Builder::innerVertical))
.constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InnerVertical").build()).build();
private static final SdkField INNER_HORIZONTAL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("InnerHorizontal")
.getter(getter(TableSideBorderOptions::innerHorizontal)).setter(setter(Builder::innerHorizontal))
.constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InnerHorizontal").build()).build();
private static final SdkField LEFT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Left")
.getter(getter(TableSideBorderOptions::left)).setter(setter(Builder::left)).constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Left").build()).build();
private static final SdkField RIGHT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Right")
.getter(getter(TableSideBorderOptions::right)).setter(setter(Builder::right))
.constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Right").build()).build();
private static final SdkField TOP_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Top").getter(getter(TableSideBorderOptions::top)).setter(setter(Builder::top))
.constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Top").build()).build();
private static final SdkField BOTTOM_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Bottom")
.getter(getter(TableSideBorderOptions::bottom)).setter(setter(Builder::bottom))
.constructor(TableBorderOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Bottom").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INNER_VERTICAL_FIELD,
INNER_HORIZONTAL_FIELD, LEFT_FIELD, RIGHT_FIELD, TOP_FIELD, BOTTOM_FIELD));
private static final long serialVersionUID = 1L;
private final TableBorderOptions innerVertical;
private final TableBorderOptions innerHorizontal;
private final TableBorderOptions left;
private final TableBorderOptions right;
private final TableBorderOptions top;
private final TableBorderOptions bottom;
private TableSideBorderOptions(BuilderImpl builder) {
this.innerVertical = builder.innerVertical;
this.innerHorizontal = builder.innerHorizontal;
this.left = builder.left;
this.right = builder.right;
this.top = builder.top;
this.bottom = builder.bottom;
}
/**
*
* The table border options of the inner vertical border.
*
*
* @return The table border options of the inner vertical border.
*/
public final TableBorderOptions innerVertical() {
return innerVertical;
}
/**
*
* The table border options of the inner horizontal border.
*
*
* @return The table border options of the inner horizontal border.
*/
public final TableBorderOptions innerHorizontal() {
return innerHorizontal;
}
/**
*
* The table border options of the left border.
*
*
* @return The table border options of the left border.
*/
public final TableBorderOptions left() {
return left;
}
/**
*
* The table border options of the right border.
*
*
* @return The table border options of the right border.
*/
public final TableBorderOptions right() {
return right;
}
/**
*
* The table border options of the top border.
*
*
* @return The table border options of the top border.
*/
public final TableBorderOptions top() {
return top;
}
/**
*
* The table border options of the bottom border.
*
*
* @return The table border options of the bottom border.
*/
public final TableBorderOptions bottom() {
return bottom;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(innerVertical());
hashCode = 31 * hashCode + Objects.hashCode(innerHorizontal());
hashCode = 31 * hashCode + Objects.hashCode(left());
hashCode = 31 * hashCode + Objects.hashCode(right());
hashCode = 31 * hashCode + Objects.hashCode(top());
hashCode = 31 * hashCode + Objects.hashCode(bottom());
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 TableSideBorderOptions)) {
return false;
}
TableSideBorderOptions other = (TableSideBorderOptions) obj;
return Objects.equals(innerVertical(), other.innerVertical())
&& Objects.equals(innerHorizontal(), other.innerHorizontal()) && Objects.equals(left(), other.left())
&& Objects.equals(right(), other.right()) && Objects.equals(top(), other.top())
&& Objects.equals(bottom(), other.bottom());
}
/**
* 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("TableSideBorderOptions").add("InnerVertical", innerVertical())
.add("InnerHorizontal", innerHorizontal()).add("Left", left()).add("Right", right()).add("Top", top())
.add("Bottom", bottom()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "InnerVertical":
return Optional.ofNullable(clazz.cast(innerVertical()));
case "InnerHorizontal":
return Optional.ofNullable(clazz.cast(innerHorizontal()));
case "Left":
return Optional.ofNullable(clazz.cast(left()));
case "Right":
return Optional.ofNullable(clazz.cast(right()));
case "Top":
return Optional.ofNullable(clazz.cast(top()));
case "Bottom":
return Optional.ofNullable(clazz.cast(bottom()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy