Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/google/cloud/resourcemanager_v3/types/organizations.py: 97%
33 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-06 06:03 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-06 06:03 +0000
1# -*- coding: utf-8 -*-
2# Copyright 2022 Google LLC
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#
16from __future__ import annotations
18from typing import MutableMapping, MutableSequence
20from google.protobuf import timestamp_pb2 # type: ignore
21import proto # type: ignore
23__protobuf__ = proto.module(
24 package="google.cloud.resourcemanager.v3",
25 manifest={
26 "Organization",
27 "GetOrganizationRequest",
28 "SearchOrganizationsRequest",
29 "SearchOrganizationsResponse",
30 "DeleteOrganizationMetadata",
31 "UndeleteOrganizationMetadata",
32 },
33)
36class Organization(proto.Message):
37 r"""The root node in the resource hierarchy to which a particular
38 entity's (a company, for example) resources belong.
41 .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
43 Attributes:
44 name (str):
45 Output only. The resource name of the organization. This is
46 the organization's relative path in the API. Its format is
47 "organizations/[organization_id]". For example,
48 "organizations/1234".
49 display_name (str):
50 Output only. A human-readable string that
51 refers to the organization in the Google Cloud
52 Console. This string is set by the server and
53 cannot be changed. The string will be set to the
54 primary domain (for example, "google.com") of
55 the Google Workspace customer that owns the
56 organization.
57 directory_customer_id (str):
58 Immutable. The G Suite / Workspace customer
59 id used in the Directory API.
61 This field is a member of `oneof`_ ``owner``.
62 state (google.cloud.resourcemanager_v3.types.Organization.State):
63 Output only. The organization's current
64 lifecycle state.
65 create_time (google.protobuf.timestamp_pb2.Timestamp):
66 Output only. Timestamp when the Organization
67 was created.
68 update_time (google.protobuf.timestamp_pb2.Timestamp):
69 Output only. Timestamp when the Organization
70 was last modified.
71 delete_time (google.protobuf.timestamp_pb2.Timestamp):
72 Output only. Timestamp when the Organization
73 was requested for deletion.
74 etag (str):
75 Output only. A checksum computed by the
76 server based on the current value of the
77 Organization resource. This may be sent on
78 update and delete requests to ensure the client
79 has an up-to-date value before proceeding.
80 """
82 class State(proto.Enum):
83 r"""Organization lifecycle states.
85 Values:
86 STATE_UNSPECIFIED (0):
87 Unspecified state. This is only useful for
88 distinguishing unset values.
89 ACTIVE (1):
90 The normal and active state.
91 DELETE_REQUESTED (2):
92 The organization has been marked for deletion
93 by the user.
94 """
95 STATE_UNSPECIFIED = 0
96 ACTIVE = 1
97 DELETE_REQUESTED = 2
99 name: str = proto.Field(
100 proto.STRING,
101 number=1,
102 )
103 display_name: str = proto.Field(
104 proto.STRING,
105 number=2,
106 )
107 directory_customer_id: str = proto.Field(
108 proto.STRING,
109 number=3,
110 oneof="owner",
111 )
112 state: State = proto.Field(
113 proto.ENUM,
114 number=4,
115 enum=State,
116 )
117 create_time: timestamp_pb2.Timestamp = proto.Field(
118 proto.MESSAGE,
119 number=5,
120 message=timestamp_pb2.Timestamp,
121 )
122 update_time: timestamp_pb2.Timestamp = proto.Field(
123 proto.MESSAGE,
124 number=6,
125 message=timestamp_pb2.Timestamp,
126 )
127 delete_time: timestamp_pb2.Timestamp = proto.Field(
128 proto.MESSAGE,
129 number=7,
130 message=timestamp_pb2.Timestamp,
131 )
132 etag: str = proto.Field(
133 proto.STRING,
134 number=8,
135 )
138class GetOrganizationRequest(proto.Message):
139 r"""The request sent to the ``GetOrganization`` method. The ``name``
140 field is required. ``organization_id`` is no longer accepted.
142 Attributes:
143 name (str):
144 Required. The resource name of the Organization to fetch.
145 This is the organization's relative path in the API,
146 formatted as "organizations/[organizationId]". For example,
147 "organizations/1234".
148 """
150 name: str = proto.Field(
151 proto.STRING,
152 number=1,
153 )
156class SearchOrganizationsRequest(proto.Message):
157 r"""The request sent to the ``SearchOrganizations`` method.
159 Attributes:
160 page_size (int):
161 Optional. The maximum number of organizations
162 to return in the response. The server can return
163 fewer organizations than requested. If
164 unspecified, server picks an appropriate
165 default.
166 page_token (str):
167 Optional. A pagination token returned from a previous call
168 to ``SearchOrganizations`` that indicates from where listing
169 should continue.
170 query (str):
171 Optional. An optional query string used to filter the
172 Organizations to return in the response. Query rules are
173 case-insensitive.
175 ::
177 | Field | Description |
178 |------------------|--------------------------------------------|
179 | directoryCustomerId, owner.directoryCustomerId | Filters by directory
180 customer id. |
181 | domain | Filters by domain. |
183 Organizations may be queried by ``directoryCustomerId`` or
184 by ``domain``, where the domain is a G Suite domain, for
185 example:
187 - Query ``directorycustomerid:123456789`` returns
188 Organization resources with
189 ``owner.directory_customer_id`` equal to ``123456789``.
190 - Query ``domain:google.com`` returns Organization
191 resources corresponding to the domain ``google.com``.
192 """
194 page_size: int = proto.Field(
195 proto.INT32,
196 number=1,
197 )
198 page_token: str = proto.Field(
199 proto.STRING,
200 number=2,
201 )
202 query: str = proto.Field(
203 proto.STRING,
204 number=3,
205 )
208class SearchOrganizationsResponse(proto.Message):
209 r"""The response returned from the ``SearchOrganizations`` method.
211 Attributes:
212 organizations (MutableSequence[google.cloud.resourcemanager_v3.types.Organization]):
213 The list of Organizations that matched the
214 search query, possibly paginated.
215 next_page_token (str):
216 A pagination token to be used to retrieve the
217 next page of results. If the result is too large
218 to fit within the page size specified in the
219 request, this field will be set with a token
220 that can be used to fetch the next page of
221 results. If this field is empty, it indicates
222 that this response contains the last page of
223 results.
224 """
226 @property
227 def raw_page(self):
228 return self
230 organizations: MutableSequence["Organization"] = proto.RepeatedField(
231 proto.MESSAGE,
232 number=1,
233 message="Organization",
234 )
235 next_page_token: str = proto.Field(
236 proto.STRING,
237 number=2,
238 )
241class DeleteOrganizationMetadata(proto.Message):
242 r"""A status object which is used as the ``metadata`` field for the
243 operation returned by DeleteOrganization.
245 """
248class UndeleteOrganizationMetadata(proto.Message):
249 r"""A status object which is used as the ``metadata`` field for the
250 Operation returned by UndeleteOrganization.
252 """
255__all__ = tuple(sorted(__protobuf__.manifest))