Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 280 additions & 0 deletions src/main/java/com/adyen/model/management/HomeScreenSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
/*
* Management API
*
* The version of the OpenAPI document: 3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.adyen.model.management;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.util.*;

/** HomeScreenSettings */
@JsonPropertyOrder({
HomeScreenSettings.JSON_PROPERTY_HIDE_NAVIGATION_BAR,
HomeScreenSettings.JSON_PROPERTY_SHOW_PAYMENTS_MENU,
HomeScreenSettings.JSON_PROPERTY_SHOW_SETTINGS_MENU
})
public class HomeScreenSettings {
public static final String JSON_PROPERTY_HIDE_NAVIGATION_BAR = "hideNavigationBar";
private Boolean hideNavigationBar;

/** Mark when the attribute has been explicitly set. */
private boolean isSetHideNavigationBar = false;

public static final String JSON_PROPERTY_SHOW_PAYMENTS_MENU = "showPaymentsMenu";
private Boolean showPaymentsMenu;

/** Mark when the attribute has been explicitly set. */
private boolean isSetShowPaymentsMenu = false;

public static final String JSON_PROPERTY_SHOW_SETTINGS_MENU = "showSettingsMenu";
private Boolean showSettingsMenu;

/** Mark when the attribute has been explicitly set. */
private boolean isSetShowSettingsMenu = false;

/**
* Sets whether attributes with null values should be explicitly included in the JSON payload.
* Default is false.
*/
@JsonIgnore private boolean includeNullValues = false;

public HomeScreenSettings() {}

/**
* Hide/show the navigation bar.
*
* @param hideNavigationBar Hide/show the navigation bar.
* @return the current {@code HomeScreenSettings} instance, allowing for method chaining
*/
public HomeScreenSettings hideNavigationBar(Boolean hideNavigationBar) {
this.hideNavigationBar = hideNavigationBar;
isSetHideNavigationBar = true; // mark as set
return this;
}

/**
* Hide/show the navigation bar.
*
* @return hideNavigationBar Hide/show the navigation bar.
*/
@JsonProperty(JSON_PROPERTY_HIDE_NAVIGATION_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getHideNavigationBar() {
return hideNavigationBar;
}

/**
* Hide/show the navigation bar.
*
* @param hideNavigationBar Hide/show the navigation bar.
*/
@JsonProperty(JSON_PROPERTY_HIDE_NAVIGATION_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHideNavigationBar(Boolean hideNavigationBar) {
this.hideNavigationBar = hideNavigationBar;
isSetHideNavigationBar = true; // mark as set
}

/**
* Show/hide the payments menu.
*
* @param showPaymentsMenu Show/hide the payments menu.
* @return the current {@code HomeScreenSettings} instance, allowing for method chaining
*/
public HomeScreenSettings showPaymentsMenu(Boolean showPaymentsMenu) {
this.showPaymentsMenu = showPaymentsMenu;
isSetShowPaymentsMenu = true; // mark as set
return this;
}

/**
* Show/hide the payments menu.
*
* @return showPaymentsMenu Show/hide the payments menu.
*/
@JsonProperty(JSON_PROPERTY_SHOW_PAYMENTS_MENU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getShowPaymentsMenu() {
return showPaymentsMenu;
}

/**
* Show/hide the payments menu.
*
* @param showPaymentsMenu Show/hide the payments menu.
*/
@JsonProperty(JSON_PROPERTY_SHOW_PAYMENTS_MENU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShowPaymentsMenu(Boolean showPaymentsMenu) {
this.showPaymentsMenu = showPaymentsMenu;
isSetShowPaymentsMenu = true; // mark as set
}

/**
* Show/hide the settings menu.
*
* @param showSettingsMenu Show/hide the settings menu.
* @return the current {@code HomeScreenSettings} instance, allowing for method chaining
*/
public HomeScreenSettings showSettingsMenu(Boolean showSettingsMenu) {
this.showSettingsMenu = showSettingsMenu;
isSetShowSettingsMenu = true; // mark as set
return this;
}

/**
* Show/hide the settings menu.
*
* @return showSettingsMenu Show/hide the settings menu.
*/
@JsonProperty(JSON_PROPERTY_SHOW_SETTINGS_MENU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getShowSettingsMenu() {
return showSettingsMenu;
}

/**
* Show/hide the settings menu.
*
* @param showSettingsMenu Show/hide the settings menu.
*/
@JsonProperty(JSON_PROPERTY_SHOW_SETTINGS_MENU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShowSettingsMenu(Boolean showSettingsMenu) {
this.showSettingsMenu = showSettingsMenu;
isSetShowSettingsMenu = true; // mark as set
}

/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public HomeScreenSettings includeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
return this;
}

/** Returns whether null values are explicitly serialized in the JSON payload. */
public boolean isIncludeNullValues() {
return includeNullValues;
}

/**
* Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
*/
public void setIncludeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
}

/** Return true if this HomeScreenSettings object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HomeScreenSettings homeScreenSettings = (HomeScreenSettings) o;
return Objects.equals(this.hideNavigationBar, homeScreenSettings.hideNavigationBar)
&& Objects.equals(this.isSetHideNavigationBar, homeScreenSettings.isSetHideNavigationBar)
&& Objects.equals(this.showPaymentsMenu, homeScreenSettings.showPaymentsMenu)
&& Objects.equals(this.isSetShowPaymentsMenu, homeScreenSettings.isSetShowPaymentsMenu)
&& Objects.equals(this.showSettingsMenu, homeScreenSettings.showSettingsMenu)
&& Objects.equals(this.isSetShowSettingsMenu, homeScreenSettings.isSetShowSettingsMenu);
}

@Override
public int hashCode() {
return Objects.hash(
hideNavigationBar,
isSetHideNavigationBar,
showPaymentsMenu,
isSetShowPaymentsMenu,
showSettingsMenu,
isSetShowSettingsMenu);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HomeScreenSettings {\n");
sb.append(" hideNavigationBar: ").append(toIndentedString(hideNavigationBar)).append("\n");
sb.append(" showPaymentsMenu: ").append(toIndentedString(showPaymentsMenu)).append("\n");
sb.append(" showSettingsMenu: ").append(toIndentedString(showSettingsMenu)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

/** Returns a map of properties to be merged into the JSON payload as explicit null values. */
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonAnyGetter
public Map<String, Object> getExplicitNulls() {
if (!this.includeNullValues) {
return Collections.emptyMap();
}

Map<String, Object> nulls = new HashMap<>();

if (isSetHideNavigationBar) {
addIfNull(nulls, JSON_PROPERTY_HIDE_NAVIGATION_BAR, this.hideNavigationBar);
}
if (isSetShowPaymentsMenu) {
addIfNull(nulls, JSON_PROPERTY_SHOW_PAYMENTS_MENU, this.showPaymentsMenu);
}
if (isSetShowSettingsMenu) {
addIfNull(nulls, JSON_PROPERTY_SHOW_SETTINGS_MENU, this.showSettingsMenu);
}

return nulls;
}

// add to map when value is null
private void addIfNull(Map<String, Object> map, String key, Object value) {
if (value == null) {
map.put(key, null);
}
}

/**
* Create an instance of HomeScreenSettings given an JSON string
*
* @param jsonString JSON string
* @return An instance of HomeScreenSettings
* @throws JsonProcessingException if the JSON string is invalid with respect to
* HomeScreenSettings
*/
public static HomeScreenSettings fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, HomeScreenSettings.class);
}

/**
* Convert an instance of HomeScreenSettings to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
Loading