1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.apps.drive.labels.v2beta; 18 19option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2beta;labels"; 20option java_multiple_files = true; 21option java_outer_classname = "ExceptionDetailProto"; 22option java_package = "com.google.apps.drive.labels.v2beta"; 23 24// Every ExceptionType maps to one and only one Exception class. This allows 25// internal clients to identify the exact server exception that caused the 26// error for debugging and logging purposes. 27// Add new ExceptionTypes to EXCEPTION_TYPE_TO_ERROR_CODE_MAP in 28// j/c/g/apps/boq/metadata/model/service/exceptions/CategoryExceptionHelper 29enum ExceptionType { 30 // Unknown ExceptionType. 31 EXCEPTION_TYPE_UNSPECIFIED = 0; 32 33 // The required field is missing. 34 FIELD_REQUIRED = 1; 35 36 // Unable to create a metamodel with the given ID because it already exists. 37 METAMODEL_ALREADY_EXISTS = 2; 38 39 // Metamodel was not found 40 METAMODEL_NOT_FOUND = 3; 41 42 // Metamodel state transition isn't allowed. 43 ILLEGAL_METAMODEL_STATE_TRANSITION = 4; 44 45 // Metamodel deprecation policy is invalid. 46 INVALID_METAMODEL_DEPRECATION_POLICY = 5; 47 48 // Cannot delete a metamodel due to the pending deprecation policy. 49 METAMODEL_DELETION_DENIED_UNTIL = 6; 50 51 // A Field value is invalid. 52 INVALID_FIELD = 7; 53 54 // Precondition failed when updating a metamodel 55 METAMODEL_PRECONDITION_FAILED = 8; 56 57 // Multiple fields had the same key. 58 DUPLICATE_FIELD_KEY = 9; 59 60 // Removing a field from a Metamodel (e.g. a published Metamodel) is not 61 // permitted. 62 ILLEGAL_FIELD_REMOVAL = 10; 63 64 // Cannot specify field options for a different field type. 65 ILLEGAL_FIELD_OPTIONS_FOR_FIELD = 11; 66 67 // Some changes are not supported 68 UNSUPPORTED_CHANGE_TO_PUBLISHED_METAMODEL = 12; 69 70 // Cannot change the metamodel state in an update 71 ILLEGAL_METAMODEL_STATE_TRANSITION_IN_UPDATE = 13; 72 73 // The page token is expired 74 PAGE_TOKEN_EXPIRED = 14; 75 76 // The user is not authorized to make the request. 77 NOT_AUTHORIZED = 15; 78 79 // Illegal field state transition 80 ILLEGAL_FIELD_STATE_TRANSITION = 16; 81 82 // Illegal choice set option state transition 83 ILLEGAL_CHOICE_SET_OPTION_STATE_TRANSITION = 17; 84 85 // Invalid choice set options 86 INVALID_CHOICE_SET_OPTIONS = 18; 87 88 // Invalid field key 89 INVALID_FIELD_KEY = 19; 90 91 // A specified property on a field is outside the allowed range. 92 INVALID_FIELD_PROPERTY_RANGE = 20; 93 94 // A localized string wasn't valid. This may be because the locale is invalid, 95 // its missing a default value, or the translation is empty for a set locale. 96 INVALID_LOCALIZED_STRING = 21; 97 98 // cannot change a property on a published field 99 ILLEGAL_CHANGE_TO_PUBLISHED_FIELD = 22; 100 101 // A field update is not inclusive of the previous value 102 INVALID_FIELD_UPDATE_NOT_INCLUSIVE = 23; 103 104 // A field update is not inclusive of the previous value 105 INVALID_CHOICE_SET_STATE = 24; 106 107 // An unknown error occurred 108 INTERNAL_SERVER_ERROR = 500; 109} 110 111// Exception detail. 112message ExceptionDetail { 113 // The type of exception that occurred. Required. 114 ExceptionType error_type = 1; 115} 116