1# -*- coding: utf-8 -*- #
2# Copyright 2015 Google LLC. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15"""Resource definitions for cloud platform apis."""
16
17import enum
18
19
20BASE_URL = 'https://serviceconsumermanagement.googleapis.com/v1beta1/'
21DOCS_URL = 'https://cloud.google.com/service-consumer-management/docs/overview'
22
23
24class Collections(enum.Enum):
25  """Collections for all supported apis."""
26
27  OPERATIONS = (
28      'operations',
29      '{+name}',
30      {
31          '':
32              'operations/{operationsId}',
33      },
34      ['name'],
35      True
36  )
37  SERVICES = (
38      'services',
39      'services/{servicesId}/{servicesId1}/{servicesId2}',
40      {},
41      ['servicesId', 'servicesId1', 'servicesId2'],
42      True
43  )
44  SERVICES_CONSUMERQUOTAMETRICS = (
45      'services.consumerQuotaMetrics',
46      '{+name}',
47      {
48          '':
49              'services/{servicesId}/{servicesId1}/{servicesId2}/'
50              'consumerQuotaMetrics/{consumerQuotaMetricsId}',
51      },
52      ['name'],
53      True
54  )
55  SERVICES_CONSUMERQUOTAMETRICS_LIMITS = (
56      'services.consumerQuotaMetrics.limits',
57      '{+name}',
58      {
59          '':
60              'services/{servicesId}/{servicesId1}/{servicesId2}/'
61              'consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/'
62              '{limitsId}',
63      },
64      ['name'],
65      True
66  )
67
68  def __init__(self, collection_name, path, flat_paths, params,
69               enable_uri_parsing):
70    self.collection_name = collection_name
71    self.path = path
72    self.flat_paths = flat_paths
73    self.params = params
74    self.enable_uri_parsing = enable_uri_parsing
75