xref: /aosp_15_r20/external/googleapis/google/api/serviceusage/v1/resources.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.api.serviceusage.v1;
18
19import "google/api/auth.proto";
20import "google/api/documentation.proto";
21import "google/api/endpoint.proto";
22import "google/api/monitored_resource.proto";
23import "google/api/monitoring.proto";
24import "google/api/quota.proto";
25import "google/api/resource.proto";
26import "google/api/usage.proto";
27import "google/protobuf/api.proto";
28
29option csharp_namespace = "Google.Cloud.ServiceUsage.V1";
30option go_package = "cloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb";
31option java_multiple_files = true;
32option java_outer_classname = "ResourcesProto";
33option java_package = "com.google.api.serviceusage.v1";
34option php_namespace = "Google\\Cloud\\ServiceUsage\\V1";
35option ruby_package = "Google::Cloud::ServiceUsage::V1";
36
37// A service that is available for use by the consumer.
38message Service {
39  option (google.api.resource) = {
40    type: "serviceusage.googleapis.com/Service"
41    pattern: "projects/{project}/services/{service}"
42    pattern: "folders/{folder}/services/{service}"
43    pattern: "organizations/{organization}/services/{service}"
44  };
45
46  // The resource name of the consumer and service.
47  //
48  // A valid name would be:
49  // - projects/123/services/serviceusage.googleapis.com
50  string name = 1;
51
52  // The resource name of the consumer.
53  //
54  // A valid name would be:
55  // - projects/123
56  string parent = 5;
57
58  // The service configuration of the available service.
59  // Some fields may be filtered out of the configuration in responses to
60  // the `ListServices` method. These fields are present only in responses to
61  // the `GetService` method.
62  ServiceConfig config = 2;
63
64  // Whether or not the service has been enabled for use by the consumer.
65  State state = 4;
66}
67
68// Whether or not a service has been enabled for use by a consumer.
69enum State {
70  // The default value, which indicates that the enabled state of the service
71  // is unspecified or not meaningful. Currently, all consumers other than
72  // projects (such as folders and organizations) are always in this state.
73  STATE_UNSPECIFIED = 0;
74
75  // The service cannot be used by this consumer. It has either been explicitly
76  // disabled, or has never been enabled.
77  DISABLED = 1;
78
79  // The service has been explicitly enabled for use by this consumer.
80  ENABLED = 2;
81}
82
83// The configuration of the service.
84message ServiceConfig {
85  // The DNS address at which this service is available.
86  //
87  // An example DNS address would be:
88  // `calendar.googleapis.com`.
89  string name = 1;
90
91  // The product title for this service.
92  string title = 2;
93
94  // A list of API interfaces exported by this service. Contains only the names,
95  // versions, and method names of the interfaces.
96  repeated google.protobuf.Api apis = 3;
97
98  // Additional API documentation. Contains only the summary and the
99  // documentation URL.
100  google.api.Documentation documentation = 6;
101
102  // Quota configuration.
103  google.api.Quota quota = 10;
104
105  // Auth configuration. Contains only the OAuth rules.
106  google.api.Authentication authentication = 11;
107
108  // Configuration controlling usage of this service.
109  google.api.Usage usage = 15;
110
111  // Configuration for network endpoints. Contains only the names and aliases
112  // of the endpoints.
113  repeated google.api.Endpoint endpoints = 18;
114
115  // Defines the monitored resources used by this service. This is required
116  // by the [Service.monitoring][google.api.Service.monitoring] and
117  // [Service.logging][google.api.Service.logging] configurations.
118  repeated google.api.MonitoredResourceDescriptor monitored_resources = 25;
119
120  // Monitoring configuration.
121  // This should not include the 'producer_destinations' field.
122  google.api.Monitoring monitoring = 28;
123}
124
125// The operation metadata returned for the batchend services operation.
126message OperationMetadata {
127  // The full name of the resources that this operation is directly
128  // associated with.
129  repeated string resource_names = 2;
130}
131