xref: /aosp_15_r20/external/googleapis/google/api/servicecontrol/v1/check_error.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2021 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.api.servicecontrol.v1;
18
19import "google/rpc/status.proto";
20
21option cc_enable_arenas = true;
22option csharp_namespace = "Google.Cloud.ServiceControl.V1";
23option go_package = "cloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb";
24option java_multiple_files = true;
25option java_outer_classname = "CheckErrorProto";
26option java_package = "com.google.api.servicecontrol.v1";
27option php_namespace = "Google\\Cloud\\ServiceControl\\V1";
28option ruby_package = "Google::Cloud::ServiceControl::V1";
29
30// Defines the errors to be returned in
31// [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
32message CheckError {
33  // Error codes for Check responses.
34  enum Code {
35    // This is never used in `CheckResponse`.
36    ERROR_CODE_UNSPECIFIED = 0;
37
38    // The consumer's project id, network container, or resource container was
39    // not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
40    NOT_FOUND = 5;
41
42    // The consumer doesn't have access to the specified resource.
43    // Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
44    PERMISSION_DENIED = 7;
45
46    // Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
47    RESOURCE_EXHAUSTED = 8;
48
49    // The consumer hasn't activated the service.
50    SERVICE_NOT_ACTIVATED = 104;
51
52    // The consumer cannot access the service because billing is disabled.
53    BILLING_DISABLED = 107;
54
55    // The consumer's project has been marked as deleted (soft deletion).
56    PROJECT_DELETED = 108;
57
58    // The consumer's project number or id does not represent a valid project.
59    PROJECT_INVALID = 114;
60
61    // The input consumer info does not represent a valid consumer folder or
62    // organization.
63    CONSUMER_INVALID = 125;
64
65    // The IP address of the consumer is invalid for the specific consumer
66    // project.
67    IP_ADDRESS_BLOCKED = 109;
68
69    // The referer address of the consumer request is invalid for the specific
70    // consumer project.
71    REFERER_BLOCKED = 110;
72
73    // The client application of the consumer request is invalid for the
74    // specific consumer project.
75    CLIENT_APP_BLOCKED = 111;
76
77    // The API targeted by this request is invalid for the specified consumer
78    // project.
79    API_TARGET_BLOCKED = 122;
80
81    // The consumer's API key is invalid.
82    API_KEY_INVALID = 105;
83
84    // The consumer's API Key has expired.
85    API_KEY_EXPIRED = 112;
86
87    // The consumer's API Key was not found in config record.
88    API_KEY_NOT_FOUND = 113;
89
90    // The credential in the request can not be verified.
91    INVALID_CREDENTIAL = 123;
92
93    // The backend server for looking up project id/number is unavailable.
94    NAMESPACE_LOOKUP_UNAVAILABLE = 300;
95
96    // The backend server for checking service status is unavailable.
97    SERVICE_STATUS_UNAVAILABLE = 301;
98
99    // The backend server for checking billing status is unavailable.
100    BILLING_STATUS_UNAVAILABLE = 302;
101
102    // Cloud Resource Manager backend server is unavailable.
103    CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;
104  }
105
106  // The error code.
107  Code code = 1;
108
109  // Subject to whom this error applies. See the specific code enum for more
110  // details on this field. For example:
111  //
112  // - "project:<project-id or project-number>"
113  // - "folder:<folder-id>"
114  // - "organization:<organization-id>"
115  string subject = 4;
116
117  // Free-form text providing details on the error cause of the error.
118  string detail = 2;
119
120  // Contains public information about the check error. If available,
121  // `status.code` will be non zero and client can propagate it out as public
122  // error.
123  google.rpc.Status status = 3;
124}
125