This repository has been archived by the owner on Jul 6, 2023. It is now read-only.
/
image_versions.py
104 lines (86 loc) · 3.61 KB
/
image_versions.py
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- coding: utf-8 -*-
# Copyright 2020 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.
#
import proto # type: ignore
from google.type import date_pb2 # type: ignore
__protobuf__ = proto.module(
package="google.cloud.orchestration.airflow.service.v1beta1",
manifest={"ListImageVersionsRequest", "ListImageVersionsResponse", "ImageVersion",},
)
class ListImageVersionsRequest(proto.Message):
r"""List ImageVersions in a project and location.
Attributes:
parent (str):
List ImageVersions in the given project and
location, in the form:
"projects/{projectId}/locations/{locationId}".
page_size (int):
The maximum number of image_versions to return.
page_token (str):
The next_page_token value returned from a previous List
request, if any.
include_past_releases (bool):
Whether or not image versions from old
releases should be included.
"""
parent = proto.Field(proto.STRING, number=1,)
page_size = proto.Field(proto.INT32, number=2,)
page_token = proto.Field(proto.STRING, number=3,)
include_past_releases = proto.Field(proto.BOOL, number=4,)
class ListImageVersionsResponse(proto.Message):
r"""The ImageVersions in a project and location.
Attributes:
image_versions (Sequence[google.cloud.orchestration.airflow.service_v1beta1.types.ImageVersion]):
The list of supported ImageVersions in a
location.
next_page_token (str):
The page token used to query for the next
page if one exists.
"""
@property
def raw_page(self):
return self
image_versions = proto.RepeatedField(
proto.MESSAGE, number=1, message="ImageVersion",
)
next_page_token = proto.Field(proto.STRING, number=2,)
class ImageVersion(proto.Message):
r"""Image Version information
Attributes:
image_version_id (str):
The string identifier of the ImageVersion, in
the form: "composer-x.y.z-airflow-a.b(.c)".
is_default (bool):
Whether this is the default ImageVersion used
by Composer during environment creation if no
input ImageVersion is specified.
supported_python_versions (Sequence[str]):
supported python versions
release_date (google.type.date_pb2.Date):
The date of the version release.
creation_disabled (bool):
Whether it is impossible to create an
environment with the image version.
upgrade_disabled (bool):
Whether it is impossible to upgrade an
environment running with the image version.
"""
image_version_id = proto.Field(proto.STRING, number=1,)
is_default = proto.Field(proto.BOOL, number=2,)
supported_python_versions = proto.RepeatedField(proto.STRING, number=3,)
release_date = proto.Field(proto.MESSAGE, number=4, message=date_pb2.Date,)
creation_disabled = proto.Field(proto.BOOL, number=5,)
upgrade_disabled = proto.Field(proto.BOOL, number=6,)
__all__ = tuple(sorted(__protobuf__.manifest))