This repository was archived by the owner on May 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathlibrary_config.py
More file actions
71 lines (67 loc) · 2.81 KB
/
Copy pathlibrary_config.py
File metadata and controls
71 lines (67 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import List, Optional
from library_generation.model.gapic_config import GapicConfig
class LibraryConfig:
"""
Class that represents a library in a generation_config.yaml file
"""
def __init__(
self,
api_shortname: str,
api_description: str,
name_pretty: str,
product_documentation: str,
gapic_configs: List[GapicConfig],
library_type: Optional[str] = None,
release_level: Optional[str] = None,
api_id: Optional[str] = None,
api_reference: Optional[str] = None,
codeowner_team: Optional[str] = None,
client_documentation: Optional[str] = None,
distribution_name: Optional[str] = None,
excluded_dependencies: Optional[str] = None,
excluded_poms: Optional[str] = None,
googleapis_commitish: Optional[str] = None,
group_id: Optional[str] = "com.google.cloud",
issue_tracker: Optional[str] = None,
library_name: Optional[str] = None,
rest_documentation: Optional[str] = None,
rpc_documentation: Optional[str] = None,
cloud_api: Optional[bool] = True,
requires_billing: Optional[bool] = True,
):
self.api_shortname = api_shortname
self.api_description = api_description
self.name_pretty = name_pretty
self.product_documentation = product_documentation
self.gapic_configs = gapic_configs
self.library_type = library_type if library_type else "GAPIC_AUTO"
self.release_level = release_level if release_level else "preview"
self.api_id = api_id
self.api_reference = api_reference
self.codeowner_team = codeowner_team
self.excluded_dependencies = excluded_dependencies
self.excluded_poms = excluded_poms
self.client_documentation = client_documentation
self.distribution_name = distribution_name
self.googleapis_commitish = googleapis_commitish
self.group_id = group_id
self.issue_tracker = issue_tracker
self.library_name = library_name
self.rest_documentation = rest_documentation
self.rpc_documentation = rpc_documentation
self.cloud_api = cloud_api
self.requires_billing = requires_billing