io.bloombox.schema.services.shop.OrderError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java RPCAPI client for the Bloombox Cloud.
/*
* Copyright 2017, Bloombox, LLC. All rights reserved.
*
* Source and object computer code contained herein is the private intellectual property
* of Bloombox, a California Limited Liability Corporation. Use of this code in source form
* requires permission in writing before use or the publishing of derivative works, for
* commercial purposes or any other purpose, from a duly authorized officer of Momentum
* Ideas Co.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: shop/v1/ShopService_v1.proto
package io.bloombox.schema.services.shop;
/**
*
* Enumerates errors that may prevent a user from submitting an order for pickup or delivery.
*
*
* Protobuf enum {@code services.shop.v1.OrderError}
*/
public enum OrderError
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* No error occurred.
*
*
* NO_ERROR = 0;
*/
NO_ERROR(0),
/**
*
* Generic invalid payload.
*
*
* INVALID_ORDER = 1;
*/
INVALID_ORDER(1),
/**
*
* The user was not found to be eligible to submit orders.
*
*
* USER_NOT_ELIGIBLE = 2;
*/
USER_NOT_ELIGIBLE(2),
/**
*
* Delivery is not supported within the zipcode provided.
*
*
* ZIPCODE_NOT_ELIGIBLE = 3;
*/
ZIPCODE_NOT_ELIGIBLE(3),
/**
*
* Zipcode is eligible, but currently inactive.
*
*
* ZIPCODE_NOT_ACTIVE = 4;
*/
ZIPCODE_NOT_ACTIVE(4),
/**
*
* Zipcode delivery minimum was not met by the order subtotal.
*
*
* ZIPCODE_MINIMUM_NOT_MET = 5;
*/
ZIPCODE_MINIMUM_NOT_MET(5),
/**
*
* The partner code was invalid.
*
*
* INVALID_PARTNER = 6;
*/
INVALID_PARTNER(6),
/**
*
* The location code was invalid.
*
*
* INVALID_LOCATION = 7;
*/
INVALID_LOCATION(7),
/**
*
* The customer record was found to be invalid.
*
*
* INVALID_CUSTOMER = 8;
*/
INVALID_CUSTOMER(8),
/**
*
* The request is of type DELIVERY but was missing destination information.
*
*
* MISSING_DESTINATION = 9;
*/
MISSING_DESTINATION(9),
/**
*
* The shop is not open right now for DELIVERY, or at the requested time for PICKUP.
*
*
* SHOP_NOT_OPEN = 10;
*/
SHOP_NOT_OPEN(10),
/**
*
* Global delivery or order minimum subtotal was not met.
*
*
* GLOBAL_MINIMUM_NOT_MET = 11;
*/
GLOBAL_MINIMUM_NOT_MET(11),
/**
*
* The user's membership could not be located for a given dispensary.
*
*
* MEMBERSHIP_NOT_FOUND = 12;
*/
MEMBERSHIP_NOT_FOUND(12),
UNRECOGNIZED(-1),
;
/**
*
* No error occurred.
*
*
* NO_ERROR = 0;
*/
public static final int NO_ERROR_VALUE = 0;
/**
*
* Generic invalid payload.
*
*
* INVALID_ORDER = 1;
*/
public static final int INVALID_ORDER_VALUE = 1;
/**
*
* The user was not found to be eligible to submit orders.
*
*
* USER_NOT_ELIGIBLE = 2;
*/
public static final int USER_NOT_ELIGIBLE_VALUE = 2;
/**
*
* Delivery is not supported within the zipcode provided.
*
*
* ZIPCODE_NOT_ELIGIBLE = 3;
*/
public static final int ZIPCODE_NOT_ELIGIBLE_VALUE = 3;
/**
*
* Zipcode is eligible, but currently inactive.
*
*
* ZIPCODE_NOT_ACTIVE = 4;
*/
public static final int ZIPCODE_NOT_ACTIVE_VALUE = 4;
/**
*
* Zipcode delivery minimum was not met by the order subtotal.
*
*
* ZIPCODE_MINIMUM_NOT_MET = 5;
*/
public static final int ZIPCODE_MINIMUM_NOT_MET_VALUE = 5;
/**
*
* The partner code was invalid.
*
*
* INVALID_PARTNER = 6;
*/
public static final int INVALID_PARTNER_VALUE = 6;
/**
*
* The location code was invalid.
*
*
* INVALID_LOCATION = 7;
*/
public static final int INVALID_LOCATION_VALUE = 7;
/**
*
* The customer record was found to be invalid.
*
*
* INVALID_CUSTOMER = 8;
*/
public static final int INVALID_CUSTOMER_VALUE = 8;
/**
*
* The request is of type DELIVERY but was missing destination information.
*
*
* MISSING_DESTINATION = 9;
*/
public static final int MISSING_DESTINATION_VALUE = 9;
/**
*
* The shop is not open right now for DELIVERY, or at the requested time for PICKUP.
*
*
* SHOP_NOT_OPEN = 10;
*/
public static final int SHOP_NOT_OPEN_VALUE = 10;
/**
*
* Global delivery or order minimum subtotal was not met.
*
*
* GLOBAL_MINIMUM_NOT_MET = 11;
*/
public static final int GLOBAL_MINIMUM_NOT_MET_VALUE = 11;
/**
*
* The user's membership could not be located for a given dispensary.
*
*
* MEMBERSHIP_NOT_FOUND = 12;
*/
public static final int MEMBERSHIP_NOT_FOUND_VALUE = 12;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OrderError valueOf(int value) {
return forNumber(value);
}
public static OrderError forNumber(int value) {
switch (value) {
case 0: return NO_ERROR;
case 1: return INVALID_ORDER;
case 2: return USER_NOT_ELIGIBLE;
case 3: return ZIPCODE_NOT_ELIGIBLE;
case 4: return ZIPCODE_NOT_ACTIVE;
case 5: return ZIPCODE_MINIMUM_NOT_MET;
case 6: return INVALID_PARTNER;
case 7: return INVALID_LOCATION;
case 8: return INVALID_CUSTOMER;
case 9: return MISSING_DESTINATION;
case 10: return SHOP_NOT_OPEN;
case 11: return GLOBAL_MINIMUM_NOT_MET;
case 12: return MEMBERSHIP_NOT_FOUND;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
OrderError> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public OrderError findValueByNumber(int number) {
return OrderError.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.bloombox.schema.services.shop.ShopServiceV1.getDescriptor().getEnumTypes().get(1);
}
private static final OrderError[] VALUES = values();
public static OrderError valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private OrderError(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:services.shop.v1.OrderError)
}