
com.vendasta.sales.v1.internal.Campaign 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.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import com.vendasta.sales.v1.generated.BusinessProto;
/**
*
**/
public enum Campaign {
CAMPAIGN_ANY(0),
CAMPAIGN_ON(1),
CAMPAIGN_OFF(2);
private static final Map protoTypeMap;
static {
Map aMap;
aMap = new HashMap();
aMap.put(BusinessProto.Campaign.CAMPAIGN_ANY, Campaign.CAMPAIGN_ANY);
aMap.put(BusinessProto.Campaign.CAMPAIGN_ON, Campaign.CAMPAIGN_ON);
aMap.put(BusinessProto.Campaign.CAMPAIGN_OFF, Campaign.CAMPAIGN_OFF);
protoTypeMap = Collections.unmodifiableMap(aMap);
}
private static final Map javaTypeMap;
static {
Map aMap;
aMap = new HashMap();
aMap.put(Campaign.CAMPAIGN_ANY, BusinessProto.Campaign.CAMPAIGN_ANY);
aMap.put(Campaign.CAMPAIGN_ON, BusinessProto.Campaign.CAMPAIGN_ON);
aMap.put(Campaign.CAMPAIGN_OFF, BusinessProto.Campaign.CAMPAIGN_OFF);
javaTypeMap = Collections.unmodifiableMap(aMap);
}
private int value;
private Campaign(int i) {
value = i;
}
public int getValue() {
return value;
}
public static Campaign fromProto(BusinessProto.Campaign proto) {
return protoTypeMap.get(proto);
}
public static List fromProtos(List protos) {
List result = new ArrayList();
for(BusinessProto.Campaign proto : protos) {
result.add(Campaign.fromProto(proto));
}
return result;
}
public BusinessProto.Campaign toProto() {
return javaTypeMap.get(this);
}
public static List toProtos(List objects) {
List result = new ArrayList();
for(Campaign obj : objects) {
result.add(obj.toProto());
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy