/* * Copyright 2018-2023 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 com.amazonaws.services.quicksight.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The options for the legend setup of a visual. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LegendOptions implements Serializable, Cloneable, StructuredPojo { /** *

* Determines whether or not the legend is visible. *

*/ private String visibility; /** *

* The custom title for the legend. *

*/ private LabelOptions title; /** *

* The positions for the legend. Choose one of the following options: *

* */ private String position; /** *

* The width of the legend. If this value is omitted, a default width is used when rendering. *

*/ private String width; /** *

* The height of the legend. If this value is omitted, a default height is used when rendering. *

*/ private String height; /** *

* Determines whether or not the legend is visible. *

* * @param visibility * Determines whether or not the legend is visible. * @see Visibility */ public void setVisibility(String visibility) { this.visibility = visibility; } /** *

* Determines whether or not the legend is visible. *

* * @return Determines whether or not the legend is visible. * @see Visibility */ public String getVisibility() { return this.visibility; } /** *

* Determines whether or not the legend is visible. *

* * @param visibility * Determines whether or not the legend is visible. * @return Returns a reference to this object so that method calls can be chained together. * @see Visibility */ public LegendOptions withVisibility(String visibility) { setVisibility(visibility); return this; } /** *

* Determines whether or not the legend is visible. *

* * @param visibility * Determines whether or not the legend is visible. * @return Returns a reference to this object so that method calls can be chained together. * @see Visibility */ public LegendOptions withVisibility(Visibility visibility) { this.visibility = visibility.toString(); return this; } /** *

* The custom title for the legend. *

* * @param title * The custom title for the legend. */ public void setTitle(LabelOptions title) { this.title = title; } /** *

* The custom title for the legend. *

* * @return The custom title for the legend. */ public LabelOptions getTitle() { return this.title; } /** *

* The custom title for the legend. *

* * @param title * The custom title for the legend. * @return Returns a reference to this object so that method calls can be chained together. */ public LegendOptions withTitle(LabelOptions title) { setTitle(title); return this; } /** *

* The positions for the legend. Choose one of the following options: *

* * * @param position * The positions for the legend. Choose one of the following options:

*