Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.AllowedOrigin;
import com.adyen.model.management.ApiCredentialLinks;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* CreateCompanyApiCredentialResponse
*/
@JsonPropertyOrder({
CreateCompanyApiCredentialResponse.JSON_PROPERTY_LINKS,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ACTIVE,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ALLOWED_IP_ADDRESSES,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ALLOWED_ORIGINS,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_API_KEY,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_CLIENT_KEY,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_DESCRIPTION,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ID,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_PASSWORD,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_ROLES,
CreateCompanyApiCredentialResponse.JSON_PROPERTY_USERNAME
})
public class CreateCompanyApiCredentialResponse {
public static final String JSON_PROPERTY_LINKS = "_links";
private ApiCredentialLinks links;
public static final String JSON_PROPERTY_ACTIVE = "active";
private Boolean active;
public static final String JSON_PROPERTY_ALLOWED_IP_ADDRESSES = "allowedIpAddresses";
private List allowedIpAddresses = new ArrayList<>();
public static final String JSON_PROPERTY_ALLOWED_ORIGINS = "allowedOrigins";
private List allowedOrigins = null;
public static final String JSON_PROPERTY_API_KEY = "apiKey";
private String apiKey;
public static final String JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS = "associatedMerchantAccounts";
private List associatedMerchantAccounts = new ArrayList<>();
public static final String JSON_PROPERTY_CLIENT_KEY = "clientKey";
private String clientKey;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_ROLES = "roles";
private List roles = new ArrayList<>();
public static final String JSON_PROPERTY_USERNAME = "username";
private String username;
public CreateCompanyApiCredentialResponse() {
}
public CreateCompanyApiCredentialResponse links(ApiCredentialLinks links) {
this.links = links;
return this;
}
/**
* Get links
* @return links
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ApiCredentialLinks getLinks() {
return links;
}
/**
* links
*
* @param links
*/
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLinks(ApiCredentialLinks links) {
this.links = links;
}
public CreateCompanyApiCredentialResponse active(Boolean active) {
this.active = active;
return this;
}
/**
* Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration.
* @return active
**/
@ApiModelProperty(required = true, value = "Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration.")
@JsonProperty(JSON_PROPERTY_ACTIVE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getActive() {
return active;
}
/**
* Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration.
*
* @param active
*/
@JsonProperty(JSON_PROPERTY_ACTIVE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setActive(Boolean active) {
this.active = active;
}
public CreateCompanyApiCredentialResponse allowedIpAddresses(List allowedIpAddresses) {
this.allowedIpAddresses = allowedIpAddresses;
return this;
}
public CreateCompanyApiCredentialResponse addAllowedIpAddressesItem(String allowedIpAddressesItem) {
this.allowedIpAddresses.add(allowedIpAddressesItem);
return this;
}
/**
* List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error.
* @return allowedIpAddresses
**/
@ApiModelProperty(required = true, value = "List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error.")
@JsonProperty(JSON_PROPERTY_ALLOWED_IP_ADDRESSES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAllowedIpAddresses() {
return allowedIpAddresses;
}
/**
* List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error.
*
* @param allowedIpAddresses
*/
@JsonProperty(JSON_PROPERTY_ALLOWED_IP_ADDRESSES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowedIpAddresses(List allowedIpAddresses) {
this.allowedIpAddresses = allowedIpAddresses;
}
public CreateCompanyApiCredentialResponse allowedOrigins(List allowedOrigins) {
this.allowedOrigins = allowedOrigins;
return this;
}
public CreateCompanyApiCredentialResponse addAllowedOriginsItem(AllowedOrigin allowedOriginsItem) {
if (this.allowedOrigins == null) {
this.allowedOrigins = new ArrayList<>();
}
this.allowedOrigins.add(allowedOriginsItem);
return this;
}
/**
* List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.
* @return allowedOrigins
**/
@ApiModelProperty(value = "List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.")
@JsonProperty(JSON_PROPERTY_ALLOWED_ORIGINS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAllowedOrigins() {
return allowedOrigins;
}
/**
* List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.
*
* @param allowedOrigins
*/
@JsonProperty(JSON_PROPERTY_ALLOWED_ORIGINS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowedOrigins(List allowedOrigins) {
this.allowedOrigins = allowedOrigins;
}
public CreateCompanyApiCredentialResponse apiKey(String apiKey) {
this.apiKey = apiKey;
return this;
}
/**
* The API key for the API credential that was created.
* @return apiKey
**/
@ApiModelProperty(required = true, value = "The API key for the API credential that was created.")
@JsonProperty(JSON_PROPERTY_API_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getApiKey() {
return apiKey;
}
/**
* The API key for the API credential that was created.
*
* @param apiKey
*/
@JsonProperty(JSON_PROPERTY_API_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public CreateCompanyApiCredentialResponse associatedMerchantAccounts(List associatedMerchantAccounts) {
this.associatedMerchantAccounts = associatedMerchantAccounts;
return this;
}
public CreateCompanyApiCredentialResponse addAssociatedMerchantAccountsItem(String associatedMerchantAccountsItem) {
this.associatedMerchantAccounts.add(associatedMerchantAccountsItem);
return this;
}
/**
* List of merchant accounts that the API credential has access to.
* @return associatedMerchantAccounts
**/
@ApiModelProperty(required = true, value = "List of merchant accounts that the API credential has access to.")
@JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAssociatedMerchantAccounts() {
return associatedMerchantAccounts;
}
/**
* List of merchant accounts that the API credential has access to.
*
* @param associatedMerchantAccounts
*/
@JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAssociatedMerchantAccounts(List associatedMerchantAccounts) {
this.associatedMerchantAccounts = associatedMerchantAccounts;
}
public CreateCompanyApiCredentialResponse clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
/**
* Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations.
* @return clientKey
**/
@ApiModelProperty(required = true, value = "Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations.")
@JsonProperty(JSON_PROPERTY_CLIENT_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getClientKey() {
return clientKey;
}
/**
* Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations.
*
* @param clientKey
*/
@JsonProperty(JSON_PROPERTY_CLIENT_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setClientKey(String clientKey) {
this.clientKey = clientKey;
}
public CreateCompanyApiCredentialResponse description(String description) {
this.description = description;
return this;
}
/**
* Description of the API credential.
* @return description
**/
@ApiModelProperty(value = "Description of the API credential.")
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
/**
* Description of the API credential.
*
* @param description
*/
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public CreateCompanyApiCredentialResponse id(String id) {
this.id = id;
return this;
}
/**
* Unique identifier of the API credential.
* @return id
**/
@ApiModelProperty(required = true, value = "Unique identifier of the API credential.")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
/**
* Unique identifier of the API credential.
*
* @param id
*/
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
}
public CreateCompanyApiCredentialResponse password(String password) {
this.password = password;
return this;
}
/**
* The password for the API credential that was created.
* @return password
**/
@ApiModelProperty(required = true, value = "The password for the API credential that was created.")
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPassword() {
return password;
}
/**
* The password for the API credential that was created.
*
* @param password
*/
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPassword(String password) {
this.password = password;
}
public CreateCompanyApiCredentialResponse roles(List roles) {
this.roles = roles;
return this;
}
public CreateCompanyApiCredentialResponse addRolesItem(String rolesItem) {
this.roles.add(rolesItem);
return this;
}
/**
* List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential.
* @return roles
**/
@ApiModelProperty(required = true, value = "List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential.")
@JsonProperty(JSON_PROPERTY_ROLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getRoles() {
return roles;
}
/**
* List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential.
*
* @param roles
*/
@JsonProperty(JSON_PROPERTY_ROLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoles(List roles) {
this.roles = roles;
}
public CreateCompanyApiCredentialResponse username(String username) {
this.username = username;
return this;
}
/**
* The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **[email protected]**.
* @return username
**/
@ApiModelProperty(required = true, value = "The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **[email protected]**.")
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUsername() {
return username;
}
/**
* The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **[email protected]**.
*
* @param username
*/
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsername(String username) {
this.username = username;
}
/**
* Return true if this CreateCompanyApiCredentialResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateCompanyApiCredentialResponse createCompanyApiCredentialResponse = (CreateCompanyApiCredentialResponse) o;
return Objects.equals(this.links, createCompanyApiCredentialResponse.links) &&
Objects.equals(this.active, createCompanyApiCredentialResponse.active) &&
Objects.equals(this.allowedIpAddresses, createCompanyApiCredentialResponse.allowedIpAddresses) &&
Objects.equals(this.allowedOrigins, createCompanyApiCredentialResponse.allowedOrigins) &&
Objects.equals(this.apiKey, createCompanyApiCredentialResponse.apiKey) &&
Objects.equals(this.associatedMerchantAccounts, createCompanyApiCredentialResponse.associatedMerchantAccounts) &&
Objects.equals(this.clientKey, createCompanyApiCredentialResponse.clientKey) &&
Objects.equals(this.description, createCompanyApiCredentialResponse.description) &&
Objects.equals(this.id, createCompanyApiCredentialResponse.id) &&
Objects.equals(this.password, createCompanyApiCredentialResponse.password) &&
Objects.equals(this.roles, createCompanyApiCredentialResponse.roles) &&
Objects.equals(this.username, createCompanyApiCredentialResponse.username);
}
@Override
public int hashCode() {
return Objects.hash(links, active, allowedIpAddresses, allowedOrigins, apiKey, associatedMerchantAccounts, clientKey, description, id, password, roles, username);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateCompanyApiCredentialResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" active: ").append(toIndentedString(active)).append("\n");
sb.append(" allowedIpAddresses: ").append(toIndentedString(allowedIpAddresses)).append("\n");
sb.append(" allowedOrigins: ").append(toIndentedString(allowedOrigins)).append("\n");
sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n");
sb.append(" associatedMerchantAccounts: ").append(toIndentedString(associatedMerchantAccounts)).append("\n");
sb.append(" clientKey: ").append(toIndentedString(clientKey)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" roles: ").append(toIndentedString(roles)).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 CreateCompanyApiCredentialResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of CreateCompanyApiCredentialResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to CreateCompanyApiCredentialResponse
*/
public static CreateCompanyApiCredentialResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, CreateCompanyApiCredentialResponse.class);
}
/**
* Convert an instance of CreateCompanyApiCredentialResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}