
com.vendasta.accountgroup.v1.internal.AccountGroupExternalIdentifiers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of accountgroup.v1 Show documentation
Show all versions of accountgroup.v1 Show documentation
Java SDK for service account-group
The newest version!
package com.vendasta.accountgroup.v1.internal;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import java.util.Arrays;
import java.time.Duration;
import org.apache.commons.lang3.StringUtils;
import com.vendasta.accountgroup.v1.generated.ApiProto;
/**
*
**/
public final class AccountGroupExternalIdentifiers {
private final String origin;
private final List jobId;
private final String customerIdentifier;
private final List tags;
private final List actionLists;
private final String socialProfileId;
private final String partnerId;
private final String marketId;
private final List taxIds;
private final String salesPersonId;
private final List additionalSalesPersonIds;
private final String salesforceId;
private AccountGroupExternalIdentifiers (
final String origin,
final List jobId,
final String customerIdentifier,
final List tags,
final List actionLists,
final String socialProfileId,
final String partnerId,
final String marketId,
final List taxIds,
final String salesPersonId,
final List additionalSalesPersonIds,
final String salesforceId)
{
this.origin = origin;
this.jobId = jobId;
this.customerIdentifier = customerIdentifier;
this.tags = tags;
this.actionLists = actionLists;
this.socialProfileId = socialProfileId;
this.partnerId = partnerId;
this.marketId = marketId;
this.taxIds = taxIds;
this.salesPersonId = salesPersonId;
this.additionalSalesPersonIds = additionalSalesPersonIds;
this.salesforceId = salesforceId;
}
/**
*
* @return The final value of origin on the object
**/
public String getOrigin() {
return this.origin;
}
/**
*
* @return The final value of jobId on the object
**/
public List getJobId() {
return this.jobId;
}
/**
*
* @return The final value of customerIdentifier on the object
**/
public String getCustomerIdentifier() {
return this.customerIdentifier;
}
/**
*
* @return The final value of tags on the object
**/
public List getTags() {
return this.tags;
}
/**
*
* @return The final value of actionLists on the object
**/
public List getActionLists() {
return this.actionLists;
}
/**
*
* @return The final value of socialProfileId on the object
**/
public String getSocialProfileId() {
return this.socialProfileId;
}
/**
*
* @return The final value of partnerId on the object
**/
public String getPartnerId() {
return this.partnerId;
}
/**
*
* @return The final value of marketId on the object
**/
public String getMarketId() {
return this.marketId;
}
/**
*
* @return The final value of taxIds on the object
**/
public List getTaxIds() {
return this.taxIds;
}
/**
* Primary salesperson id
* @return The final value of salesPersonId on the object
**/
public String getSalesPersonId() {
return this.salesPersonId;
}
/**
* Additional salesperson ids assigned to an account group which is not the primary salesperson id
* @return The final value of additionalSalesPersonIds on the object
**/
public List getAdditionalSalesPersonIds() {
return this.additionalSalesPersonIds;
}
/**
* Used to link AccountGroups to a corresponding Salesforce Account Object
* @return The final value of salesforceId on the object
**/
public String getSalesforceId() {
return this.salesforceId;
}
public static class Builder {
private String origin;
private List jobId;
private String customerIdentifier;
private List tags;
private List actionLists;
private String socialProfileId;
private String partnerId;
private String marketId;
private List taxIds;
private String salesPersonId;
private List additionalSalesPersonIds;
private String salesforceId;
public Builder() {
this.origin = "";
this.jobId = new ArrayList();
this.customerIdentifier = "";
this.tags = new ArrayList();
this.actionLists = new ArrayList();
this.socialProfileId = "";
this.partnerId = "";
this.marketId = "";
this.taxIds = new ArrayList();
this.salesPersonId = "";
this.additionalSalesPersonIds = new ArrayList();
this.salesforceId = "";
}
/**
* Adds a value to the builder for origin
* @param origin Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setOrigin(String origin) {
this.origin = origin;
return this;
}
/**
* Adds a value to the builder for jobId
* @param jobId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setJobId(List jobId) {
this.jobId = jobId;
return this;
}
/**
* Adds a value to the builder for customerIdentifier
* @param customerIdentifier Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setCustomerIdentifier(String customerIdentifier) {
this.customerIdentifier = customerIdentifier;
return this;
}
/**
* Adds a value to the builder for tags
* @param tags Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setTags(List tags) {
this.tags = tags;
return this;
}
/**
* Adds a value to the builder for actionLists
* @param actionLists Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setActionLists(List actionLists) {
this.actionLists = actionLists;
return this;
}
/**
* Adds a value to the builder for socialProfileId
* @param socialProfileId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setSocialProfileId(String socialProfileId) {
this.socialProfileId = socialProfileId;
return this;
}
/**
* Adds a value to the builder for partnerId
* @param partnerId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setPartnerId(String partnerId) {
this.partnerId = partnerId;
return this;
}
/**
* Adds a value to the builder for marketId
* @param marketId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setMarketId(String marketId) {
this.marketId = marketId;
return this;
}
/**
* Adds a value to the builder for taxIds
* @param taxIds Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setTaxIds(List taxIds) {
this.taxIds = taxIds;
return this;
}
/**
* Adds a value to the builder for salesPersonId
* @param salesPersonId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setSalesPersonId(String salesPersonId) {
this.salesPersonId = salesPersonId;
return this;
}
/**
* Adds a value to the builder for additionalSalesPersonIds
* @param additionalSalesPersonIds Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setAdditionalSalesPersonIds(List additionalSalesPersonIds) {
this.additionalSalesPersonIds = additionalSalesPersonIds;
return this;
}
/**
* Adds a value to the builder for salesforceId
* @param salesforceId Value to assign to the mutable Builder
* @return The Builder instance so that call chaining works
**/
public Builder setSalesforceId(String salesforceId) {
this.salesforceId = salesforceId;
return this;
}
/**
* Takes the configuration in the mutable Builder and uses it to instantiate a final instance
* of the AccountGroupExternalIdentifiers class
* @return The instantiated final AccountGroupExternalIdentifiers
**/
public AccountGroupExternalIdentifiers build() {
return new AccountGroupExternalIdentifiers(
this.origin,
this.jobId,
this.customerIdentifier,
this.tags,
this.actionLists,
this.socialProfileId,
this.partnerId,
this.marketId,
this.taxIds,
this.salesPersonId,
this.additionalSalesPersonIds,
this.salesforceId);
}
}
/**
* Returns a Builder for AccountGroupExternalIdentifiers, which is a mutable representation of the object. Once the
* client has built up an object they can then create an immutable AccountGroupExternalIdentifiers object using the
* build function.
* @return A fresh Builder instance with no values set
**/
public static Builder newBuilder() {
return new Builder();
}
/**
* Provides a human-readable representation of this object. Useful for debugging.
* @return A string representation of the AccountGroupExternalIdentifiers instance
**/
public String toString() {
String result = "AccountGroupExternalIdentifiers\n";
result += "-> origin: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.origin).split("\n"))) + "\n";
result += "-> jobId: (List)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.jobId).split("\n"))) + "\n";
result += "-> customerIdentifier: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.customerIdentifier).split("\n"))) + "\n";
result += "-> tags: (List)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.tags).split("\n"))) + "\n";
result += "-> actionLists: (List)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.actionLists).split("\n"))) + "\n";
result += "-> socialProfileId: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.socialProfileId).split("\n"))) + "\n";
result += "-> partnerId: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.partnerId).split("\n"))) + "\n";
result += "-> marketId: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.marketId).split("\n"))) + "\n";
result += "-> taxIds: (List)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.taxIds).split("\n"))) + "\n";
result += "-> salesPersonId: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.salesPersonId).split("\n"))) + "\n";
result += "-> additionalSalesPersonIds: (List)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.additionalSalesPersonIds).split("\n"))) + "\n";
result += "-> salesforceId: (String)"
+ StringUtils.join("\n ", Arrays.asList(String.valueOf(this.salesforceId).split("\n"))) + "\n";
return result;
}
/**
* Allows for simple conversion between the low-level generated protobuf object to
* AccountGroupExternalIdentifiers, which is much more usable.
* @return An instance of AccountGroupExternalIdentifiers representing the input proto object
**/
public static AccountGroupExternalIdentifiers fromProto(ApiProto.AccountGroupExternalIdentifiers proto) {
AccountGroupExternalIdentifiers out = null;
if (proto != null) {
AccountGroupExternalIdentifiers.Builder outBuilder = AccountGroupExternalIdentifiers.newBuilder()
.setOrigin(proto.getOrigin())
.setJobId(proto.getJobIdList())
.setCustomerIdentifier(proto.getCustomerIdentifier())
.setTags(proto.getTagsList())
.setActionLists(proto.getActionListsList())
.setSocialProfileId(proto.getSocialProfileId())
.setPartnerId(proto.getPartnerId())
.setMarketId(proto.getMarketId())
.setTaxIds(proto.getTaxIdsList())
.setSalesPersonId(proto.getSalesPersonId())
.setAdditionalSalesPersonIds(proto.getAdditionalSalesPersonIdsList())
.setSalesforceId(proto.getSalesforceId());
out = outBuilder.build();
}
return out;
}
/**
* Convenience method for handling lists of proto objects. It calls .fromProto on each one
* and returns a list of the converted results.
* @return A list of AccountGroupExternalIdentifiers instances representing the input proto objects
**/
public static List fromProtos(List protos) {
List out = new ArrayList();
for(ApiProto.AccountGroupExternalIdentifiers proto : protos) {
out.add(AccountGroupExternalIdentifiers.fromProto(proto));
}
return out;
}
/**
* Allows for simple conversion of an object to the low-level generated protobuf object.
* @return An instance of ApiProto.AccountGroupExternalIdentifiers which is a proto object ready for wire transmission
**/
public ApiProto.AccountGroupExternalIdentifiers toProto() {
AccountGroupExternalIdentifiers obj = this;
ApiProto.AccountGroupExternalIdentifiers.Builder outBuilder = ApiProto.AccountGroupExternalIdentifiers.newBuilder();
outBuilder.setOrigin(obj.getOrigin());
outBuilder.addAllJobId(obj.getJobId());
outBuilder.setCustomerIdentifier(obj.getCustomerIdentifier());
outBuilder.addAllTags(obj.getTags());
outBuilder.addAllActionLists(obj.getActionLists());
outBuilder.setSocialProfileId(obj.getSocialProfileId());
outBuilder.setPartnerId(obj.getPartnerId());
outBuilder.setMarketId(obj.getMarketId());
outBuilder.addAllTaxIds(obj.getTaxIds());
outBuilder.setSalesPersonId(obj.getSalesPersonId());
outBuilder.addAllAdditionalSalesPersonIds(obj.getAdditionalSalesPersonIds());
outBuilder.setSalesforceId(obj.getSalesforceId());
return outBuilder.build();
}
/**
* Convenience method for handling lists of objects. It calls .toProto on each one and
* returns a list of the converted results.
* @return A list of ApiProto.AccountGroupExternalIdentifiers instances representing the input objects.
*/
public static List toProtos(List objects) {
List out = new ArrayList();
if(objects != null) {
for (AccountGroupExternalIdentifiers obj : objects) {
out.add(obj!=null?obj.toProto():null);
}
}
return out;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy