
com.vendasta.sales.v1.internal.GetAutoAssignConfigRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sales.v1 Show documentation
Show all versions of sales.v1 Show documentation
Java SDK for service sales
The newest version!
package com.vendasta.sales.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 org.apache.commons.lang3.StringUtils;
import com.vendasta.sales.v1.generated.ApiProto;
/**
*
**/
public final class GetAutoAssignConfigRequest {
private final String partnerId;
private final String marketId;
private GetAutoAssignConfigRequest (
final String partnerId,
final String marketId)
{
this.partnerId = partnerId;
this.marketId = marketId;
}
/**
* The unique partner ID.
* @return The final value of partnerId on the object
**/
public String getPartnerId() {
return this.partnerId;
}
/**
* The unique market ID.
* @return The final value of marketId on the object
**/
public String getMarketId() {
return this.marketId;
}
public static class Builder {
private String partnerId;
private String marketId;
public Builder() {
this.partnerId = "";
this.marketId = "";
}
/**
* 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;
}
/**
* Takes the configuration in the mutable Builder and uses it to instantiate a final instance
* of the GetAutoAssignConfigRequest class
* @return The instantiated final GetAutoAssignConfigRequest
**/
public GetAutoAssignConfigRequest build() {
return new GetAutoAssignConfigRequest(
this.partnerId,
this.marketId);
}
}
/**
* Returns a Builder for GetAutoAssignConfigRequest, which is a mutable representation of the object. Once the
* client has built up an object they can then create an immutable GetAutoAssignConfigRequest 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 GetAutoAssignConfigRequest instance
**/
public String toString() {
String result = "GetAutoAssignConfigRequest\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";
return result;
}
/**
* Allows for simple conversion between the low-level generated protobuf object to
* GetAutoAssignConfigRequest, which is much more usable.
* @return An instance of GetAutoAssignConfigRequest representing the input proto object
**/
public static GetAutoAssignConfigRequest fromProto(ApiProto.GetAutoAssignConfigRequest proto) {
GetAutoAssignConfigRequest out = null;
if (proto != null) {
GetAutoAssignConfigRequest.Builder outBuilder = GetAutoAssignConfigRequest.newBuilder()
.setPartnerId(proto.getPartnerId())
.setMarketId(proto.getMarketId());
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 GetAutoAssignConfigRequest instances representing the input proto objects
**/
public static List fromProtos(List protos) {
List out = new ArrayList();
for(ApiProto.GetAutoAssignConfigRequest proto : protos) {
out.add(GetAutoAssignConfigRequest.fromProto(proto));
}
return out;
}
/**
* Allows for simple conversion of an object to the low-level generated protobuf object.
* @return An instance of ApiProto.GetAutoAssignConfigRequest which is a proto object ready for wire transmission
**/
public ApiProto.GetAutoAssignConfigRequest toProto() {
GetAutoAssignConfigRequest obj = this;
ApiProto.GetAutoAssignConfigRequest.Builder outBuilder = ApiProto.GetAutoAssignConfigRequest.newBuilder();
outBuilder.setPartnerId(obj.getPartnerId());
outBuilder.setMarketId(obj.getMarketId());
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.GetAutoAssignConfigRequest instances representing the input objects.
*/
public static List toProtos(List objects) {
List out = new ArrayList();
if(objects != null) {
for (GetAutoAssignConfigRequest obj : objects) {
out.add(obj!=null?obj.toProto():null);
}
}
return out;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy