
com.vendasta.accountgroup.v1.internal.ClosedStatus 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.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import com.vendasta.accountgroup.v1.generated.ApiProto;
/**
* ClosedStatus describes if the business is permanently or temporarily closed, or in a limited state
**/
public enum ClosedStatus {
UNSPECIFIED(0),
OPEN(1),
LIMITED(2),
TEMPORARY(3),
PERMANENT(4);
private static final Map protoTypeMap;
static {
Map aMap;
aMap = new HashMap();
aMap.put(ApiProto.ClosedStatus.UNSPECIFIED, ClosedStatus.UNSPECIFIED);
aMap.put(ApiProto.ClosedStatus.OPEN, ClosedStatus.OPEN);
aMap.put(ApiProto.ClosedStatus.LIMITED, ClosedStatus.LIMITED);
aMap.put(ApiProto.ClosedStatus.TEMPORARY, ClosedStatus.TEMPORARY);
aMap.put(ApiProto.ClosedStatus.PERMANENT, ClosedStatus.PERMANENT);
protoTypeMap = Collections.unmodifiableMap(aMap);
}
private static final Map javaTypeMap;
static {
Map aMap;
aMap = new HashMap();
aMap.put(ClosedStatus.UNSPECIFIED, ApiProto.ClosedStatus.UNSPECIFIED);
aMap.put(ClosedStatus.OPEN, ApiProto.ClosedStatus.OPEN);
aMap.put(ClosedStatus.LIMITED, ApiProto.ClosedStatus.LIMITED);
aMap.put(ClosedStatus.TEMPORARY, ApiProto.ClosedStatus.TEMPORARY);
aMap.put(ClosedStatus.PERMANENT, ApiProto.ClosedStatus.PERMANENT);
javaTypeMap = Collections.unmodifiableMap(aMap);
}
private int value;
private ClosedStatus(int i) {
value = i;
}
public int getValue() {
return value;
}
public static ClosedStatus fromProto(ApiProto.ClosedStatus proto) {
return protoTypeMap.get(proto);
}
public static List fromProtos(List protos) {
List result = new ArrayList();
for(ApiProto.ClosedStatus proto : protos) {
result.add(ClosedStatus.fromProto(proto));
}
return result;
}
public ApiProto.ClosedStatus toProto() {
return javaTypeMap.get(this);
}
public static List toProtos(List objects) {
List result = new ArrayList();
for(ClosedStatus obj : objects) {
result.add(obj.toProto());
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy