resources.proto 4.2 KB

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