
com.adyen.model.management.CreateMerchantUserRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* 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 java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.Name;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* CreateMerchantUserRequest
*/
@JsonPropertyOrder({
CreateMerchantUserRequest.JSON_PROPERTY_ACCOUNT_GROUPS,
CreateMerchantUserRequest.JSON_PROPERTY_EMAIL,
CreateMerchantUserRequest.JSON_PROPERTY_LOGIN_METHOD,
CreateMerchantUserRequest.JSON_PROPERTY_NAME,
CreateMerchantUserRequest.JSON_PROPERTY_ROLES,
CreateMerchantUserRequest.JSON_PROPERTY_TIME_ZONE_CODE,
CreateMerchantUserRequest.JSON_PROPERTY_USERNAME
})
public class CreateMerchantUserRequest {
public static final String JSON_PROPERTY_ACCOUNT_GROUPS = "accountGroups";
private List accountGroups;
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
public static final String JSON_PROPERTY_LOGIN_METHOD = "loginMethod";
private String loginMethod;
public static final String JSON_PROPERTY_NAME = "name";
private Name name;
public static final String JSON_PROPERTY_ROLES = "roles";
private List roles;
public static final String JSON_PROPERTY_TIME_ZONE_CODE = "timeZoneCode";
private String timeZoneCode;
public static final String JSON_PROPERTY_USERNAME = "username";
private String username;
public CreateMerchantUserRequest() {
}
/**
* The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
*
* @param accountGroups The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest accountGroups(List accountGroups) {
this.accountGroups = accountGroups;
return this;
}
public CreateMerchantUserRequest addAccountGroupsItem(String accountGroupsItem) {
if (this.accountGroups == null) {
this.accountGroups = new ArrayList<>();
}
this.accountGroups.add(accountGroupsItem);
return this;
}
/**
* The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
* @return accountGroups The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_GROUPS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAccountGroups() {
return accountGroups;
}
/**
* The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
*
* @param accountGroups The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_GROUPS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountGroups(List accountGroups) {
this.accountGroups = accountGroups;
}
/**
* The email address of the user.
*
* @param email The email address of the user.
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest email(String email) {
this.email = email;
return this;
}
/**
* The email address of the user.
* @return email The email address of the user.
*/
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEmail() {
return email;
}
/**
* The email address of the user.
*
* @param email The email address of the user.
*/
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
}
/**
* The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
*
* @param loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest loginMethod(String loginMethod) {
this.loginMethod = loginMethod;
return this;
}
/**
* The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
* @return loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
*/
@JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLoginMethod() {
return loginMethod;
}
/**
* The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
*
* @param loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO**
*/
@JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLoginMethod(String loginMethod) {
this.loginMethod = loginMethod;
}
/**
* name
*
* @param name
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest name(Name name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Name getName() {
return name;
}
/**
* name
*
* @param name
*/
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(Name name) {
this.name = name;
}
/**
* The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
*
* @param roles The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest roles(List roles) {
this.roles = roles;
return this;
}
public CreateMerchantUserRequest addRolesItem(String rolesItem) {
if (this.roles == null) {
this.roles = new ArrayList<>();
}
this.roles.add(rolesItem);
return this;
}
/**
* The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
* @return roles The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
*/
@JsonProperty(JSON_PROPERTY_ROLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getRoles() {
return roles;
}
/**
* The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
*
* @param roles The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
*/
@JsonProperty(JSON_PROPERTY_ROLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoles(List roles) {
this.roles = roles;
}
/**
* The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
*
* @param timeZoneCode The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest timeZoneCode(String timeZoneCode) {
this.timeZoneCode = timeZoneCode;
return this;
}
/**
* The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
* @return timeZoneCode The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
*/
@JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTimeZoneCode() {
return timeZoneCode;
}
/**
* The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
*
* @param timeZoneCode The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
*/
@JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimeZoneCode(String timeZoneCode) {
this.timeZoneCode = timeZoneCode;
}
/**
* The user's email address that will be their username. Must be the same as the one in the `email` field.
*
* @param username The user's email address that will be their username. Must be the same as the one in the `email` field.
* @return the current {@code CreateMerchantUserRequest} instance, allowing for method chaining
*/
public CreateMerchantUserRequest username(String username) {
this.username = username;
return this;
}
/**
* The user's email address that will be their username. Must be the same as the one in the `email` field.
* @return username The user's email address that will be their username. Must be the same as the one in the `email` field.
*/
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUsername() {
return username;
}
/**
* The user's email address that will be their username. Must be the same as the one in the `email` field.
*
* @param username The user's email address that will be their username. Must be the same as the one in the `email` field.
*/
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsername(String username) {
this.username = username;
}
/**
* Return true if this CreateMerchantUserRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateMerchantUserRequest createMerchantUserRequest = (CreateMerchantUserRequest) o;
return Objects.equals(this.accountGroups, createMerchantUserRequest.accountGroups) &&
Objects.equals(this.email, createMerchantUserRequest.email) &&
Objects.equals(this.loginMethod, createMerchantUserRequest.loginMethod) &&
Objects.equals(this.name, createMerchantUserRequest.name) &&
Objects.equals(this.roles, createMerchantUserRequest.roles) &&
Objects.equals(this.timeZoneCode, createMerchantUserRequest.timeZoneCode) &&
Objects.equals(this.username, createMerchantUserRequest.username);
}
@Override
public int hashCode() {
return Objects.hash(accountGroups, email, loginMethod, name, roles, timeZoneCode, username);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateMerchantUserRequest {\n");
sb.append(" accountGroups: ").append(toIndentedString(accountGroups)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" loginMethod: ").append(toIndentedString(loginMethod)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" roles: ").append(toIndentedString(roles)).append("\n");
sb.append(" timeZoneCode: ").append(toIndentedString(timeZoneCode)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).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 ");
}
/**
* Create an instance of CreateMerchantUserRequest given an JSON string
*
* @param jsonString JSON string
* @return An instance of CreateMerchantUserRequest
* @throws JsonProcessingException if the JSON string is invalid with respect to CreateMerchantUserRequest
*/
public static CreateMerchantUserRequest fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, CreateMerchantUserRequest.class);
}
/**
* Convert an instance of CreateMerchantUserRequest to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy