com.paypal.sdk.models.VaultInstruction Maven / Gradle / Ivy
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.paypal.sdk.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for VaultInstruction type.
*/
public class VaultInstruction {
private StoreInVaultInstruction storeInVault;
/**
* Default constructor.
*/
public VaultInstruction() {
}
/**
* Initialization constructor.
* @param storeInVault StoreInVaultInstruction value for storeInVault.
*/
public VaultInstruction(
StoreInVaultInstruction storeInVault) {
this.storeInVault = storeInVault;
}
/**
* Getter for StoreInVault.
* Defines how and when the payment source gets vaulted.
* @return Returns the StoreInVaultInstruction
*/
@JsonGetter("store_in_vault")
public StoreInVaultInstruction getStoreInVault() {
return storeInVault;
}
/**
* Setter for StoreInVault.
* Defines how and when the payment source gets vaulted.
* @param storeInVault Value for StoreInVaultInstruction
*/
@JsonSetter("store_in_vault")
public void setStoreInVault(StoreInVaultInstruction storeInVault) {
this.storeInVault = storeInVault;
}
/**
* Converts this VaultInstruction into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "VaultInstruction [" + "storeInVault=" + storeInVault + "]";
}
/**
* Builds a new {@link VaultInstruction.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link VaultInstruction.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(storeInVault);
return builder;
}
/**
* Class to build instances of {@link VaultInstruction}.
*/
public static class Builder {
private StoreInVaultInstruction storeInVault;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param storeInVault StoreInVaultInstruction value for storeInVault.
*/
public Builder(StoreInVaultInstruction storeInVault) {
this.storeInVault = storeInVault;
}
/**
* Setter for storeInVault.
* @param storeInVault StoreInVaultInstruction value for storeInVault.
* @return Builder
*/
public Builder storeInVault(StoreInVaultInstruction storeInVault) {
this.storeInVault = storeInVault;
return this;
}
/**
* Builds a new {@link VaultInstruction} object using the set fields.
* @return {@link VaultInstruction}
*/
public VaultInstruction build() {
return new VaultInstruction(storeInVault);
}
}
}