Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1 | // This is a generated file (see the discoveryapis_generator project). |
| 2 | |
| 3 | // ignore_for_file: camel_case_types |
| 4 | // ignore_for_file: comment_references |
| 5 | // ignore_for_file: file_names |
| 6 | // ignore_for_file: library_names |
| 7 | // ignore_for_file: lines_longer_than_80_chars |
| 8 | // ignore_for_file: non_constant_identifier_names |
| 9 | // ignore_for_file: prefer_expression_function_bodies |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 10 | // ignore_for_file: prefer_interpolation_to_compose_strings |
| 11 | // ignore_for_file: unnecessary_brace_in_string_interps |
| 12 | // ignore_for_file: unnecessary_cast |
| 13 | // ignore_for_file: unnecessary_lambdas |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 14 | // ignore_for_file: unnecessary_string_interpolations |
| 15 | |
| 16 | /// Cloud Domains API - v1beta1 |
| 17 | /// |
| 18 | /// Enables management and configuration of domain names. |
| 19 | /// |
| 20 | /// For more information, see <https://cloud.google.com/domains/> |
| 21 | /// |
| 22 | /// Create an instance of [CloudDomainsApi] to access these resources: |
| 23 | /// |
| 24 | /// - [ProjectsResource] |
| 25 | /// - [ProjectsLocationsResource] |
| 26 | /// - [ProjectsLocationsOperationsResource] |
| 27 | /// - [ProjectsLocationsRegistrationsResource] |
| 28 | library domains.v1beta1; |
| 29 | |
| 30 | import 'dart:async' as async; |
| 31 | import 'dart:convert' as convert; |
| 32 | import 'dart:core' as core; |
| 33 | |
| 34 | import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 35 | import 'package:http/http.dart' as http; |
| 36 | |
| 37 | import '../src/user_agent.dart'; |
| 38 | |
| 39 | export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 40 | show ApiRequestError, DetailedApiRequestError; |
| 41 | |
| 42 | /// Enables management and configuration of domain names. |
| 43 | class CloudDomainsApi { |
| 44 | /// View and manage your data across Google Cloud Platform services |
| 45 | static const cloudPlatformScope = |
| 46 | 'https://www.googleapis.com/auth/cloud-platform'; |
| 47 | |
| 48 | final commons.ApiRequester _requester; |
| 49 | |
| 50 | ProjectsResource get projects => ProjectsResource(_requester); |
| 51 | |
| 52 | CloudDomainsApi(http.Client client, |
| 53 | {core.String rootUrl = 'https://domains.googleapis.com/', |
| 54 | core.String servicePath = ''}) |
| 55 | : _requester = |
| 56 | commons.ApiRequester(client, rootUrl, servicePath, userAgent); |
| 57 | } |
| 58 | |
| 59 | class ProjectsResource { |
| 60 | final commons.ApiRequester _requester; |
| 61 | |
| 62 | ProjectsLocationsResource get locations => |
| 63 | ProjectsLocationsResource(_requester); |
| 64 | |
| 65 | ProjectsResource(commons.ApiRequester client) : _requester = client; |
| 66 | } |
| 67 | |
| 68 | class ProjectsLocationsResource { |
| 69 | final commons.ApiRequester _requester; |
| 70 | |
| 71 | ProjectsLocationsOperationsResource get operations => |
| 72 | ProjectsLocationsOperationsResource(_requester); |
| 73 | ProjectsLocationsRegistrationsResource get registrations => |
| 74 | ProjectsLocationsRegistrationsResource(_requester); |
| 75 | |
| 76 | ProjectsLocationsResource(commons.ApiRequester client) : _requester = client; |
| 77 | |
| 78 | /// Gets information about a location. |
| 79 | /// |
| 80 | /// Request parameters: |
| 81 | /// |
| 82 | /// [name] - Resource name for the location. |
| 83 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 84 | /// |
| 85 | /// [$fields] - Selector specifying which fields to include in a partial |
| 86 | /// response. |
| 87 | /// |
| 88 | /// Completes with a [Location]. |
| 89 | /// |
| 90 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 91 | /// error. |
| 92 | /// |
| 93 | /// If the used [http.Client] completes with an error when making a REST call, |
| 94 | /// this method will complete with the same error. |
| 95 | async.Future<Location> get( |
| 96 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 97 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 98 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 99 | final _queryParams = <core.String, core.List<core.String>>{ |
| 100 | if ($fields != null) 'fields': [$fields], |
| 101 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 102 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 103 | final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 104 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 105 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 106 | _url, |
| 107 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 108 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 109 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 110 | return Location.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | /// Lists information about the supported locations for this service. |
| 114 | /// |
| 115 | /// Request parameters: |
| 116 | /// |
| 117 | /// [name] - The resource that owns the locations collection, if applicable. |
| 118 | /// Value must have pattern `^projects/\[^/\]+$`. |
| 119 | /// |
| 120 | /// [filter] - The standard list filter. |
| 121 | /// |
| 122 | /// [pageSize] - The standard list page size. |
| 123 | /// |
| 124 | /// [pageToken] - The standard list page token. |
| 125 | /// |
| 126 | /// [$fields] - Selector specifying which fields to include in a partial |
| 127 | /// response. |
| 128 | /// |
| 129 | /// Completes with a [ListLocationsResponse]. |
| 130 | /// |
| 131 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 132 | /// error. |
| 133 | /// |
| 134 | /// If the used [http.Client] completes with an error when making a REST call, |
| 135 | /// this method will complete with the same error. |
| 136 | async.Future<ListLocationsResponse> list( |
| 137 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 138 | core.String? filter, |
| 139 | core.int? pageSize, |
| 140 | core.String? pageToken, |
| 141 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 142 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 143 | final _queryParams = <core.String, core.List<core.String>>{ |
| 144 | if (filter != null) 'filter': [filter], |
| 145 | if (pageSize != null) 'pageSize': ['${pageSize}'], |
| 146 | if (pageToken != null) 'pageToken': [pageToken], |
| 147 | if ($fields != null) 'fields': [$fields], |
| 148 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 149 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 150 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 151 | commons.Escaper.ecapeVariableReserved('$name') + |
| 152 | '/locations'; |
| 153 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 154 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 155 | _url, |
| 156 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 157 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 158 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 159 | return ListLocationsResponse.fromJson( |
| 160 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 161 | } |
| 162 | } |
| 163 | |
| 164 | class ProjectsLocationsOperationsResource { |
| 165 | final commons.ApiRequester _requester; |
| 166 | |
| 167 | ProjectsLocationsOperationsResource(commons.ApiRequester client) |
| 168 | : _requester = client; |
| 169 | |
| 170 | /// Gets the latest state of a long-running operation. |
| 171 | /// |
| 172 | /// Clients can use this method to poll the operation result at intervals as |
| 173 | /// recommended by the API service. |
| 174 | /// |
| 175 | /// Request parameters: |
| 176 | /// |
| 177 | /// [name] - The name of the operation resource. |
| 178 | /// Value must have pattern |
| 179 | /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| 180 | /// |
| 181 | /// [$fields] - Selector specifying which fields to include in a partial |
| 182 | /// response. |
| 183 | /// |
| 184 | /// Completes with a [Operation]. |
| 185 | /// |
| 186 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 187 | /// error. |
| 188 | /// |
| 189 | /// If the used [http.Client] completes with an error when making a REST call, |
| 190 | /// this method will complete with the same error. |
| 191 | async.Future<Operation> get( |
| 192 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 193 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 194 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 195 | final _queryParams = <core.String, core.List<core.String>>{ |
| 196 | if ($fields != null) 'fields': [$fields], |
| 197 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 198 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 199 | final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 200 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 201 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 202 | _url, |
| 203 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 204 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 205 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 206 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | /// Lists operations that match the specified filter in the request. |
| 210 | /// |
| 211 | /// If the server doesn't support this method, it returns `UNIMPLEMENTED`. |
| 212 | /// NOTE: the `name` binding allows API services to override the binding to |
| 213 | /// use different resource name schemes, such as `users / * /operations`. To |
| 214 | /// override the binding, API services can add a binding such as |
| 215 | /// `"/v1/{name=users / * }/operations"` to their service configuration. For |
| 216 | /// backwards compatibility, the default name includes the operations |
| 217 | /// collection id, however overriding users must ensure the name binding is |
| 218 | /// the parent resource, without the operations collection id. |
| 219 | /// |
| 220 | /// Request parameters: |
| 221 | /// |
| 222 | /// [name] - The name of the operation's parent resource. |
| 223 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 224 | /// |
| 225 | /// [filter] - The standard list filter. |
| 226 | /// |
| 227 | /// [pageSize] - The standard list page size. |
| 228 | /// |
| 229 | /// [pageToken] - The standard list page token. |
| 230 | /// |
| 231 | /// [$fields] - Selector specifying which fields to include in a partial |
| 232 | /// response. |
| 233 | /// |
| 234 | /// Completes with a [ListOperationsResponse]. |
| 235 | /// |
| 236 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 237 | /// error. |
| 238 | /// |
| 239 | /// If the used [http.Client] completes with an error when making a REST call, |
| 240 | /// this method will complete with the same error. |
| 241 | async.Future<ListOperationsResponse> list( |
| 242 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 243 | core.String? filter, |
| 244 | core.int? pageSize, |
| 245 | core.String? pageToken, |
| 246 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 247 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 248 | final _queryParams = <core.String, core.List<core.String>>{ |
| 249 | if (filter != null) 'filter': [filter], |
| 250 | if (pageSize != null) 'pageSize': ['${pageSize}'], |
| 251 | if (pageToken != null) 'pageToken': [pageToken], |
| 252 | if ($fields != null) 'fields': [$fields], |
| 253 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 254 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 255 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 256 | commons.Escaper.ecapeVariableReserved('$name') + |
| 257 | '/operations'; |
| 258 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 259 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 260 | _url, |
| 261 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 262 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 263 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 264 | return ListOperationsResponse.fromJson( |
| 265 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 266 | } |
| 267 | } |
| 268 | |
| 269 | class ProjectsLocationsRegistrationsResource { |
| 270 | final commons.ApiRequester _requester; |
| 271 | |
| 272 | ProjectsLocationsRegistrationsResource(commons.ApiRequester client) |
| 273 | : _requester = client; |
| 274 | |
| 275 | /// Updates a `Registration`'s contact settings. |
| 276 | /// |
| 277 | /// Some changes require confirmation by the domain's registrant contact . |
| 278 | /// |
| 279 | /// [request] - The metadata request object. |
| 280 | /// |
| 281 | /// Request parameters: |
| 282 | /// |
| 283 | /// [registration] - Required. The name of the `Registration` whose contact |
| 284 | /// settings are being updated, in the format `projects / * /locations / * |
| 285 | /// /registrations / * `. |
| 286 | /// Value must have pattern |
| 287 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 288 | /// |
| 289 | /// [$fields] - Selector specifying which fields to include in a partial |
| 290 | /// response. |
| 291 | /// |
| 292 | /// Completes with a [Operation]. |
| 293 | /// |
| 294 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 295 | /// error. |
| 296 | /// |
| 297 | /// If the used [http.Client] completes with an error when making a REST call, |
| 298 | /// this method will complete with the same error. |
| 299 | async.Future<Operation> configureContactSettings( |
| 300 | ConfigureContactSettingsRequest request, |
| 301 | core.String registration, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 302 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 303 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 304 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 305 | final _queryParams = <core.String, core.List<core.String>>{ |
| 306 | if ($fields != null) 'fields': [$fields], |
| 307 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 308 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 309 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 310 | commons.Escaper.ecapeVariableReserved('$registration') + |
| 311 | ':configureContactSettings'; |
| 312 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 313 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 314 | _url, |
| 315 | 'POST', |
| 316 | body: _body, |
| 317 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 318 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 319 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 320 | } |
| 321 | |
| 322 | /// Updates a `Registration`'s DNS settings. |
| 323 | /// |
| 324 | /// [request] - The metadata request object. |
| 325 | /// |
| 326 | /// Request parameters: |
| 327 | /// |
| 328 | /// [registration] - Required. The name of the `Registration` whose DNS |
| 329 | /// settings are being updated, in the format `projects / * /locations / * |
| 330 | /// /registrations / * `. |
| 331 | /// Value must have pattern |
| 332 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 333 | /// |
| 334 | /// [$fields] - Selector specifying which fields to include in a partial |
| 335 | /// response. |
| 336 | /// |
| 337 | /// Completes with a [Operation]. |
| 338 | /// |
| 339 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 340 | /// error. |
| 341 | /// |
| 342 | /// If the used [http.Client] completes with an error when making a REST call, |
| 343 | /// this method will complete with the same error. |
| 344 | async.Future<Operation> configureDnsSettings( |
| 345 | ConfigureDnsSettingsRequest request, |
| 346 | core.String registration, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 347 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 348 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 349 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 350 | final _queryParams = <core.String, core.List<core.String>>{ |
| 351 | if ($fields != null) 'fields': [$fields], |
| 352 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 353 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 354 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 355 | commons.Escaper.ecapeVariableReserved('$registration') + |
| 356 | ':configureDnsSettings'; |
| 357 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 358 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 359 | _url, |
| 360 | 'POST', |
| 361 | body: _body, |
| 362 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 363 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 364 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 365 | } |
| 366 | |
| 367 | /// Updates a `Registration`'s management settings. |
| 368 | /// |
| 369 | /// [request] - The metadata request object. |
| 370 | /// |
| 371 | /// Request parameters: |
| 372 | /// |
| 373 | /// [registration] - Required. The name of the `Registration` whose management |
| 374 | /// settings are being updated, in the format `projects / * /locations / * |
| 375 | /// /registrations / * `. |
| 376 | /// Value must have pattern |
| 377 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 378 | /// |
| 379 | /// [$fields] - Selector specifying which fields to include in a partial |
| 380 | /// response. |
| 381 | /// |
| 382 | /// Completes with a [Operation]. |
| 383 | /// |
| 384 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 385 | /// error. |
| 386 | /// |
| 387 | /// If the used [http.Client] completes with an error when making a REST call, |
| 388 | /// this method will complete with the same error. |
| 389 | async.Future<Operation> configureManagementSettings( |
| 390 | ConfigureManagementSettingsRequest request, |
| 391 | core.String registration, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 392 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 393 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 394 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 395 | final _queryParams = <core.String, core.List<core.String>>{ |
| 396 | if ($fields != null) 'fields': [$fields], |
| 397 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 398 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 399 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 400 | commons.Escaper.ecapeVariableReserved('$registration') + |
| 401 | ':configureManagementSettings'; |
| 402 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 403 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 404 | _url, |
| 405 | 'POST', |
| 406 | body: _body, |
| 407 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 408 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 409 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 410 | } |
| 411 | |
| 412 | /// Deletes a `Registration` resource. |
| 413 | /// |
| 414 | /// This method only works on resources in one of the following states: * |
| 415 | /// `state` is `EXPORTED` with `expire_time` in the past * `state` is |
| 416 | /// `REGISTRATION_FAILED` |
| 417 | /// |
| 418 | /// Request parameters: |
| 419 | /// |
| 420 | /// [name] - Required. The name of the `Registration` to delete, in the format |
| 421 | /// `projects / * /locations / * /registrations / * `. |
| 422 | /// Value must have pattern |
| 423 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 424 | /// |
| 425 | /// [$fields] - Selector specifying which fields to include in a partial |
| 426 | /// response. |
| 427 | /// |
| 428 | /// Completes with a [Operation]. |
| 429 | /// |
| 430 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 431 | /// error. |
| 432 | /// |
| 433 | /// If the used [http.Client] completes with an error when making a REST call, |
| 434 | /// this method will complete with the same error. |
| 435 | async.Future<Operation> delete( |
| 436 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 437 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 438 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 439 | final _queryParams = <core.String, core.List<core.String>>{ |
| 440 | if ($fields != null) 'fields': [$fields], |
| 441 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 442 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 443 | final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 444 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 445 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 446 | _url, |
| 447 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 448 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 449 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 450 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 451 | } |
| 452 | |
| 453 | /// Exports a `Registration` that you no longer want to use with Cloud |
| 454 | /// Domains. |
| 455 | /// |
| 456 | /// You can continue to use the domain in |
| 457 | /// [Google Domains](https://domains.google/) until it expires. If the export |
| 458 | /// is successful: * The resource's `state` becomes `EXPORTED`, meaning that |
| 459 | /// it is no longer managed by Cloud Domains * Because individual users can |
| 460 | /// own domains in Google Domains, the calling user becomes the domain's sole |
| 461 | /// owner. Permissions for the domain are subsequently managed in Google |
| 462 | /// Domains. * Without further action, the domain does not renew |
| 463 | /// automatically. The new owner can set up billing in Google Domains to renew |
| 464 | /// the domain if needed. |
| 465 | /// |
| 466 | /// [request] - The metadata request object. |
| 467 | /// |
| 468 | /// Request parameters: |
| 469 | /// |
| 470 | /// [name] - Required. The name of the `Registration` to export, in the format |
| 471 | /// `projects / * /locations / * /registrations / * `. |
| 472 | /// Value must have pattern |
| 473 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 474 | /// |
| 475 | /// [$fields] - Selector specifying which fields to include in a partial |
| 476 | /// response. |
| 477 | /// |
| 478 | /// Completes with a [Operation]. |
| 479 | /// |
| 480 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 481 | /// error. |
| 482 | /// |
| 483 | /// If the used [http.Client] completes with an error when making a REST call, |
| 484 | /// this method will complete with the same error. |
| 485 | async.Future<Operation> export( |
| 486 | ExportRegistrationRequest request, |
| 487 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 488 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 489 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 490 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 491 | final _queryParams = <core.String, core.List<core.String>>{ |
| 492 | if ($fields != null) 'fields': [$fields], |
| 493 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 494 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 495 | final _url = |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 496 | 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':export'; |
| 497 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 498 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 499 | _url, |
| 500 | 'POST', |
| 501 | body: _body, |
| 502 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 503 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 504 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 505 | } |
| 506 | |
| 507 | /// Gets the details of a `Registration` resource. |
| 508 | /// |
| 509 | /// Request parameters: |
| 510 | /// |
| 511 | /// [name] - Required. The name of the `Registration` to get, in the format |
| 512 | /// `projects / * /locations / * /registrations / * `. |
| 513 | /// Value must have pattern |
| 514 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 515 | /// |
| 516 | /// [$fields] - Selector specifying which fields to include in a partial |
| 517 | /// response. |
| 518 | /// |
| 519 | /// Completes with a [Registration]. |
| 520 | /// |
| 521 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 522 | /// error. |
| 523 | /// |
| 524 | /// If the used [http.Client] completes with an error when making a REST call, |
| 525 | /// this method will complete with the same error. |
| 526 | async.Future<Registration> get( |
| 527 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 528 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 529 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 530 | final _queryParams = <core.String, core.List<core.String>>{ |
| 531 | if ($fields != null) 'fields': [$fields], |
| 532 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 533 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 534 | final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 535 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 536 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 537 | _url, |
| 538 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 539 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 540 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 541 | return Registration.fromJson( |
| 542 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 543 | } |
| 544 | |
| 545 | /// Gets the access control policy for a resource. |
| 546 | /// |
| 547 | /// Returns an empty policy if the resource exists and does not have a policy |
| 548 | /// set. |
| 549 | /// |
| 550 | /// Request parameters: |
| 551 | /// |
| 552 | /// [resource] - REQUIRED: The resource for which the policy is being |
| 553 | /// requested. See the operation documentation for the appropriate value for |
| 554 | /// this field. |
| 555 | /// Value must have pattern |
| 556 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 557 | /// |
| 558 | /// [options_requestedPolicyVersion] - Optional. The policy format version to |
| 559 | /// be returned. Valid values are 0, 1, and 3. Requests specifying an invalid |
| 560 | /// value will be rejected. Requests for policies with any conditional |
| 561 | /// bindings must specify version 3. Policies without any conditional bindings |
| 562 | /// may specify any valid value or leave the field unset. To learn which |
| 563 | /// resources support conditions in their IAM policies, see the |
| 564 | /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 565 | /// |
| 566 | /// [$fields] - Selector specifying which fields to include in a partial |
| 567 | /// response. |
| 568 | /// |
| 569 | /// Completes with a [Policy]. |
| 570 | /// |
| 571 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 572 | /// error. |
| 573 | /// |
| 574 | /// If the used [http.Client] completes with an error when making a REST call, |
| 575 | /// this method will complete with the same error. |
| 576 | async.Future<Policy> getIamPolicy( |
| 577 | core.String resource, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 578 | core.int? options_requestedPolicyVersion, |
| 579 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 580 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 581 | final _queryParams = <core.String, core.List<core.String>>{ |
| 582 | if (options_requestedPolicyVersion != null) |
| 583 | 'options.requestedPolicyVersion': ['${options_requestedPolicyVersion}'], |
| 584 | if ($fields != null) 'fields': [$fields], |
| 585 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 586 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 587 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 588 | commons.Escaper.ecapeVariableReserved('$resource') + |
| 589 | ':getIamPolicy'; |
| 590 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 591 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 592 | _url, |
| 593 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 594 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 595 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 596 | return Policy.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 597 | } |
| 598 | |
| 599 | /// Lists the `Registration` resources in a project. |
| 600 | /// |
| 601 | /// Request parameters: |
| 602 | /// |
| 603 | /// [parent] - Required. The project and location from which to list |
| 604 | /// `Registration`s, specified in the format `projects / * /locations / * `. |
| 605 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 606 | /// |
| 607 | /// [filter] - Filter expression to restrict the `Registration`s returned. The |
| 608 | /// expression must specify the field name, a comparison operator, and the |
| 609 | /// value that you want to use for filtering. The value must be a string, a |
| 610 | /// number, a boolean, or an enum value. The comparison operator should be one |
| 611 | /// of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. For example, |
| 612 | /// to filter to a specific domain name, use an expression like |
| 613 | /// `domainName="example.com"`. You can also check for the existence of a |
| 614 | /// field; for example, to find domains using custom DNS settings, use an |
| 615 | /// expression like `dnsSettings.customDns:*`. You can also create compound |
| 616 | /// filters by combining expressions with the `AND` and `OR` operators. For |
| 617 | /// example, to find domains that are suspended or have specific issues |
| 618 | /// flagged, use an expression like `(state=SUSPENDED) OR (issue:*)`. |
| 619 | /// |
| 620 | /// [pageSize] - Maximum number of results to return. |
| 621 | /// |
| 622 | /// [pageToken] - When set to the `next_page_token` from a prior response, |
| 623 | /// provides the next page of results. |
| 624 | /// |
| 625 | /// [$fields] - Selector specifying which fields to include in a partial |
| 626 | /// response. |
| 627 | /// |
| 628 | /// Completes with a [ListRegistrationsResponse]. |
| 629 | /// |
| 630 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 631 | /// error. |
| 632 | /// |
| 633 | /// If the used [http.Client] completes with an error when making a REST call, |
| 634 | /// this method will complete with the same error. |
| 635 | async.Future<ListRegistrationsResponse> list( |
| 636 | core.String parent, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 637 | core.String? filter, |
| 638 | core.int? pageSize, |
| 639 | core.String? pageToken, |
| 640 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 641 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 642 | final _queryParams = <core.String, core.List<core.String>>{ |
| 643 | if (filter != null) 'filter': [filter], |
| 644 | if (pageSize != null) 'pageSize': ['${pageSize}'], |
| 645 | if (pageToken != null) 'pageToken': [pageToken], |
| 646 | if ($fields != null) 'fields': [$fields], |
| 647 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 648 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 649 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 650 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 651 | '/registrations'; |
| 652 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 653 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 654 | _url, |
| 655 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 656 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 657 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 658 | return ListRegistrationsResponse.fromJson( |
| 659 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 660 | } |
| 661 | |
| 662 | /// Updates select fields of a `Registration` resource, notably `labels`. |
| 663 | /// |
| 664 | /// To update other fields, use the appropriate custom update method: * To |
| 665 | /// update management settings, see `ConfigureManagementSettings` * To update |
| 666 | /// DNS configuration, see `ConfigureDnsSettings` * To update contact |
| 667 | /// information, see `ConfigureContactSettings` |
| 668 | /// |
| 669 | /// [request] - The metadata request object. |
| 670 | /// |
| 671 | /// Request parameters: |
| 672 | /// |
| 673 | /// [name] - Output only. Name of the `Registration` resource, in the format |
| 674 | /// `projects / * /locations / * /registrations/`. |
| 675 | /// Value must have pattern |
| 676 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 677 | /// |
| 678 | /// [updateMask] - Required. The field mask describing which fields to update |
| 679 | /// as a comma-separated list. For example, if only the labels are being |
| 680 | /// updated, the `update_mask` would be `"labels"`. |
| 681 | /// |
| 682 | /// [$fields] - Selector specifying which fields to include in a partial |
| 683 | /// response. |
| 684 | /// |
| 685 | /// Completes with a [Operation]. |
| 686 | /// |
| 687 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 688 | /// error. |
| 689 | /// |
| 690 | /// If the used [http.Client] completes with an error when making a REST call, |
| 691 | /// this method will complete with the same error. |
| 692 | async.Future<Operation> patch( |
| 693 | Registration request, |
| 694 | core.String name, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 695 | core.String? updateMask, |
| 696 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 697 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 698 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 699 | final _queryParams = <core.String, core.List<core.String>>{ |
| 700 | if (updateMask != null) 'updateMask': [updateMask], |
| 701 | if ($fields != null) 'fields': [$fields], |
| 702 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 703 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 704 | final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 705 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 706 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 707 | _url, |
| 708 | 'PATCH', |
| 709 | body: _body, |
| 710 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 711 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 712 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 713 | } |
| 714 | |
| 715 | /// Registers a new domain name and creates a corresponding `Registration` |
| 716 | /// resource. |
| 717 | /// |
| 718 | /// Call `RetrieveRegisterParameters` first to check availability of the |
| 719 | /// domain name and determine parameters like price that are needed to build a |
| 720 | /// call to this method. A successful call creates a `Registration` resource |
| 721 | /// in state `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 |
| 722 | /// minutes, indicating that the domain was successfully registered. If the |
| 723 | /// resource ends up in state `REGISTRATION_FAILED`, it indicates that the |
| 724 | /// domain was not registered successfully, and you can safely delete the |
| 725 | /// resource and retry registration. |
| 726 | /// |
| 727 | /// [request] - The metadata request object. |
| 728 | /// |
| 729 | /// Request parameters: |
| 730 | /// |
| 731 | /// [parent] - Required. The parent resource of the `Registration`. Must be in |
| 732 | /// the format `projects / * /locations / * `. |
| 733 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 734 | /// |
| 735 | /// [$fields] - Selector specifying which fields to include in a partial |
| 736 | /// response. |
| 737 | /// |
| 738 | /// Completes with a [Operation]. |
| 739 | /// |
| 740 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 741 | /// error. |
| 742 | /// |
| 743 | /// If the used [http.Client] completes with an error when making a REST call, |
| 744 | /// this method will complete with the same error. |
| 745 | async.Future<Operation> register( |
| 746 | RegisterDomainRequest request, |
| 747 | core.String parent, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 748 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 749 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 750 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 751 | final _queryParams = <core.String, core.List<core.String>>{ |
| 752 | if ($fields != null) 'fields': [$fields], |
| 753 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 754 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 755 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 756 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 757 | '/registrations:register'; |
| 758 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 759 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 760 | _url, |
| 761 | 'POST', |
| 762 | body: _body, |
| 763 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 764 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 765 | return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 766 | } |
| 767 | |
| 768 | /// Resets the authorization code of the `Registration` to a new random |
| 769 | /// string. |
| 770 | /// |
| 771 | /// You can call this method only after 60 days have elapsed since the initial |
| 772 | /// domain registration. |
| 773 | /// |
| 774 | /// [request] - The metadata request object. |
| 775 | /// |
| 776 | /// Request parameters: |
| 777 | /// |
| 778 | /// [registration] - Required. The name of the `Registration` whose |
| 779 | /// authorization code is being reset, in the format `projects / * /locations |
| 780 | /// / * /registrations / * `. |
| 781 | /// Value must have pattern |
| 782 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 783 | /// |
| 784 | /// [$fields] - Selector specifying which fields to include in a partial |
| 785 | /// response. |
| 786 | /// |
| 787 | /// Completes with a [AuthorizationCode]. |
| 788 | /// |
| 789 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 790 | /// error. |
| 791 | /// |
| 792 | /// If the used [http.Client] completes with an error when making a REST call, |
| 793 | /// this method will complete with the same error. |
| 794 | async.Future<AuthorizationCode> resetAuthorizationCode( |
| 795 | ResetAuthorizationCodeRequest request, |
| 796 | core.String registration, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 797 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 798 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 799 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 800 | final _queryParams = <core.String, core.List<core.String>>{ |
| 801 | if ($fields != null) 'fields': [$fields], |
| 802 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 803 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 804 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 805 | commons.Escaper.ecapeVariableReserved('$registration') + |
| 806 | ':resetAuthorizationCode'; |
| 807 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 808 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 809 | _url, |
| 810 | 'POST', |
| 811 | body: _body, |
| 812 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 813 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 814 | return AuthorizationCode.fromJson( |
| 815 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 816 | } |
| 817 | |
| 818 | /// Gets the authorization code of the `Registration` for the purpose of |
| 819 | /// transferring the domain to another registrar. |
| 820 | /// |
| 821 | /// You can call this method only after 60 days have elapsed since the initial |
| 822 | /// domain registration. |
| 823 | /// |
| 824 | /// Request parameters: |
| 825 | /// |
| 826 | /// [registration] - Required. The name of the `Registration` whose |
| 827 | /// authorization code is being retrieved, in the format `projects / * |
| 828 | /// /locations / * /registrations / * `. |
| 829 | /// Value must have pattern |
| 830 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 831 | /// |
| 832 | /// [$fields] - Selector specifying which fields to include in a partial |
| 833 | /// response. |
| 834 | /// |
| 835 | /// Completes with a [AuthorizationCode]. |
| 836 | /// |
| 837 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 838 | /// error. |
| 839 | /// |
| 840 | /// If the used [http.Client] completes with an error when making a REST call, |
| 841 | /// this method will complete with the same error. |
| 842 | async.Future<AuthorizationCode> retrieveAuthorizationCode( |
| 843 | core.String registration, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 844 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 845 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 846 | final _queryParams = <core.String, core.List<core.String>>{ |
| 847 | if ($fields != null) 'fields': [$fields], |
| 848 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 849 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 850 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 851 | commons.Escaper.ecapeVariableReserved('$registration') + |
| 852 | ':retrieveAuthorizationCode'; |
| 853 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 854 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 855 | _url, |
| 856 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 857 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 858 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 859 | return AuthorizationCode.fromJson( |
| 860 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 861 | } |
| 862 | |
| 863 | /// Gets parameters needed to register a new domain name, including price and |
| 864 | /// up-to-date availability. |
| 865 | /// |
| 866 | /// Use the returned values to call `RegisterDomain`. |
| 867 | /// |
| 868 | /// Request parameters: |
| 869 | /// |
| 870 | /// [location] - Required. The location. Must be in the format `projects / * |
| 871 | /// /locations / * `. |
| 872 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 873 | /// |
| 874 | /// [domainName] - Required. The domain name. Unicode domain names must be |
| 875 | /// expressed in Punycode format. |
| 876 | /// |
| 877 | /// [$fields] - Selector specifying which fields to include in a partial |
| 878 | /// response. |
| 879 | /// |
| 880 | /// Completes with a [RetrieveRegisterParametersResponse]. |
| 881 | /// |
| 882 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 883 | /// error. |
| 884 | /// |
| 885 | /// If the used [http.Client] completes with an error when making a REST call, |
| 886 | /// this method will complete with the same error. |
| 887 | async.Future<RetrieveRegisterParametersResponse> retrieveRegisterParameters( |
| 888 | core.String location, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 889 | core.String? domainName, |
| 890 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 891 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 892 | final _queryParams = <core.String, core.List<core.String>>{ |
| 893 | if (domainName != null) 'domainName': [domainName], |
| 894 | if ($fields != null) 'fields': [$fields], |
| 895 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 896 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 897 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 898 | commons.Escaper.ecapeVariableReserved('$location') + |
| 899 | '/registrations:retrieveRegisterParameters'; |
| 900 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 901 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 902 | _url, |
| 903 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 904 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 905 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 906 | return RetrieveRegisterParametersResponse.fromJson( |
| 907 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 908 | } |
| 909 | |
| 910 | /// Searches for available domain names similar to the provided query. |
| 911 | /// |
| 912 | /// Availability results from this method are approximate; call |
| 913 | /// `RetrieveRegisterParameters` on a domain before registering to confirm |
| 914 | /// availability. |
| 915 | /// |
| 916 | /// Request parameters: |
| 917 | /// |
| 918 | /// [location] - Required. The location. Must be in the format `projects / * |
| 919 | /// /locations / * `. |
| 920 | /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| 921 | /// |
| 922 | /// [query] - Required. String used to search for available domain names. |
| 923 | /// |
| 924 | /// [$fields] - Selector specifying which fields to include in a partial |
| 925 | /// response. |
| 926 | /// |
| 927 | /// Completes with a [SearchDomainsResponse]. |
| 928 | /// |
| 929 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 930 | /// error. |
| 931 | /// |
| 932 | /// If the used [http.Client] completes with an error when making a REST call, |
| 933 | /// this method will complete with the same error. |
| 934 | async.Future<SearchDomainsResponse> searchDomains( |
| 935 | core.String location, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 936 | core.String? query, |
| 937 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 938 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 939 | final _queryParams = <core.String, core.List<core.String>>{ |
| 940 | if (query != null) 'query': [query], |
| 941 | if ($fields != null) 'fields': [$fields], |
| 942 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 943 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 944 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 945 | commons.Escaper.ecapeVariableReserved('$location') + |
| 946 | '/registrations:searchDomains'; |
| 947 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 948 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 949 | _url, |
| 950 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 951 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 952 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 953 | return SearchDomainsResponse.fromJson( |
| 954 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 955 | } |
| 956 | |
| 957 | /// Sets the access control policy on the specified resource. |
| 958 | /// |
| 959 | /// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, |
| 960 | /// and `PERMISSION_DENIED` errors. |
| 961 | /// |
| 962 | /// [request] - The metadata request object. |
| 963 | /// |
| 964 | /// Request parameters: |
| 965 | /// |
| 966 | /// [resource] - REQUIRED: The resource for which the policy is being |
| 967 | /// specified. See the operation documentation for the appropriate value for |
| 968 | /// this field. |
| 969 | /// Value must have pattern |
| 970 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 971 | /// |
| 972 | /// [$fields] - Selector specifying which fields to include in a partial |
| 973 | /// response. |
| 974 | /// |
| 975 | /// Completes with a [Policy]. |
| 976 | /// |
| 977 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 978 | /// error. |
| 979 | /// |
| 980 | /// If the used [http.Client] completes with an error when making a REST call, |
| 981 | /// this method will complete with the same error. |
| 982 | async.Future<Policy> setIamPolicy( |
| 983 | SetIamPolicyRequest request, |
| 984 | core.String resource, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 985 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 986 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 987 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 988 | final _queryParams = <core.String, core.List<core.String>>{ |
| 989 | if ($fields != null) 'fields': [$fields], |
| 990 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 991 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 992 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 993 | commons.Escaper.ecapeVariableReserved('$resource') + |
| 994 | ':setIamPolicy'; |
| 995 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 996 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 997 | _url, |
| 998 | 'POST', |
| 999 | body: _body, |
| 1000 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1001 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1002 | return Policy.fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1003 | } |
| 1004 | |
| 1005 | /// Returns permissions that a caller has on the specified resource. |
| 1006 | /// |
| 1007 | /// If the resource does not exist, this will return an empty set of |
| 1008 | /// permissions, not a `NOT_FOUND` error. Note: This operation is designed to |
| 1009 | /// be used for building permission-aware UIs and command-line tools, not for |
| 1010 | /// authorization checking. This operation may "fail open" without warning. |
| 1011 | /// |
| 1012 | /// [request] - The metadata request object. |
| 1013 | /// |
| 1014 | /// Request parameters: |
| 1015 | /// |
| 1016 | /// [resource] - REQUIRED: The resource for which the policy detail is being |
| 1017 | /// requested. See the operation documentation for the appropriate value for |
| 1018 | /// this field. |
| 1019 | /// Value must have pattern |
| 1020 | /// `^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$`. |
| 1021 | /// |
| 1022 | /// [$fields] - Selector specifying which fields to include in a partial |
| 1023 | /// response. |
| 1024 | /// |
| 1025 | /// Completes with a [TestIamPermissionsResponse]. |
| 1026 | /// |
| 1027 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1028 | /// error. |
| 1029 | /// |
| 1030 | /// If the used [http.Client] completes with an error when making a REST call, |
| 1031 | /// this method will complete with the same error. |
| 1032 | async.Future<TestIamPermissionsResponse> testIamPermissions( |
| 1033 | TestIamPermissionsRequest request, |
| 1034 | core.String resource, { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1035 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1036 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1037 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1038 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1039 | if ($fields != null) 'fields': [$fields], |
| 1040 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1041 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1042 | final _url = 'v1beta1/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1043 | commons.Escaper.ecapeVariableReserved('$resource') + |
| 1044 | ':testIamPermissions'; |
| 1045 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1046 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1047 | _url, |
| 1048 | 'POST', |
| 1049 | body: _body, |
| 1050 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1051 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1052 | return TestIamPermissionsResponse.fromJson( |
| 1053 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | /// Specifies the audit configuration for a service. |
| 1058 | /// |
| 1059 | /// The configuration determines which permission types are logged, and what |
| 1060 | /// identities, if any, are exempted from logging. An AuditConfig must have one |
| 1061 | /// or more AuditLogConfigs. If there are AuditConfigs for both `allServices` |
| 1062 | /// and a specific service, the union of the two AuditConfigs is used for that |
| 1063 | /// service: the log_types specified in each AuditConfig are enabled, and the |
| 1064 | /// exempted_members in each AuditLogConfig are exempted. Example Policy with |
| 1065 | /// multiple AuditConfigs: { "audit_configs": \[ { "service": "allServices", |
| 1066 | /// "audit_log_configs": \[ { "log_type": "DATA_READ", "exempted_members": \[ |
| 1067 | /// "user:jose@example.com" \] }, { "log_type": "DATA_WRITE" }, { "log_type": |
| 1068 | /// "ADMIN_READ" } \] }, { "service": "sampleservice.googleapis.com", |
| 1069 | /// "audit_log_configs": \[ { "log_type": "DATA_READ" }, { "log_type": |
| 1070 | /// "DATA_WRITE", "exempted_members": \[ "user:aliya@example.com" \] } \] } \] } |
| 1071 | /// For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1072 | /// logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1073 | /// aliya@example.com from DATA_WRITE logging. |
| 1074 | class AuditConfig { |
| 1075 | /// The configuration for logging of each type of permission. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1076 | core.List<AuditLogConfig>? auditLogConfigs; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1077 | |
| 1078 | /// Specifies a service that will be enabled for audit logging. |
| 1079 | /// |
| 1080 | /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1081 | /// `allServices` is a special value that covers all services. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1082 | core.String? service; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1083 | |
| 1084 | AuditConfig(); |
| 1085 | |
| 1086 | AuditConfig.fromJson(core.Map _json) { |
| 1087 | if (_json.containsKey('auditLogConfigs')) { |
| 1088 | auditLogConfigs = (_json['auditLogConfigs'] as core.List) |
| 1089 | .map<AuditLogConfig>((value) => AuditLogConfig.fromJson( |
| 1090 | value as core.Map<core.String, core.dynamic>)) |
| 1091 | .toList(); |
| 1092 | } |
| 1093 | if (_json.containsKey('service')) { |
| 1094 | service = _json['service'] as core.String; |
| 1095 | } |
| 1096 | } |
| 1097 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1098 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1099 | if (auditLogConfigs != null) |
| 1100 | 'auditLogConfigs': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1101 | auditLogConfigs!.map((value) => value.toJson()).toList(), |
| 1102 | if (service != null) 'service': service!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1103 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1104 | } |
| 1105 | |
| 1106 | /// Provides the configuration for logging a type of permissions. |
| 1107 | /// |
| 1108 | /// Example: { "audit_log_configs": \[ { "log_type": "DATA_READ", |
| 1109 | /// "exempted_members": \[ "user:jose@example.com" \] }, { "log_type": |
| 1110 | /// "DATA_WRITE" } \] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while |
| 1111 | /// exempting jose@example.com from DATA_READ logging. |
| 1112 | class AuditLogConfig { |
| 1113 | /// Specifies the identities that do not cause logging for this type of |
| 1114 | /// permission. |
| 1115 | /// |
| 1116 | /// Follows the same format of Binding.members. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1117 | core.List<core.String>? exemptedMembers; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1118 | |
| 1119 | /// The log type that this config enables. |
| 1120 | /// Possible string values are: |
| 1121 | /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. |
| 1122 | /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy |
| 1123 | /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create |
| 1124 | /// - "DATA_READ" : Data reads. Example: CloudSQL Users list |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1125 | core.String? logType; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1126 | |
| 1127 | AuditLogConfig(); |
| 1128 | |
| 1129 | AuditLogConfig.fromJson(core.Map _json) { |
| 1130 | if (_json.containsKey('exemptedMembers')) { |
| 1131 | exemptedMembers = (_json['exemptedMembers'] as core.List) |
| 1132 | .map<core.String>((value) => value as core.String) |
| 1133 | .toList(); |
| 1134 | } |
| 1135 | if (_json.containsKey('logType')) { |
| 1136 | logType = _json['logType'] as core.String; |
| 1137 | } |
| 1138 | } |
| 1139 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1140 | core.Map<core.String, core.Object?> toJson() => { |
| 1141 | if (exemptedMembers != null) 'exemptedMembers': exemptedMembers!, |
| 1142 | if (logType != null) 'logType': logType!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1143 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1144 | } |
| 1145 | |
| 1146 | /// Defines an authorization code. |
| 1147 | class AuthorizationCode { |
| 1148 | /// The Authorization Code in ASCII. |
| 1149 | /// |
| 1150 | /// It can be used to transfer the domain to or from another registrar. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1151 | core.String? code; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1152 | |
| 1153 | AuthorizationCode(); |
| 1154 | |
| 1155 | AuthorizationCode.fromJson(core.Map _json) { |
| 1156 | if (_json.containsKey('code')) { |
| 1157 | code = _json['code'] as core.String; |
| 1158 | } |
| 1159 | } |
| 1160 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1161 | core.Map<core.String, core.Object?> toJson() => { |
| 1162 | if (code != null) 'code': code!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1163 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1164 | } |
| 1165 | |
| 1166 | /// Associates `members` with a `role`. |
| 1167 | class Binding { |
| 1168 | /// The condition that is associated with this binding. |
| 1169 | /// |
| 1170 | /// If the condition evaluates to `true`, then this binding applies to the |
| 1171 | /// current request. If the condition evaluates to `false`, then this binding |
| 1172 | /// does not apply to the current request. However, a different role binding |
| 1173 | /// might grant the same role to one or more of the members in this binding. |
| 1174 | /// To learn which resources support conditions in their IAM policies, see the |
| 1175 | /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1176 | Expr? condition; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1177 | |
| 1178 | /// Specifies the identities requesting access for a Cloud Platform resource. |
| 1179 | /// |
| 1180 | /// `members` can have the following values: * `allUsers`: A special |
| 1181 | /// identifier that represents anyone who is on the internet; with or without |
| 1182 | /// a Google account. * `allAuthenticatedUsers`: A special identifier that |
| 1183 | /// represents anyone who is authenticated with a Google account or a service |
| 1184 | /// account. * `user:{emailid}`: An email address that represents a specific |
| 1185 | /// Google account. For example, `alice@example.com` . * |
| 1186 | /// `serviceAccount:{emailid}`: An email address that represents a service |
| 1187 | /// account. For example, `my-other-app@appspot.gserviceaccount.com`. * |
| 1188 | /// `group:{emailid}`: An email address that represents a Google group. For |
| 1189 | /// example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: |
| 1190 | /// An email address (plus unique identifier) representing a user that has |
| 1191 | /// been recently deleted. For example, |
| 1192 | /// `alice@example.com?uid=123456789012345678901`. If the user is recovered, |
| 1193 | /// this value reverts to `user:{emailid}` and the recovered user retains the |
| 1194 | /// role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: |
| 1195 | /// An email address (plus unique identifier) representing a service account |
| 1196 | /// that has been recently deleted. For example, |
| 1197 | /// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If |
| 1198 | /// the service account is undeleted, this value reverts to |
| 1199 | /// `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1200 | /// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email |
| 1201 | /// address (plus unique identifier) representing a Google group that has been |
| 1202 | /// recently deleted. For example, |
| 1203 | /// `admins@example.com?uid=123456789012345678901`. If the group is recovered, |
| 1204 | /// this value reverts to `group:{emailid}` and the recovered group retains |
| 1205 | /// the role in the binding. * `domain:{domain}`: The G Suite domain (primary) |
| 1206 | /// that represents all the users of that domain. For example, `google.com` or |
| 1207 | /// `example.com`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1208 | core.List<core.String>? members; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1209 | |
| 1210 | /// Role that is assigned to `members`. |
| 1211 | /// |
| 1212 | /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1213 | core.String? role; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1214 | |
| 1215 | Binding(); |
| 1216 | |
| 1217 | Binding.fromJson(core.Map _json) { |
| 1218 | if (_json.containsKey('condition')) { |
| 1219 | condition = Expr.fromJson( |
| 1220 | _json['condition'] as core.Map<core.String, core.dynamic>); |
| 1221 | } |
| 1222 | if (_json.containsKey('members')) { |
| 1223 | members = (_json['members'] as core.List) |
| 1224 | .map<core.String>((value) => value as core.String) |
| 1225 | .toList(); |
| 1226 | } |
| 1227 | if (_json.containsKey('role')) { |
| 1228 | role = _json['role'] as core.String; |
| 1229 | } |
| 1230 | } |
| 1231 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1232 | core.Map<core.String, core.Object?> toJson() => { |
| 1233 | if (condition != null) 'condition': condition!.toJson(), |
| 1234 | if (members != null) 'members': members!, |
| 1235 | if (role != null) 'role': role!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1236 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1237 | } |
| 1238 | |
| 1239 | /// Request for the `ConfigureContactSettings` method. |
| 1240 | class ConfigureContactSettingsRequest { |
| 1241 | /// The list of contact notices that the caller acknowledges. |
| 1242 | /// |
Kevin Moore | 0895533 | 2021-02-17 10:47:11 -0800 | [diff] [blame] | 1243 | /// The notices needed here depend on the values specified in |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1244 | /// `contact_settings`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1245 | core.List<core.String>? contactNotices; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1246 | |
| 1247 | /// Fields of the `ContactSettings` to update. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1248 | ContactSettings? contactSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1249 | |
| 1250 | /// The field mask describing which fields to update as a comma-separated |
| 1251 | /// list. |
| 1252 | /// |
| 1253 | /// For example, if only the registrant contact is being updated, the |
| 1254 | /// `update_mask` would be `"registrant_contact"`. |
| 1255 | /// |
| 1256 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1257 | core.String? updateMask; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1258 | |
| 1259 | /// Validate the request without actually updating the contact settings. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1260 | core.bool? validateOnly; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1261 | |
| 1262 | ConfigureContactSettingsRequest(); |
| 1263 | |
| 1264 | ConfigureContactSettingsRequest.fromJson(core.Map _json) { |
| 1265 | if (_json.containsKey('contactNotices')) { |
| 1266 | contactNotices = (_json['contactNotices'] as core.List) |
| 1267 | .map<core.String>((value) => value as core.String) |
| 1268 | .toList(); |
| 1269 | } |
| 1270 | if (_json.containsKey('contactSettings')) { |
| 1271 | contactSettings = ContactSettings.fromJson( |
| 1272 | _json['contactSettings'] as core.Map<core.String, core.dynamic>); |
| 1273 | } |
| 1274 | if (_json.containsKey('updateMask')) { |
| 1275 | updateMask = _json['updateMask'] as core.String; |
| 1276 | } |
| 1277 | if (_json.containsKey('validateOnly')) { |
| 1278 | validateOnly = _json['validateOnly'] as core.bool; |
| 1279 | } |
| 1280 | } |
| 1281 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1282 | core.Map<core.String, core.Object?> toJson() => { |
| 1283 | if (contactNotices != null) 'contactNotices': contactNotices!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1284 | if (contactSettings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1285 | 'contactSettings': contactSettings!.toJson(), |
| 1286 | if (updateMask != null) 'updateMask': updateMask!, |
| 1287 | if (validateOnly != null) 'validateOnly': validateOnly!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1288 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1289 | } |
| 1290 | |
| 1291 | /// Request for the `ConfigureDnsSettings` method. |
| 1292 | class ConfigureDnsSettingsRequest { |
| 1293 | /// Fields of the `DnsSettings` to update. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1294 | DnsSettings? dnsSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1295 | |
| 1296 | /// The field mask describing which fields to update as a comma-separated |
| 1297 | /// list. |
| 1298 | /// |
| 1299 | /// For example, if only the name servers are being updated for an existing |
| 1300 | /// Custom DNS configuration, the `update_mask` would be |
| 1301 | /// `"custom_dns.name_servers"`. When changing the DNS provider from one type |
| 1302 | /// to another, pass the new provider's field name as part of the field mask. |
| 1303 | /// For example, when changing from a Google Domains DNS configuration to a |
| 1304 | /// Custom DNS configuration, the `update_mask` would be `"custom_dns"`. // |
| 1305 | /// |
| 1306 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1307 | core.String? updateMask; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1308 | |
| 1309 | /// Validate the request without actually updating the DNS settings. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1310 | core.bool? validateOnly; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1311 | |
| 1312 | ConfigureDnsSettingsRequest(); |
| 1313 | |
| 1314 | ConfigureDnsSettingsRequest.fromJson(core.Map _json) { |
| 1315 | if (_json.containsKey('dnsSettings')) { |
| 1316 | dnsSettings = DnsSettings.fromJson( |
| 1317 | _json['dnsSettings'] as core.Map<core.String, core.dynamic>); |
| 1318 | } |
| 1319 | if (_json.containsKey('updateMask')) { |
| 1320 | updateMask = _json['updateMask'] as core.String; |
| 1321 | } |
| 1322 | if (_json.containsKey('validateOnly')) { |
| 1323 | validateOnly = _json['validateOnly'] as core.bool; |
| 1324 | } |
| 1325 | } |
| 1326 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1327 | core.Map<core.String, core.Object?> toJson() => { |
| 1328 | if (dnsSettings != null) 'dnsSettings': dnsSettings!.toJson(), |
| 1329 | if (updateMask != null) 'updateMask': updateMask!, |
| 1330 | if (validateOnly != null) 'validateOnly': validateOnly!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1331 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1332 | } |
| 1333 | |
| 1334 | /// Request for the `ConfigureManagementSettings` method. |
| 1335 | class ConfigureManagementSettingsRequest { |
| 1336 | /// Fields of the `ManagementSettings` to update. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1337 | ManagementSettings? managementSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1338 | |
| 1339 | /// The field mask describing which fields to update as a comma-separated |
| 1340 | /// list. |
| 1341 | /// |
| 1342 | /// For example, if only the transfer lock is being updated, the `update_mask` |
| 1343 | /// would be `"transfer_lock_state"`. |
| 1344 | /// |
| 1345 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1346 | core.String? updateMask; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1347 | |
| 1348 | ConfigureManagementSettingsRequest(); |
| 1349 | |
| 1350 | ConfigureManagementSettingsRequest.fromJson(core.Map _json) { |
| 1351 | if (_json.containsKey('managementSettings')) { |
| 1352 | managementSettings = ManagementSettings.fromJson( |
| 1353 | _json['managementSettings'] as core.Map<core.String, core.dynamic>); |
| 1354 | } |
| 1355 | if (_json.containsKey('updateMask')) { |
| 1356 | updateMask = _json['updateMask'] as core.String; |
| 1357 | } |
| 1358 | } |
| 1359 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1360 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1361 | if (managementSettings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1362 | 'managementSettings': managementSettings!.toJson(), |
| 1363 | if (updateMask != null) 'updateMask': updateMask!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1364 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1365 | } |
| 1366 | |
| 1367 | /// Details required for a contact associated with a `Registration`. |
| 1368 | class Contact { |
| 1369 | /// Email address of the contact. |
| 1370 | /// |
| 1371 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1372 | core.String? email; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1373 | |
| 1374 | /// Fax number of the contact in international format. |
| 1375 | /// |
| 1376 | /// For example, `"+1-800-555-0123"`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1377 | core.String? faxNumber; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1378 | |
| 1379 | /// Phone number of the contact in international format. |
| 1380 | /// |
| 1381 | /// For example, `"+1-800-555-0123"`. |
| 1382 | /// |
| 1383 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1384 | core.String? phoneNumber; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1385 | |
| 1386 | /// Postal address of the contact. |
| 1387 | /// |
| 1388 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1389 | PostalAddress? postalAddress; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1390 | |
| 1391 | Contact(); |
| 1392 | |
| 1393 | Contact.fromJson(core.Map _json) { |
| 1394 | if (_json.containsKey('email')) { |
| 1395 | email = _json['email'] as core.String; |
| 1396 | } |
| 1397 | if (_json.containsKey('faxNumber')) { |
| 1398 | faxNumber = _json['faxNumber'] as core.String; |
| 1399 | } |
| 1400 | if (_json.containsKey('phoneNumber')) { |
| 1401 | phoneNumber = _json['phoneNumber'] as core.String; |
| 1402 | } |
| 1403 | if (_json.containsKey('postalAddress')) { |
| 1404 | postalAddress = PostalAddress.fromJson( |
| 1405 | _json['postalAddress'] as core.Map<core.String, core.dynamic>); |
| 1406 | } |
| 1407 | } |
| 1408 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1409 | core.Map<core.String, core.Object?> toJson() => { |
| 1410 | if (email != null) 'email': email!, |
| 1411 | if (faxNumber != null) 'faxNumber': faxNumber!, |
| 1412 | if (phoneNumber != null) 'phoneNumber': phoneNumber!, |
| 1413 | if (postalAddress != null) 'postalAddress': postalAddress!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1414 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1415 | } |
| 1416 | |
| 1417 | /// Defines the contact information associated with a `Registration`. |
| 1418 | /// |
| 1419 | /// [ICANN](https://icann.org/) requires all domain names to have associated |
| 1420 | /// contact information. The `registrant_contact` is considered the domain's |
| 1421 | /// legal owner, and often the other contacts are identical. |
| 1422 | class ContactSettings { |
| 1423 | /// The administrative contact for the `Registration`. |
| 1424 | /// |
| 1425 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1426 | Contact? adminContact; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1427 | |
| 1428 | /// Privacy setting for the contacts associated with the `Registration`. |
| 1429 | /// |
| 1430 | /// Required. |
| 1431 | /// Possible string values are: |
| 1432 | /// - "CONTACT_PRIVACY_UNSPECIFIED" : The contact privacy settings are |
| 1433 | /// undefined. |
| 1434 | /// - "PUBLIC_CONTACT_DATA" : All the data from `ContactSettings` is publicly |
| 1435 | /// available. When setting this option, you must also provide a |
| 1436 | /// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of |
| 1437 | /// the request. |
| 1438 | /// - "PRIVATE_CONTACT_DATA" : None of the data from `ContactSettings` is |
| 1439 | /// publicly available. Instead, proxy contact data is published for your |
| 1440 | /// domain. Email sent to the proxy email address is forwarded to the |
| 1441 | /// registrant's email address. Cloud Domains provides this privacy proxy |
| 1442 | /// service at no additional cost. |
| 1443 | /// - "REDACTED_CONTACT_DATA" : Some data from `ContactSettings` is publicly |
| 1444 | /// available. The actual information redacted depends on the domain. For |
| 1445 | /// details, see |
| 1446 | /// [the registration privacy article](https://support.google.com/domains/answer/3251242). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1447 | core.String? privacy; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1448 | |
| 1449 | /// The registrant contact for the `Registration`. |
| 1450 | /// |
| 1451 | /// *Caution: Anyone with access to this email address, phone number, and/or |
| 1452 | /// postal address can take control of the domain.* *Warning: For new |
| 1453 | /// `Registration`s, the registrant will receive an email confirmation that |
| 1454 | /// they must complete within 15 days to avoid domain suspension.* |
| 1455 | /// |
| 1456 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1457 | Contact? registrantContact; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1458 | |
| 1459 | /// The technical contact for the `Registration`. |
| 1460 | /// |
| 1461 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1462 | Contact? technicalContact; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1463 | |
| 1464 | ContactSettings(); |
| 1465 | |
| 1466 | ContactSettings.fromJson(core.Map _json) { |
| 1467 | if (_json.containsKey('adminContact')) { |
| 1468 | adminContact = Contact.fromJson( |
| 1469 | _json['adminContact'] as core.Map<core.String, core.dynamic>); |
| 1470 | } |
| 1471 | if (_json.containsKey('privacy')) { |
| 1472 | privacy = _json['privacy'] as core.String; |
| 1473 | } |
| 1474 | if (_json.containsKey('registrantContact')) { |
| 1475 | registrantContact = Contact.fromJson( |
| 1476 | _json['registrantContact'] as core.Map<core.String, core.dynamic>); |
| 1477 | } |
| 1478 | if (_json.containsKey('technicalContact')) { |
| 1479 | technicalContact = Contact.fromJson( |
| 1480 | _json['technicalContact'] as core.Map<core.String, core.dynamic>); |
| 1481 | } |
| 1482 | } |
| 1483 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1484 | core.Map<core.String, core.Object?> toJson() => { |
| 1485 | if (adminContact != null) 'adminContact': adminContact!.toJson(), |
| 1486 | if (privacy != null) 'privacy': privacy!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1487 | if (registrantContact != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1488 | 'registrantContact': registrantContact!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1489 | if (technicalContact != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1490 | 'technicalContact': technicalContact!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1491 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1492 | } |
| 1493 | |
| 1494 | /// Configuration for an arbitrary DNS provider. |
| 1495 | class CustomDns { |
| 1496 | /// The list of DS records for this domain, which are used to enable DNSSEC. |
| 1497 | /// |
| 1498 | /// The domain's DNS provider can provide the values to set here. If this |
| 1499 | /// field is empty, DNSSEC is disabled. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1500 | core.List<DsRecord>? dsRecords; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1501 | |
| 1502 | /// A list of name servers that store the DNS zone for this domain. |
| 1503 | /// |
| 1504 | /// Each name server is a domain name, with Unicode domain names expressed in |
| 1505 | /// Punycode format. |
| 1506 | /// |
| 1507 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1508 | core.List<core.String>? nameServers; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1509 | |
| 1510 | CustomDns(); |
| 1511 | |
| 1512 | CustomDns.fromJson(core.Map _json) { |
| 1513 | if (_json.containsKey('dsRecords')) { |
| 1514 | dsRecords = (_json['dsRecords'] as core.List) |
| 1515 | .map<DsRecord>((value) => |
| 1516 | DsRecord.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 1517 | .toList(); |
| 1518 | } |
| 1519 | if (_json.containsKey('nameServers')) { |
| 1520 | nameServers = (_json['nameServers'] as core.List) |
| 1521 | .map<core.String>((value) => value as core.String) |
| 1522 | .toList(); |
| 1523 | } |
| 1524 | } |
| 1525 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1526 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1527 | if (dsRecords != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1528 | 'dsRecords': dsRecords!.map((value) => value.toJson()).toList(), |
| 1529 | if (nameServers != null) 'nameServers': nameServers!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1530 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1531 | } |
| 1532 | |
| 1533 | /// Defines the DNS configuration of a `Registration`, including name servers, |
| 1534 | /// DNSSEC, and glue records. |
| 1535 | class DnsSettings { |
| 1536 | /// An arbitrary DNS provider identified by its name servers. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1537 | CustomDns? customDns; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1538 | |
| 1539 | /// The list of glue records for this `Registration`. |
| 1540 | /// |
| 1541 | /// Commonly empty. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1542 | core.List<GlueRecord>? glueRecords; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1543 | |
| 1544 | /// The free DNS zone provided by [Google Domains](https://domains.google/). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1545 | GoogleDomainsDns? googleDomainsDns; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1546 | |
| 1547 | DnsSettings(); |
| 1548 | |
| 1549 | DnsSettings.fromJson(core.Map _json) { |
| 1550 | if (_json.containsKey('customDns')) { |
| 1551 | customDns = CustomDns.fromJson( |
| 1552 | _json['customDns'] as core.Map<core.String, core.dynamic>); |
| 1553 | } |
| 1554 | if (_json.containsKey('glueRecords')) { |
| 1555 | glueRecords = (_json['glueRecords'] as core.List) |
| 1556 | .map<GlueRecord>((value) => |
| 1557 | GlueRecord.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 1558 | .toList(); |
| 1559 | } |
| 1560 | if (_json.containsKey('googleDomainsDns')) { |
| 1561 | googleDomainsDns = GoogleDomainsDns.fromJson( |
| 1562 | _json['googleDomainsDns'] as core.Map<core.String, core.dynamic>); |
| 1563 | } |
| 1564 | } |
| 1565 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1566 | core.Map<core.String, core.Object?> toJson() => { |
| 1567 | if (customDns != null) 'customDns': customDns!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1568 | if (glueRecords != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1569 | 'glueRecords': glueRecords!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1570 | if (googleDomainsDns != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1571 | 'googleDomainsDns': googleDomainsDns!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1572 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1573 | } |
| 1574 | |
| 1575 | /// Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC |
| 1576 | /// for a domain. |
| 1577 | /// |
| 1578 | /// It contains a digest (hash) of a DNSKEY record that must be present in the |
| 1579 | /// domain's DNS zone. |
| 1580 | class DsRecord { |
| 1581 | /// The algorithm used to generate the referenced DNSKEY. |
| 1582 | /// Possible string values are: |
| 1583 | /// - "ALGORITHM_UNSPECIFIED" : The algorithm is unspecified. |
| 1584 | /// - "DSA" : DSA/SHA1. Not recommended for new deployments. |
| 1585 | /// - "ECC" : ECC. Not recommended for new deployments. |
| 1586 | /// - "RSASHA1" : RSA/SHA-1. Not recommended for new deployments. |
| 1587 | /// - "DSANSEC3SHA1" : DSA-NSEC3-SHA1. Not recommended for new deployments. |
| 1588 | /// - "RSASHA1NSEC3SHA1" : RSA/SHA1-NSEC3-SHA1. Not recommended for new |
| 1589 | /// deployments. |
| 1590 | /// - "RSASHA256" : RSA/SHA-256. |
| 1591 | /// - "RSASHA512" : RSA/SHA-512. |
| 1592 | /// - "ECCGOST" : GOST R 34.10-2001. |
| 1593 | /// - "ECDSAP256SHA256" : ECDSA Curve P-256 with SHA-256. |
| 1594 | /// - "ECDSAP384SHA384" : ECDSA Curve P-384 with SHA-384. |
| 1595 | /// - "ED25519" : Ed25519. |
| 1596 | /// - "ED448" : Ed448. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1597 | core.String? algorithm; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1598 | |
| 1599 | /// The digest generated from the referenced DNSKEY. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1600 | core.String? digest; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1601 | |
| 1602 | /// The hash function used to generate the digest of the referenced DNSKEY. |
| 1603 | /// Possible string values are: |
| 1604 | /// - "DIGEST_TYPE_UNSPECIFIED" : The DigestType is unspecified. |
| 1605 | /// - "SHA1" : SHA-1. Not recommended for new deployments. |
| 1606 | /// - "SHA256" : SHA-256. |
| 1607 | /// - "GOST3411" : GOST R 34.11-94. |
| 1608 | /// - "SHA384" : SHA-384. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1609 | core.String? digestType; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1610 | |
| 1611 | /// The key tag of the record. |
| 1612 | /// |
| 1613 | /// Must be set in range 0 -- 65535. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1614 | core.int? keyTag; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1615 | |
| 1616 | DsRecord(); |
| 1617 | |
| 1618 | DsRecord.fromJson(core.Map _json) { |
| 1619 | if (_json.containsKey('algorithm')) { |
| 1620 | algorithm = _json['algorithm'] as core.String; |
| 1621 | } |
| 1622 | if (_json.containsKey('digest')) { |
| 1623 | digest = _json['digest'] as core.String; |
| 1624 | } |
| 1625 | if (_json.containsKey('digestType')) { |
| 1626 | digestType = _json['digestType'] as core.String; |
| 1627 | } |
| 1628 | if (_json.containsKey('keyTag')) { |
| 1629 | keyTag = _json['keyTag'] as core.int; |
| 1630 | } |
| 1631 | } |
| 1632 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1633 | core.Map<core.String, core.Object?> toJson() => { |
| 1634 | if (algorithm != null) 'algorithm': algorithm!, |
| 1635 | if (digest != null) 'digest': digest!, |
| 1636 | if (digestType != null) 'digestType': digestType!, |
| 1637 | if (keyTag != null) 'keyTag': keyTag!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1638 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1639 | } |
| 1640 | |
| 1641 | /// Request for the `ExportRegistration` method. |
| 1642 | class ExportRegistrationRequest { |
| 1643 | ExportRegistrationRequest(); |
| 1644 | |
| 1645 | ExportRegistrationRequest.fromJson( |
| 1646 | // ignore: avoid_unused_constructor_parameters |
| 1647 | core.Map _json); |
| 1648 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1649 | core.Map<core.String, core.Object?> toJson() => {}; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1650 | } |
| 1651 | |
| 1652 | /// Represents a textual expression in the Common Expression Language (CEL) |
| 1653 | /// syntax. |
| 1654 | /// |
| 1655 | /// CEL is a C-like expression language. The syntax and semantics of CEL are |
| 1656 | /// documented at https://github.com/google/cel-spec. Example (Comparison): |
| 1657 | /// title: "Summary size limit" description: "Determines if a summary is less |
| 1658 | /// than 100 chars" expression: "document.summary.size() < 100" Example |
| 1659 | /// (Equality): title: "Requestor is owner" description: "Determines if |
| 1660 | /// requestor is the document owner" expression: "document.owner == |
| 1661 | /// request.auth.claims.email" Example (Logic): title: "Public documents" |
| 1662 | /// description: "Determine whether the document should be publicly visible" |
| 1663 | /// expression: "document.type != 'private' && document.type != 'internal'" |
| 1664 | /// Example (Data Manipulation): title: "Notification string" description: |
| 1665 | /// "Create a notification string with a timestamp." expression: "'New message |
| 1666 | /// received at ' + string(document.create_time)" The exact variables and |
| 1667 | /// functions that may be referenced within an expression are determined by the |
| 1668 | /// service that evaluates it. See the service documentation for additional |
| 1669 | /// information. |
| 1670 | class Expr { |
| 1671 | /// Description of the expression. |
| 1672 | /// |
| 1673 | /// This is a longer text which describes the expression, e.g. when hovered |
| 1674 | /// over it in a UI. |
| 1675 | /// |
| 1676 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1677 | core.String? description; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1678 | |
| 1679 | /// Textual representation of an expression in Common Expression Language |
| 1680 | /// syntax. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1681 | core.String? expression; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1682 | |
| 1683 | /// String indicating the location of the expression for error reporting, e.g. |
| 1684 | /// a file name and a position in the file. |
| 1685 | /// |
| 1686 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1687 | core.String? location; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1688 | |
| 1689 | /// Title for the expression, i.e. a short string describing its purpose. |
| 1690 | /// |
| 1691 | /// This can be used e.g. in UIs which allow to enter the expression. |
| 1692 | /// |
| 1693 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1694 | core.String? title; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1695 | |
| 1696 | Expr(); |
| 1697 | |
| 1698 | Expr.fromJson(core.Map _json) { |
| 1699 | if (_json.containsKey('description')) { |
| 1700 | description = _json['description'] as core.String; |
| 1701 | } |
| 1702 | if (_json.containsKey('expression')) { |
| 1703 | expression = _json['expression'] as core.String; |
| 1704 | } |
| 1705 | if (_json.containsKey('location')) { |
| 1706 | location = _json['location'] as core.String; |
| 1707 | } |
| 1708 | if (_json.containsKey('title')) { |
| 1709 | title = _json['title'] as core.String; |
| 1710 | } |
| 1711 | } |
| 1712 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1713 | core.Map<core.String, core.Object?> toJson() => { |
| 1714 | if (description != null) 'description': description!, |
| 1715 | if (expression != null) 'expression': expression!, |
| 1716 | if (location != null) 'location': location!, |
| 1717 | if (title != null) 'title': title!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1718 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1719 | } |
| 1720 | |
| 1721 | /// Defines a host on your domain that is a DNS name server for your domain |
| 1722 | /// and/or other domains. |
| 1723 | /// |
| 1724 | /// Glue records are a way of making the IP address of a name server known, even |
| 1725 | /// when it serves DNS queries for its parent domain. For example, when |
| 1726 | /// `ns.example.com` is a name server for `example.com`, the host |
| 1727 | /// `ns.example.com` must have a glue record to break the circular DNS |
| 1728 | /// reference. |
| 1729 | class GlueRecord { |
| 1730 | /// Domain name of the host in Punycode format. |
| 1731 | /// |
| 1732 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1733 | core.String? hostName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1734 | |
| 1735 | /// List of IPv4 addresses corresponding to this host in the standard decimal |
| 1736 | /// format (e.g. `198.51.100.1`). |
| 1737 | /// |
| 1738 | /// At least one of `ipv4_address` and `ipv6_address` must be set. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1739 | core.List<core.String>? ipv4Addresses; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1740 | |
| 1741 | /// List of IPv6 addresses corresponding to this host in the standard |
| 1742 | /// hexadecimal format (e.g. `2001:db8::`). |
| 1743 | /// |
| 1744 | /// At least one of `ipv4_address` and `ipv6_address` must be set. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1745 | core.List<core.String>? ipv6Addresses; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1746 | |
| 1747 | GlueRecord(); |
| 1748 | |
| 1749 | GlueRecord.fromJson(core.Map _json) { |
| 1750 | if (_json.containsKey('hostName')) { |
| 1751 | hostName = _json['hostName'] as core.String; |
| 1752 | } |
| 1753 | if (_json.containsKey('ipv4Addresses')) { |
| 1754 | ipv4Addresses = (_json['ipv4Addresses'] as core.List) |
| 1755 | .map<core.String>((value) => value as core.String) |
| 1756 | .toList(); |
| 1757 | } |
| 1758 | if (_json.containsKey('ipv6Addresses')) { |
| 1759 | ipv6Addresses = (_json['ipv6Addresses'] as core.List) |
| 1760 | .map<core.String>((value) => value as core.String) |
| 1761 | .toList(); |
| 1762 | } |
| 1763 | } |
| 1764 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1765 | core.Map<core.String, core.Object?> toJson() => { |
| 1766 | if (hostName != null) 'hostName': hostName!, |
| 1767 | if (ipv4Addresses != null) 'ipv4Addresses': ipv4Addresses!, |
| 1768 | if (ipv6Addresses != null) 'ipv6Addresses': ipv6Addresses!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1769 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1770 | } |
| 1771 | |
| 1772 | /// Configuration for using the free DNS zone provided by Google Domains as a |
| 1773 | /// `Registration`'s `dns_provider`. |
| 1774 | /// |
| 1775 | /// You cannot configure the DNS zone itself using the API. To configure the DNS |
| 1776 | /// zone, go to [Google Domains](https://domains.google/). |
| 1777 | class GoogleDomainsDns { |
| 1778 | /// The list of DS records published for this domain. |
| 1779 | /// |
| 1780 | /// The list is automatically populated when `ds_state` is |
| 1781 | /// `DS_RECORDS_PUBLISHED`, otherwise it remains empty. |
| 1782 | /// |
| 1783 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1784 | core.List<DsRecord>? dsRecords; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1785 | |
| 1786 | /// The state of DS records for this domain. |
| 1787 | /// |
| 1788 | /// Used to enable or disable automatic DNSSEC. |
| 1789 | /// |
| 1790 | /// Required. |
| 1791 | /// Possible string values are: |
| 1792 | /// - "DS_STATE_UNSPECIFIED" : DS state is unspecified. |
| 1793 | /// - "DS_RECORDS_UNPUBLISHED" : DNSSEC is disabled for this domain. No DS |
| 1794 | /// records for this domain are published in the parent DNS zone. |
| 1795 | /// - "DS_RECORDS_PUBLISHED" : DNSSEC is enabled for this domain. Appropriate |
| 1796 | /// DS records for this domain are published in the parent DNS zone. This |
| 1797 | /// option is valid only if the DNS zone referenced in the `Registration`'s |
| 1798 | /// `dns_provider` field is already DNSSEC-signed. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1799 | core.String? dsState; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1800 | |
| 1801 | /// A list of name servers that store the DNS zone for this domain. |
| 1802 | /// |
| 1803 | /// Each name server is a domain name, with Unicode domain names expressed in |
| 1804 | /// Punycode format. This field is automatically populated with the name |
| 1805 | /// servers assigned to the Google Domains DNS zone. |
| 1806 | /// |
| 1807 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1808 | core.List<core.String>? nameServers; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1809 | |
| 1810 | GoogleDomainsDns(); |
| 1811 | |
| 1812 | GoogleDomainsDns.fromJson(core.Map _json) { |
| 1813 | if (_json.containsKey('dsRecords')) { |
| 1814 | dsRecords = (_json['dsRecords'] as core.List) |
| 1815 | .map<DsRecord>((value) => |
| 1816 | DsRecord.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 1817 | .toList(); |
| 1818 | } |
| 1819 | if (_json.containsKey('dsState')) { |
| 1820 | dsState = _json['dsState'] as core.String; |
| 1821 | } |
| 1822 | if (_json.containsKey('nameServers')) { |
| 1823 | nameServers = (_json['nameServers'] as core.List) |
| 1824 | .map<core.String>((value) => value as core.String) |
| 1825 | .toList(); |
| 1826 | } |
| 1827 | } |
| 1828 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1829 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1830 | if (dsRecords != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1831 | 'dsRecords': dsRecords!.map((value) => value.toJson()).toList(), |
| 1832 | if (dsState != null) 'dsState': dsState!, |
| 1833 | if (nameServers != null) 'nameServers': nameServers!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1834 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1835 | } |
| 1836 | |
| 1837 | /// The response message for Locations.ListLocations. |
| 1838 | class ListLocationsResponse { |
| 1839 | /// A list of locations that matches the specified filter in the request. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1840 | core.List<Location>? locations; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1841 | |
| 1842 | /// The standard List next-page token. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1843 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1844 | |
| 1845 | ListLocationsResponse(); |
| 1846 | |
| 1847 | ListLocationsResponse.fromJson(core.Map _json) { |
| 1848 | if (_json.containsKey('locations')) { |
| 1849 | locations = (_json['locations'] as core.List) |
| 1850 | .map<Location>((value) => |
| 1851 | Location.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 1852 | .toList(); |
| 1853 | } |
| 1854 | if (_json.containsKey('nextPageToken')) { |
| 1855 | nextPageToken = _json['nextPageToken'] as core.String; |
| 1856 | } |
| 1857 | } |
| 1858 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1859 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1860 | if (locations != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1861 | 'locations': locations!.map((value) => value.toJson()).toList(), |
| 1862 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1863 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1864 | } |
| 1865 | |
| 1866 | /// The response message for Operations.ListOperations. |
| 1867 | class ListOperationsResponse { |
| 1868 | /// The standard List next-page token. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1869 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1870 | |
| 1871 | /// A list of operations that matches the specified filter in the request. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1872 | core.List<Operation>? operations; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1873 | |
| 1874 | ListOperationsResponse(); |
| 1875 | |
| 1876 | ListOperationsResponse.fromJson(core.Map _json) { |
| 1877 | if (_json.containsKey('nextPageToken')) { |
| 1878 | nextPageToken = _json['nextPageToken'] as core.String; |
| 1879 | } |
| 1880 | if (_json.containsKey('operations')) { |
| 1881 | operations = (_json['operations'] as core.List) |
| 1882 | .map<Operation>((value) => |
| 1883 | Operation.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 1884 | .toList(); |
| 1885 | } |
| 1886 | } |
| 1887 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1888 | core.Map<core.String, core.Object?> toJson() => { |
| 1889 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1890 | if (operations != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1891 | 'operations': operations!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1892 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1893 | } |
| 1894 | |
| 1895 | /// Response for the `ListRegistrations` method. |
| 1896 | class ListRegistrationsResponse { |
| 1897 | /// When present, there are more results to retrieve. |
| 1898 | /// |
| 1899 | /// Set `page_token` to this value on a subsequent call to get the next page |
| 1900 | /// of results. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1901 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1902 | |
| 1903 | /// A list of `Registration`s. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1904 | core.List<Registration>? registrations; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1905 | |
| 1906 | ListRegistrationsResponse(); |
| 1907 | |
| 1908 | ListRegistrationsResponse.fromJson(core.Map _json) { |
| 1909 | if (_json.containsKey('nextPageToken')) { |
| 1910 | nextPageToken = _json['nextPageToken'] as core.String; |
| 1911 | } |
| 1912 | if (_json.containsKey('registrations')) { |
| 1913 | registrations = (_json['registrations'] as core.List) |
| 1914 | .map<Registration>((value) => Registration.fromJson( |
| 1915 | value as core.Map<core.String, core.dynamic>)) |
| 1916 | .toList(); |
| 1917 | } |
| 1918 | } |
| 1919 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1920 | core.Map<core.String, core.Object?> toJson() => { |
| 1921 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1922 | if (registrations != null) |
| 1923 | 'registrations': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1924 | registrations!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1925 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1926 | } |
| 1927 | |
| 1928 | /// A resource that represents Google Cloud Platform location. |
| 1929 | class Location { |
| 1930 | /// The friendly name for this location, typically a nearby city name. |
| 1931 | /// |
| 1932 | /// For example, "Tokyo". |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1933 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1934 | |
| 1935 | /// Cross-service attributes for the location. |
| 1936 | /// |
| 1937 | /// For example {"cloud.googleapis.com/region": "us-east1"} |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1938 | core.Map<core.String, core.String>? labels; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1939 | |
| 1940 | /// The canonical id for this location. |
| 1941 | /// |
| 1942 | /// For example: `"us-east1"`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1943 | core.String? locationId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1944 | |
| 1945 | /// Service-specific metadata. |
| 1946 | /// |
| 1947 | /// For example the available capacity at the given location. |
| 1948 | /// |
| 1949 | /// The values for Object must be JSON objects. It can consist of `num`, |
| 1950 | /// `String`, `bool` and `null` as well as `Map` and `List` values. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1951 | core.Map<core.String, core.Object>? metadata; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1952 | |
| 1953 | /// Resource name for the location, which may vary between implementations. |
| 1954 | /// |
| 1955 | /// For example: `"projects/example-project/locations/us-east1"` |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1956 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1957 | |
| 1958 | Location(); |
| 1959 | |
| 1960 | Location.fromJson(core.Map _json) { |
| 1961 | if (_json.containsKey('displayName')) { |
| 1962 | displayName = _json['displayName'] as core.String; |
| 1963 | } |
| 1964 | if (_json.containsKey('labels')) { |
| 1965 | labels = |
| 1966 | (_json['labels'] as core.Map).cast<core.String, core.String>().map( |
| 1967 | (key, item) => core.MapEntry( |
| 1968 | key, |
| 1969 | item as core.String, |
| 1970 | ), |
| 1971 | ); |
| 1972 | } |
| 1973 | if (_json.containsKey('locationId')) { |
| 1974 | locationId = _json['locationId'] as core.String; |
| 1975 | } |
| 1976 | if (_json.containsKey('metadata')) { |
| 1977 | metadata = |
| 1978 | (_json['metadata'] as core.Map).cast<core.String, core.Object>().map( |
| 1979 | (key, item) => core.MapEntry( |
| 1980 | key, |
| 1981 | item as core.Object, |
| 1982 | ), |
| 1983 | ); |
| 1984 | } |
| 1985 | if (_json.containsKey('name')) { |
| 1986 | name = _json['name'] as core.String; |
| 1987 | } |
| 1988 | } |
| 1989 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1990 | core.Map<core.String, core.Object?> toJson() => { |
| 1991 | if (displayName != null) 'displayName': displayName!, |
| 1992 | if (labels != null) 'labels': labels!, |
| 1993 | if (locationId != null) 'locationId': locationId!, |
| 1994 | if (metadata != null) 'metadata': metadata!, |
| 1995 | if (name != null) 'name': name!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 1996 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1997 | } |
| 1998 | |
| 1999 | /// Defines renewal, billing, and transfer settings for a `Registration`. |
| 2000 | class ManagementSettings { |
| 2001 | /// The renewal method for this `Registration`. |
| 2002 | /// |
| 2003 | /// Output only. |
| 2004 | /// Possible string values are: |
| 2005 | /// - "RENEWAL_METHOD_UNSPECIFIED" : The renewal method is undefined. |
| 2006 | /// - "AUTOMATIC_RENEWAL" : The domain is automatically renewed each year . To |
| 2007 | /// disable automatic renewals, export the domain by calling |
| 2008 | /// `ExportRegistration` . |
| 2009 | /// - "MANUAL_RENEWAL" : The domain must be explicitly renewed each year |
| 2010 | /// before its `expire_time`. This option is only available when the |
| 2011 | /// `Registration` is in state `EXPORTED`. To manage the domain's current |
| 2012 | /// billing and renewal settings, go to |
| 2013 | /// [Google Domains](https://domains.google/). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2014 | core.String? renewalMethod; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2015 | |
| 2016 | /// Controls whether the domain can be transferred to another registrar. |
| 2017 | /// Possible string values are: |
| 2018 | /// - "TRANSFER_LOCK_STATE_UNSPECIFIED" : The state is unspecified. |
| 2019 | /// - "UNLOCKED" : The domain is unlocked and can be transferred to another |
| 2020 | /// registrar. |
| 2021 | /// - "LOCKED" : The domain is locked and cannot be transferred to another |
| 2022 | /// registrar. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2023 | core.String? transferLockState; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2024 | |
| 2025 | ManagementSettings(); |
| 2026 | |
| 2027 | ManagementSettings.fromJson(core.Map _json) { |
| 2028 | if (_json.containsKey('renewalMethod')) { |
| 2029 | renewalMethod = _json['renewalMethod'] as core.String; |
| 2030 | } |
| 2031 | if (_json.containsKey('transferLockState')) { |
| 2032 | transferLockState = _json['transferLockState'] as core.String; |
| 2033 | } |
| 2034 | } |
| 2035 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2036 | core.Map<core.String, core.Object?> toJson() => { |
| 2037 | if (renewalMethod != null) 'renewalMethod': renewalMethod!, |
| 2038 | if (transferLockState != null) 'transferLockState': transferLockState!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2039 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2040 | } |
| 2041 | |
| 2042 | /// Represents an amount of money with its currency type. |
| 2043 | class Money { |
| 2044 | /// The three-letter currency code defined in ISO 4217. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2045 | core.String? currencyCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2046 | |
| 2047 | /// Number of nano (10^-9) units of the amount. |
| 2048 | /// |
| 2049 | /// The value must be between -999,999,999 and +999,999,999 inclusive. If |
| 2050 | /// `units` is positive, `nanos` must be positive or zero. If `units` is zero, |
| 2051 | /// `nanos` can be positive, zero, or negative. If `units` is negative, |
| 2052 | /// `nanos` must be negative or zero. For example $-1.75 is represented as |
| 2053 | /// `units`=-1 and `nanos`=-750,000,000. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2054 | core.int? nanos; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2055 | |
| 2056 | /// The whole units of the amount. |
| 2057 | /// |
| 2058 | /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2059 | core.String? units; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2060 | |
| 2061 | Money(); |
| 2062 | |
| 2063 | Money.fromJson(core.Map _json) { |
| 2064 | if (_json.containsKey('currencyCode')) { |
| 2065 | currencyCode = _json['currencyCode'] as core.String; |
| 2066 | } |
| 2067 | if (_json.containsKey('nanos')) { |
| 2068 | nanos = _json['nanos'] as core.int; |
| 2069 | } |
| 2070 | if (_json.containsKey('units')) { |
| 2071 | units = _json['units'] as core.String; |
| 2072 | } |
| 2073 | } |
| 2074 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2075 | core.Map<core.String, core.Object?> toJson() => { |
| 2076 | if (currencyCode != null) 'currencyCode': currencyCode!, |
| 2077 | if (nanos != null) 'nanos': nanos!, |
| 2078 | if (units != null) 'units': units!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2079 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2080 | } |
| 2081 | |
| 2082 | /// This resource represents a long-running operation that is the result of a |
| 2083 | /// network API call. |
| 2084 | class Operation { |
| 2085 | /// If the value is `false`, it means the operation is still in progress. |
| 2086 | /// |
| 2087 | /// If `true`, the operation is completed, and either `error` or `response` is |
| 2088 | /// available. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2089 | core.bool? done; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2090 | |
| 2091 | /// The error result of the operation in case of failure or cancellation. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2092 | Status? error; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2093 | |
| 2094 | /// Service-specific metadata associated with the operation. |
| 2095 | /// |
| 2096 | /// It typically contains progress information and common metadata such as |
| 2097 | /// create time. Some services might not provide such metadata. Any method |
| 2098 | /// that returns a long-running operation should document the metadata type, |
| 2099 | /// if any. |
| 2100 | /// |
| 2101 | /// The values for Object must be JSON objects. It can consist of `num`, |
| 2102 | /// `String`, `bool` and `null` as well as `Map` and `List` values. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2103 | core.Map<core.String, core.Object>? metadata; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2104 | |
| 2105 | /// The server-assigned name, which is only unique within the same service |
| 2106 | /// that originally returns it. |
| 2107 | /// |
| 2108 | /// If you use the default HTTP mapping, the `name` should be a resource name |
| 2109 | /// ending with `operations/{unique_id}`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2110 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2111 | |
| 2112 | /// The normal response of the operation in case of success. |
| 2113 | /// |
| 2114 | /// If the original method returns no data on success, such as `Delete`, the |
| 2115 | /// response is `google.protobuf.Empty`. If the original method is standard |
| 2116 | /// `Get`/`Create`/`Update`, the response should be the resource. For other |
| 2117 | /// methods, the response should have the type `XxxResponse`, where `Xxx` is |
| 2118 | /// the original method name. For example, if the original method name is |
| 2119 | /// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 2120 | /// |
| 2121 | /// The values for Object must be JSON objects. It can consist of `num`, |
| 2122 | /// `String`, `bool` and `null` as well as `Map` and `List` values. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2123 | core.Map<core.String, core.Object>? response; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2124 | |
| 2125 | Operation(); |
| 2126 | |
| 2127 | Operation.fromJson(core.Map _json) { |
| 2128 | if (_json.containsKey('done')) { |
| 2129 | done = _json['done'] as core.bool; |
| 2130 | } |
| 2131 | if (_json.containsKey('error')) { |
| 2132 | error = Status.fromJson( |
| 2133 | _json['error'] as core.Map<core.String, core.dynamic>); |
| 2134 | } |
| 2135 | if (_json.containsKey('metadata')) { |
| 2136 | metadata = |
| 2137 | (_json['metadata'] as core.Map).cast<core.String, core.Object>().map( |
| 2138 | (key, item) => core.MapEntry( |
| 2139 | key, |
| 2140 | item as core.Object, |
| 2141 | ), |
| 2142 | ); |
| 2143 | } |
| 2144 | if (_json.containsKey('name')) { |
| 2145 | name = _json['name'] as core.String; |
| 2146 | } |
| 2147 | if (_json.containsKey('response')) { |
| 2148 | response = |
| 2149 | (_json['response'] as core.Map).cast<core.String, core.Object>().map( |
| 2150 | (key, item) => core.MapEntry( |
| 2151 | key, |
| 2152 | item as core.Object, |
| 2153 | ), |
| 2154 | ); |
| 2155 | } |
| 2156 | } |
| 2157 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2158 | core.Map<core.String, core.Object?> toJson() => { |
| 2159 | if (done != null) 'done': done!, |
| 2160 | if (error != null) 'error': error!.toJson(), |
| 2161 | if (metadata != null) 'metadata': metadata!, |
| 2162 | if (name != null) 'name': name!, |
| 2163 | if (response != null) 'response': response!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2164 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2165 | } |
| 2166 | |
| 2167 | /// Represents the metadata of the long-running operation. |
| 2168 | /// |
| 2169 | /// Output only. |
| 2170 | class OperationMetadata { |
| 2171 | /// API version used to start the operation. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2172 | core.String? apiVersion; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2173 | |
| 2174 | /// The time the operation was created. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2175 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2176 | |
| 2177 | /// The time the operation finished running. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2178 | core.String? endTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2179 | |
| 2180 | /// Human-readable status of the operation, if any. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2181 | core.String? statusDetail; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2182 | |
| 2183 | /// Server-defined resource path for the target of the operation. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2184 | core.String? target; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2185 | |
| 2186 | /// Name of the verb executed by the operation. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2187 | core.String? verb; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2188 | |
| 2189 | OperationMetadata(); |
| 2190 | |
| 2191 | OperationMetadata.fromJson(core.Map _json) { |
| 2192 | if (_json.containsKey('apiVersion')) { |
| 2193 | apiVersion = _json['apiVersion'] as core.String; |
| 2194 | } |
| 2195 | if (_json.containsKey('createTime')) { |
| 2196 | createTime = _json['createTime'] as core.String; |
| 2197 | } |
| 2198 | if (_json.containsKey('endTime')) { |
| 2199 | endTime = _json['endTime'] as core.String; |
| 2200 | } |
| 2201 | if (_json.containsKey('statusDetail')) { |
| 2202 | statusDetail = _json['statusDetail'] as core.String; |
| 2203 | } |
| 2204 | if (_json.containsKey('target')) { |
| 2205 | target = _json['target'] as core.String; |
| 2206 | } |
| 2207 | if (_json.containsKey('verb')) { |
| 2208 | verb = _json['verb'] as core.String; |
| 2209 | } |
| 2210 | } |
| 2211 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2212 | core.Map<core.String, core.Object?> toJson() => { |
| 2213 | if (apiVersion != null) 'apiVersion': apiVersion!, |
| 2214 | if (createTime != null) 'createTime': createTime!, |
| 2215 | if (endTime != null) 'endTime': endTime!, |
| 2216 | if (statusDetail != null) 'statusDetail': statusDetail!, |
| 2217 | if (target != null) 'target': target!, |
| 2218 | if (verb != null) 'verb': verb!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2219 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2220 | } |
| 2221 | |
| 2222 | /// An Identity and Access Management (IAM) policy, which specifies access |
| 2223 | /// controls for Google Cloud resources. |
| 2224 | /// |
| 2225 | /// A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 2226 | /// `members` to a single `role`. Members can be user accounts, service |
| 2227 | /// accounts, Google groups, and domains (such as G Suite). A `role` is a named |
| 2228 | /// list of permissions; each `role` can be an IAM predefined role or a |
| 2229 | /// user-created custom role. For some types of Google Cloud resources, a |
| 2230 | /// `binding` can also specify a `condition`, which is a logical expression that |
| 2231 | /// allows access to a resource only if the expression evaluates to `true`. A |
| 2232 | /// condition can add constraints based on attributes of the request, the |
| 2233 | /// resource, or both. To learn which resources support conditions in their IAM |
| 2234 | /// policies, see the |
| 2235 | /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 2236 | /// **JSON example:** { "bindings": \[ { "role": |
| 2237 | /// "roles/resourcemanager.organizationAdmin", "members": \[ |
| 2238 | /// "user:mike@example.com", "group:admins@example.com", "domain:google.com", |
| 2239 | /// "serviceAccount:my-project-id@appspot.gserviceaccount.com" \] }, { "role": |
| 2240 | /// "roles/resourcemanager.organizationViewer", "members": \[ |
| 2241 | /// "user:eve@example.com" \], "condition": { "title": "expirable access", |
| 2242 | /// "description": "Does not grant access after Sep 2020", "expression": |
| 2243 | /// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } \], "etag": |
| 2244 | /// "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - |
| 2245 | /// user:mike@example.com - group:admins@example.com - domain:google.com - |
| 2246 | /// serviceAccount:my-project-id@appspot.gserviceaccount.com role: |
| 2247 | /// roles/resourcemanager.organizationAdmin - members: - user:eve@example.com |
| 2248 | /// role: roles/resourcemanager.organizationViewer condition: title: expirable |
| 2249 | /// access description: Does not grant access after Sep 2020 expression: |
| 2250 | /// request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - |
| 2251 | /// version: 3 For a description of IAM and its features, see the |
| 2252 | /// [IAM documentation](https://cloud.google.com/iam/docs/). |
| 2253 | class Policy { |
| 2254 | /// Specifies cloud audit logging configuration for this policy. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2255 | core.List<AuditConfig>? auditConfigs; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2256 | |
| 2257 | /// Associates a list of `members` to a `role`. |
| 2258 | /// |
| 2259 | /// Optionally, may specify a `condition` that determines how and when the |
| 2260 | /// `bindings` are applied. Each of the `bindings` must contain at least one |
| 2261 | /// member. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2262 | core.List<Binding>? bindings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2263 | |
| 2264 | /// `etag` is used for optimistic concurrency control as a way to help prevent |
| 2265 | /// simultaneous updates of a policy from overwriting each other. |
| 2266 | /// |
| 2267 | /// It is strongly suggested that systems make use of the `etag` in the |
| 2268 | /// read-modify-write cycle to perform policy updates in order to avoid race |
| 2269 | /// conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 2270 | /// systems are expected to put that etag in the request to `setIamPolicy` to |
| 2271 | /// ensure that their change will be applied to the same version of the |
| 2272 | /// policy. **Important:** If you use IAM Conditions, you must include the |
| 2273 | /// `etag` field whenever you call `setIamPolicy`. If you omit this field, |
| 2274 | /// then IAM allows you to overwrite a version `3` policy with a version `1` |
| 2275 | /// policy, and all of the conditions in the version `3` policy are lost. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2276 | core.String? etag; |
| 2277 | core.List<core.int> get etagAsBytes => convert.base64.decode(etag!); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2278 | |
| 2279 | set etagAsBytes(core.List<core.int> _bytes) { |
| 2280 | etag = |
| 2281 | convert.base64.encode(_bytes).replaceAll('/', '_').replaceAll('+', '-'); |
| 2282 | } |
| 2283 | |
| 2284 | /// Specifies the format of the policy. |
| 2285 | /// |
| 2286 | /// Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 2287 | /// are rejected. Any operation that affects conditional role bindings must |
| 2288 | /// specify version `3`. This requirement applies to the following operations: |
| 2289 | /// * Getting a policy that includes a conditional role binding * Adding a |
| 2290 | /// conditional role binding to a policy * Changing a conditional role binding |
| 2291 | /// in a policy * Removing any role binding, with or without a condition, from |
| 2292 | /// a policy that includes conditions **Important:** If you use IAM |
| 2293 | /// Conditions, you must include the `etag` field whenever you call |
| 2294 | /// `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a |
| 2295 | /// version `3` policy with a version `1` policy, and all of the conditions in |
| 2296 | /// the version `3` policy are lost. If a policy does not include any |
| 2297 | /// conditions, operations on that policy may specify any valid version or |
| 2298 | /// leave the field unset. To learn which resources support conditions in |
| 2299 | /// their IAM policies, see the |
| 2300 | /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2301 | core.int? version; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2302 | |
| 2303 | Policy(); |
| 2304 | |
| 2305 | Policy.fromJson(core.Map _json) { |
| 2306 | if (_json.containsKey('auditConfigs')) { |
| 2307 | auditConfigs = (_json['auditConfigs'] as core.List) |
| 2308 | .map<AuditConfig>((value) => AuditConfig.fromJson( |
| 2309 | value as core.Map<core.String, core.dynamic>)) |
| 2310 | .toList(); |
| 2311 | } |
| 2312 | if (_json.containsKey('bindings')) { |
| 2313 | bindings = (_json['bindings'] as core.List) |
| 2314 | .map<Binding>((value) => |
| 2315 | Binding.fromJson(value as core.Map<core.String, core.dynamic>)) |
| 2316 | .toList(); |
| 2317 | } |
| 2318 | if (_json.containsKey('etag')) { |
| 2319 | etag = _json['etag'] as core.String; |
| 2320 | } |
| 2321 | if (_json.containsKey('version')) { |
| 2322 | version = _json['version'] as core.int; |
| 2323 | } |
| 2324 | } |
| 2325 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2326 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2327 | if (auditConfigs != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2328 | 'auditConfigs': auditConfigs!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2329 | if (bindings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2330 | 'bindings': bindings!.map((value) => value.toJson()).toList(), |
| 2331 | if (etag != null) 'etag': etag!, |
| 2332 | if (version != null) 'version': version!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2333 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2334 | } |
| 2335 | |
| 2336 | /// Represents a postal address, e.g. for postal delivery or payments addresses. |
| 2337 | /// |
| 2338 | /// Given a postal address, a postal service can deliver items to a premise, |
| 2339 | /// P.O. Box or similar. It is not intended to model geographical locations |
| 2340 | /// (roads, towns, mountains). In typical usage an address would be created via |
| 2341 | /// user input or from importing existing data, depending on the type of |
| 2342 | /// process. Advice on address input / editing: - Use an i18n-ready address |
| 2343 | /// widget such as https://github.com/google/libaddressinput) - Users should not |
| 2344 | /// be presented with UI elements for input or editing of fields outside |
| 2345 | /// countries where that field is used. For more guidance on how to use this |
| 2346 | /// schema, please see: https://support.google.com/business/answer/6397478 |
| 2347 | class PostalAddress { |
| 2348 | /// Unstructured address lines describing the lower levels of an address. |
| 2349 | /// |
| 2350 | /// Because values in address_lines do not have type information and may |
| 2351 | /// sometimes contain multiple values in a single field (e.g. "Austin, TX"), |
| 2352 | /// it is important that the line order is clear. The order of address lines |
| 2353 | /// should be "envelope order" for the country/region of the address. In |
| 2354 | /// places where this can vary (e.g. Japan), address_language is used to make |
| 2355 | /// it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" |
| 2356 | /// for small-to-large). This way, the most specific line of an address can be |
| 2357 | /// selected based on the language. The minimum permitted structural |
| 2358 | /// representation of an address consists of a region_code with all remaining |
| 2359 | /// information placed in the address_lines. It would be possible to format |
| 2360 | /// such an address very approximately without geocoding, but no semantic |
| 2361 | /// reasoning could be made about any of the address components until it was |
| 2362 | /// at least partially resolved. Creating an address only containing a |
| 2363 | /// region_code and address_lines, and then geocoding is the recommended way |
| 2364 | /// to handle completely unstructured addresses (as opposed to guessing which |
| 2365 | /// parts of the address should be localities or administrative areas). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2366 | core.List<core.String>? addressLines; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2367 | |
| 2368 | /// Highest administrative subdivision which is used for postal addresses of a |
| 2369 | /// country or region. |
| 2370 | /// |
| 2371 | /// For example, this can be a state, a province, an oblast, or a prefecture. |
| 2372 | /// Specifically, for Spain this is the province and not the autonomous |
| 2373 | /// community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use |
| 2374 | /// an administrative area in postal addresses. E.g. in Switzerland this |
| 2375 | /// should be left unpopulated. |
| 2376 | /// |
| 2377 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2378 | core.String? administrativeArea; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2379 | |
| 2380 | /// BCP-47 language code of the contents of this address (if known). |
| 2381 | /// |
| 2382 | /// This is often the UI language of the input form or is expected to match |
| 2383 | /// one of the languages used in the address' country/region, or their |
| 2384 | /// transliterated equivalents. This can affect formatting in certain |
| 2385 | /// countries, but is not critical to the correctness of the data and will |
| 2386 | /// never affect any validation or other non-formatting related operations. If |
| 2387 | /// this value is not known, it should be omitted (rather than specifying a |
| 2388 | /// possibly incorrect default). Examples: "zh-Hant", "ja", "ja-Latn", "en". |
| 2389 | /// |
| 2390 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2391 | core.String? languageCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2392 | |
| 2393 | /// Generally refers to the city/town portion of the address. |
| 2394 | /// |
| 2395 | /// Examples: US city, IT comune, UK post town. In regions of the world where |
| 2396 | /// localities are not well defined or do not fit into this structure well, |
| 2397 | /// leave locality empty and use address_lines. |
| 2398 | /// |
| 2399 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2400 | core.String? locality; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2401 | |
| 2402 | /// The name of the organization at the address. |
| 2403 | /// |
| 2404 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2405 | core.String? organization; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2406 | |
| 2407 | /// Postal code of the address. |
| 2408 | /// |
| 2409 | /// Not all countries use or require postal codes to be present, but where |
| 2410 | /// they are used, they may trigger additional validation with other parts of |
| 2411 | /// the address (e.g. state/zip validation in the U.S.A.). |
| 2412 | /// |
| 2413 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2414 | core.String? postalCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2415 | |
| 2416 | /// The recipient at the address. |
| 2417 | /// |
| 2418 | /// This field may, under certain circumstances, contain multiline |
| 2419 | /// information. For example, it might contain "care of" information. |
| 2420 | /// |
| 2421 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2422 | core.List<core.String>? recipients; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2423 | |
| 2424 | /// CLDR region code of the country/region of the address. |
| 2425 | /// |
| 2426 | /// This is never inferred and it is up to the user to ensure the value is |
| 2427 | /// correct. See http://cldr.unicode.org/ and |
| 2428 | /// http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html |
| 2429 | /// for details. Example: "CH" for Switzerland. |
| 2430 | /// |
| 2431 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2432 | core.String? regionCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2433 | |
| 2434 | /// The schema revision of the `PostalAddress`. |
| 2435 | /// |
| 2436 | /// This must be set to 0, which is the latest revision. All new revisions |
| 2437 | /// **must** be backward compatible with old revisions. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2438 | core.int? revision; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2439 | |
| 2440 | /// Additional, country-specific, sorting code. |
| 2441 | /// |
| 2442 | /// This is not used in most regions. Where it is used, the value is either a |
| 2443 | /// string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or |
| 2444 | /// just a number alone, representing the "sector code" (Jamaica), "delivery |
| 2445 | /// area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). |
| 2446 | /// |
| 2447 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2448 | core.String? sortingCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2449 | |
| 2450 | /// Sublocality of the address. |
| 2451 | /// |
| 2452 | /// For example, this can be neighborhoods, boroughs, districts. |
| 2453 | /// |
| 2454 | /// Optional. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2455 | core.String? sublocality; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2456 | |
| 2457 | PostalAddress(); |
| 2458 | |
| 2459 | PostalAddress.fromJson(core.Map _json) { |
| 2460 | if (_json.containsKey('addressLines')) { |
| 2461 | addressLines = (_json['addressLines'] as core.List) |
| 2462 | .map<core.String>((value) => value as core.String) |
| 2463 | .toList(); |
| 2464 | } |
| 2465 | if (_json.containsKey('administrativeArea')) { |
| 2466 | administrativeArea = _json['administrativeArea'] as core.String; |
| 2467 | } |
| 2468 | if (_json.containsKey('languageCode')) { |
| 2469 | languageCode = _json['languageCode'] as core.String; |
| 2470 | } |
| 2471 | if (_json.containsKey('locality')) { |
| 2472 | locality = _json['locality'] as core.String; |
| 2473 | } |
| 2474 | if (_json.containsKey('organization')) { |
| 2475 | organization = _json['organization'] as core.String; |
| 2476 | } |
| 2477 | if (_json.containsKey('postalCode')) { |
| 2478 | postalCode = _json['postalCode'] as core.String; |
| 2479 | } |
| 2480 | if (_json.containsKey('recipients')) { |
| 2481 | recipients = (_json['recipients'] as core.List) |
| 2482 | .map<core.String>((value) => value as core.String) |
| 2483 | .toList(); |
| 2484 | } |
| 2485 | if (_json.containsKey('regionCode')) { |
| 2486 | regionCode = _json['regionCode'] as core.String; |
| 2487 | } |
| 2488 | if (_json.containsKey('revision')) { |
| 2489 | revision = _json['revision'] as core.int; |
| 2490 | } |
| 2491 | if (_json.containsKey('sortingCode')) { |
| 2492 | sortingCode = _json['sortingCode'] as core.String; |
| 2493 | } |
| 2494 | if (_json.containsKey('sublocality')) { |
| 2495 | sublocality = _json['sublocality'] as core.String; |
| 2496 | } |
| 2497 | } |
| 2498 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2499 | core.Map<core.String, core.Object?> toJson() => { |
| 2500 | if (addressLines != null) 'addressLines': addressLines!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2501 | if (administrativeArea != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2502 | 'administrativeArea': administrativeArea!, |
| 2503 | if (languageCode != null) 'languageCode': languageCode!, |
| 2504 | if (locality != null) 'locality': locality!, |
| 2505 | if (organization != null) 'organization': organization!, |
| 2506 | if (postalCode != null) 'postalCode': postalCode!, |
| 2507 | if (recipients != null) 'recipients': recipients!, |
| 2508 | if (regionCode != null) 'regionCode': regionCode!, |
| 2509 | if (revision != null) 'revision': revision!, |
| 2510 | if (sortingCode != null) 'sortingCode': sortingCode!, |
| 2511 | if (sublocality != null) 'sublocality': sublocality!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2512 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2513 | } |
| 2514 | |
| 2515 | /// Request for the `RegisterDomain` method. |
| 2516 | class RegisterDomainRequest { |
| 2517 | /// The list of contact notices that the caller acknowledges. |
| 2518 | /// |
Kevin Moore | 0895533 | 2021-02-17 10:47:11 -0800 | [diff] [blame] | 2519 | /// The notices needed here depend on the values specified in |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2520 | /// `registration.contact_settings`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2521 | core.List<core.String>? contactNotices; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2522 | |
| 2523 | /// The list of domain notices that you acknowledge. |
| 2524 | /// |
| 2525 | /// Call `RetrieveRegisterParameters` to see the notices that need |
| 2526 | /// acknowledgement. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2527 | core.List<core.String>? domainNotices; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2528 | |
| 2529 | /// The complete `Registration` resource to be created. |
| 2530 | /// |
| 2531 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2532 | Registration? registration; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2533 | |
| 2534 | /// When true, only validation will be performed, without actually registering |
| 2535 | /// the domain. |
| 2536 | /// |
| 2537 | /// Follows: |
| 2538 | /// https://cloud.google.com/apis/design/design_patterns#request_validation |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2539 | core.bool? validateOnly; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2540 | |
| 2541 | /// Yearly price to register or renew the domain. |
| 2542 | /// |
| 2543 | /// The value that should be put here can be obtained from |
| 2544 | /// RetrieveRegisterParameters or SearchDomains calls. |
| 2545 | /// |
| 2546 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2547 | Money? yearlyPrice; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2548 | |
| 2549 | RegisterDomainRequest(); |
| 2550 | |
| 2551 | RegisterDomainRequest.fromJson(core.Map _json) { |
| 2552 | if (_json.containsKey('contactNotices')) { |
| 2553 | contactNotices = (_json['contactNotices'] as core.List) |
| 2554 | .map<core.String>((value) => value as core.String) |
| 2555 | .toList(); |
| 2556 | } |
| 2557 | if (_json.containsKey('domainNotices')) { |
| 2558 | domainNotices = (_json['domainNotices'] as core.List) |
| 2559 | .map<core.String>((value) => value as core.String) |
| 2560 | .toList(); |
| 2561 | } |
| 2562 | if (_json.containsKey('registration')) { |
| 2563 | registration = Registration.fromJson( |
| 2564 | _json['registration'] as core.Map<core.String, core.dynamic>); |
| 2565 | } |
| 2566 | if (_json.containsKey('validateOnly')) { |
| 2567 | validateOnly = _json['validateOnly'] as core.bool; |
| 2568 | } |
| 2569 | if (_json.containsKey('yearlyPrice')) { |
| 2570 | yearlyPrice = Money.fromJson( |
| 2571 | _json['yearlyPrice'] as core.Map<core.String, core.dynamic>); |
| 2572 | } |
| 2573 | } |
| 2574 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2575 | core.Map<core.String, core.Object?> toJson() => { |
| 2576 | if (contactNotices != null) 'contactNotices': contactNotices!, |
| 2577 | if (domainNotices != null) 'domainNotices': domainNotices!, |
| 2578 | if (registration != null) 'registration': registration!.toJson(), |
| 2579 | if (validateOnly != null) 'validateOnly': validateOnly!, |
| 2580 | if (yearlyPrice != null) 'yearlyPrice': yearlyPrice!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2581 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2582 | } |
| 2583 | |
| 2584 | /// Parameters required to register a new domain. |
| 2585 | class RegisterParameters { |
| 2586 | /// Indicates whether the domain is available for registration. |
| 2587 | /// |
| 2588 | /// This value is accurate when obtained by calling |
| 2589 | /// `RetrieveRegisterParameters`, but is approximate when obtained by calling |
| 2590 | /// `SearchDomains`. |
| 2591 | /// Possible string values are: |
| 2592 | /// - "AVAILABILITY_UNSPECIFIED" : The availability is unspecified. |
| 2593 | /// - "AVAILABLE" : The domain is available for registration. |
| 2594 | /// - "UNAVAILABLE" : The domain is not available for registration. Generally |
| 2595 | /// this means it is already registered to another party. |
| 2596 | /// - "UNSUPPORTED" : The domain is not currently supported by Cloud Domains, |
| 2597 | /// but may be available elsewhere. |
| 2598 | /// - "UNKNOWN" : Cloud Domains is unable to determine domain availability, |
| 2599 | /// generally due to system maintenance at the domain name registry. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2600 | core.String? availability; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2601 | |
| 2602 | /// The domain name. |
| 2603 | /// |
| 2604 | /// Unicode domain names are expressed in Punycode format. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2605 | core.String? domainName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2606 | |
| 2607 | /// Notices about special properties of the domain. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2608 | core.List<core.String>? domainNotices; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2609 | |
| 2610 | /// Contact privacy options that the domain supports. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2611 | core.List<core.String>? supportedPrivacy; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2612 | |
| 2613 | /// Price to register or renew the domain for one year. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2614 | Money? yearlyPrice; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2615 | |
| 2616 | RegisterParameters(); |
| 2617 | |
| 2618 | RegisterParameters.fromJson(core.Map _json) { |
| 2619 | if (_json.containsKey('availability')) { |
| 2620 | availability = _json['availability'] as core.String; |
| 2621 | } |
| 2622 | if (_json.containsKey('domainName')) { |
| 2623 | domainName = _json['domainName'] as core.String; |
| 2624 | } |
| 2625 | if (_json.containsKey('domainNotices')) { |
| 2626 | domainNotices = (_json['domainNotices'] as core.List) |
| 2627 | .map<core.String>((value) => value as core.String) |
| 2628 | .toList(); |
| 2629 | } |
| 2630 | if (_json.containsKey('supportedPrivacy')) { |
| 2631 | supportedPrivacy = (_json['supportedPrivacy'] as core.List) |
| 2632 | .map<core.String>((value) => value as core.String) |
| 2633 | .toList(); |
| 2634 | } |
| 2635 | if (_json.containsKey('yearlyPrice')) { |
| 2636 | yearlyPrice = Money.fromJson( |
| 2637 | _json['yearlyPrice'] as core.Map<core.String, core.dynamic>); |
| 2638 | } |
| 2639 | } |
| 2640 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2641 | core.Map<core.String, core.Object?> toJson() => { |
| 2642 | if (availability != null) 'availability': availability!, |
| 2643 | if (domainName != null) 'domainName': domainName!, |
| 2644 | if (domainNotices != null) 'domainNotices': domainNotices!, |
| 2645 | if (supportedPrivacy != null) 'supportedPrivacy': supportedPrivacy!, |
| 2646 | if (yearlyPrice != null) 'yearlyPrice': yearlyPrice!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2647 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2648 | } |
| 2649 | |
| 2650 | /// The `Registration` resource facilitates managing and configuring domain name |
| 2651 | /// registrations. |
| 2652 | /// |
| 2653 | /// To create a new `Registration` resource, find a suitable domain name by |
| 2654 | /// calling the `SearchDomains` method with a query to see available domain name |
| 2655 | /// options. After choosing a name, call `RetrieveRegisterParameters` to ensure |
| 2656 | /// availability and obtain information like pricing, which is needed to build a |
| 2657 | /// call to `RegisterDomain`. |
| 2658 | class Registration { |
| 2659 | /// Settings for contact information linked to the `Registration`. |
| 2660 | /// |
| 2661 | /// You cannot update these with the `UpdateRegistration` method. To update |
| 2662 | /// these settings, use the `ConfigureContactSettings` method. |
| 2663 | /// |
| 2664 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2665 | ContactSettings? contactSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2666 | |
| 2667 | /// The creation timestamp of the `Registration` resource. |
| 2668 | /// |
| 2669 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2670 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2671 | |
| 2672 | /// Settings controlling the DNS configuration of the `Registration`. |
| 2673 | /// |
| 2674 | /// You cannot update these with the `UpdateRegistration` method. To update |
| 2675 | /// these settings, use the `ConfigureDnsSettings` method. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2676 | DnsSettings? dnsSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2677 | |
| 2678 | /// The domain name. |
| 2679 | /// |
| 2680 | /// Unicode domain names must be expressed in Punycode format. |
| 2681 | /// |
| 2682 | /// Required. Immutable. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2683 | core.String? domainName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2684 | |
| 2685 | /// The expiration timestamp of the `Registration`. |
| 2686 | /// |
| 2687 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2688 | core.String? expireTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2689 | |
| 2690 | /// The set of issues with the `Registration` that require attention. |
| 2691 | /// |
| 2692 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2693 | core.List<core.String>? issues; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2694 | |
| 2695 | /// Set of labels associated with the `Registration`. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2696 | core.Map<core.String, core.String>? labels; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2697 | |
| 2698 | /// Settings for management of the `Registration`, including renewal, billing, |
| 2699 | /// and transfer. |
| 2700 | /// |
| 2701 | /// You cannot update these with the `UpdateRegistration` method. To update |
| 2702 | /// these settings, use the `ConfigureManagementSettings` method. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2703 | ManagementSettings? managementSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2704 | |
| 2705 | /// Name of the `Registration` resource, in the format `projects / * |
| 2706 | /// /locations / * /registrations/`. |
| 2707 | /// |
| 2708 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2709 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2710 | |
| 2711 | /// Pending contact settings for the `Registration`. |
| 2712 | /// |
| 2713 | /// Updates to the `contact_settings` field that change its |
| 2714 | /// `registrant_contact` or `privacy` fields require email confirmation by the |
| 2715 | /// `registrant_contact` before taking effect. This field is set only if there |
| 2716 | /// are pending updates to the `contact_settings` that have not yet been |
| 2717 | /// confirmed. To confirm the changes, the `registrant_contact` must follow |
| 2718 | /// the instructions in the email they receive. |
| 2719 | /// |
| 2720 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2721 | ContactSettings? pendingContactSettings; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2722 | |
| 2723 | /// The state of the `Registration` |
| 2724 | /// |
| 2725 | /// Output only. |
| 2726 | /// Possible string values are: |
| 2727 | /// - "STATE_UNSPECIFIED" : The state is undefined. |
| 2728 | /// - "REGISTRATION_PENDING" : The domain is being registered. |
| 2729 | /// - "REGISTRATION_FAILED" : The domain registration failed. You can delete |
| 2730 | /// resources in this state to allow registration to be retried. |
| 2731 | /// - "ACTIVE" : The domain is registered and operational. The domain renews |
| 2732 | /// automatically as long as it remains in this state. |
| 2733 | /// - "SUSPENDED" : The domain is suspended and inoperative. For more details, |
| 2734 | /// see the `issues` field. |
| 2735 | /// - "EXPORTED" : The domain has been exported from Cloud Domains to |
| 2736 | /// [Google Domains](https://domains.google/). You can no longer update it |
| 2737 | /// with this API, and information shown about it may be stale. Without |
| 2738 | /// further action, domains in this state expire at their `expire_time`. You |
| 2739 | /// can delete the resource after the `expire_time` has passed. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2740 | core.String? state; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2741 | |
| 2742 | /// Set of options for the `contact_settings.privacy` field that this |
| 2743 | /// `Registration` supports. |
| 2744 | /// |
| 2745 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2746 | core.List<core.String>? supportedPrivacy; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2747 | |
| 2748 | Registration(); |
| 2749 | |
| 2750 | Registration.fromJson(core.Map _json) { |
| 2751 | if (_json.containsKey('contactSettings')) { |
| 2752 | contactSettings = ContactSettings.fromJson( |
| 2753 | _json['contactSettings'] as core.Map<core.String, core.dynamic>); |
| 2754 | } |
| 2755 | if (_json.containsKey('createTime')) { |
| 2756 | createTime = _json['createTime'] as core.String; |
| 2757 | } |
| 2758 | if (_json.containsKey('dnsSettings')) { |
| 2759 | dnsSettings = DnsSettings.fromJson( |
| 2760 | _json['dnsSettings'] as core.Map<core.String, core.dynamic>); |
| 2761 | } |
| 2762 | if (_json.containsKey('domainName')) { |
| 2763 | domainName = _json['domainName'] as core.String; |
| 2764 | } |
| 2765 | if (_json.containsKey('expireTime')) { |
| 2766 | expireTime = _json['expireTime'] as core.String; |
| 2767 | } |
| 2768 | if (_json.containsKey('issues')) { |
| 2769 | issues = (_json['issues'] as core.List) |
| 2770 | .map<core.String>((value) => value as core.String) |
| 2771 | .toList(); |
| 2772 | } |
| 2773 | if (_json.containsKey('labels')) { |
| 2774 | labels = |
| 2775 | (_json['labels'] as core.Map).cast<core.String, core.String>().map( |
| 2776 | (key, item) => core.MapEntry( |
| 2777 | key, |
| 2778 | item as core.String, |
| 2779 | ), |
| 2780 | ); |
| 2781 | } |
| 2782 | if (_json.containsKey('managementSettings')) { |
| 2783 | managementSettings = ManagementSettings.fromJson( |
| 2784 | _json['managementSettings'] as core.Map<core.String, core.dynamic>); |
| 2785 | } |
| 2786 | if (_json.containsKey('name')) { |
| 2787 | name = _json['name'] as core.String; |
| 2788 | } |
| 2789 | if (_json.containsKey('pendingContactSettings')) { |
| 2790 | pendingContactSettings = ContactSettings.fromJson( |
| 2791 | _json['pendingContactSettings'] |
| 2792 | as core.Map<core.String, core.dynamic>); |
| 2793 | } |
| 2794 | if (_json.containsKey('state')) { |
| 2795 | state = _json['state'] as core.String; |
| 2796 | } |
| 2797 | if (_json.containsKey('supportedPrivacy')) { |
| 2798 | supportedPrivacy = (_json['supportedPrivacy'] as core.List) |
| 2799 | .map<core.String>((value) => value as core.String) |
| 2800 | .toList(); |
| 2801 | } |
| 2802 | } |
| 2803 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2804 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2805 | if (contactSettings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2806 | 'contactSettings': contactSettings!.toJson(), |
| 2807 | if (createTime != null) 'createTime': createTime!, |
| 2808 | if (dnsSettings != null) 'dnsSettings': dnsSettings!.toJson(), |
| 2809 | if (domainName != null) 'domainName': domainName!, |
| 2810 | if (expireTime != null) 'expireTime': expireTime!, |
| 2811 | if (issues != null) 'issues': issues!, |
| 2812 | if (labels != null) 'labels': labels!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2813 | if (managementSettings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2814 | 'managementSettings': managementSettings!.toJson(), |
| 2815 | if (name != null) 'name': name!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2816 | if (pendingContactSettings != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2817 | 'pendingContactSettings': pendingContactSettings!.toJson(), |
| 2818 | if (state != null) 'state': state!, |
| 2819 | if (supportedPrivacy != null) 'supportedPrivacy': supportedPrivacy!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2820 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2821 | } |
| 2822 | |
| 2823 | /// Request for the `ResetAuthorizationCode` method. |
| 2824 | class ResetAuthorizationCodeRequest { |
| 2825 | ResetAuthorizationCodeRequest(); |
| 2826 | |
| 2827 | ResetAuthorizationCodeRequest.fromJson( |
| 2828 | // ignore: avoid_unused_constructor_parameters |
| 2829 | core.Map _json); |
| 2830 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2831 | core.Map<core.String, core.Object?> toJson() => {}; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2832 | } |
| 2833 | |
| 2834 | /// Response for the `RetrieveRegisterParameters` method. |
| 2835 | class RetrieveRegisterParametersResponse { |
| 2836 | /// Parameters to use when calling the `RegisterDomain` method. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2837 | RegisterParameters? registerParameters; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2838 | |
| 2839 | RetrieveRegisterParametersResponse(); |
| 2840 | |
| 2841 | RetrieveRegisterParametersResponse.fromJson(core.Map _json) { |
| 2842 | if (_json.containsKey('registerParameters')) { |
| 2843 | registerParameters = RegisterParameters.fromJson( |
| 2844 | _json['registerParameters'] as core.Map<core.String, core.dynamic>); |
| 2845 | } |
| 2846 | } |
| 2847 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2848 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2849 | if (registerParameters != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2850 | 'registerParameters': registerParameters!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2851 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2852 | } |
| 2853 | |
| 2854 | /// Response for the `SearchDomains` method. |
| 2855 | class SearchDomainsResponse { |
| 2856 | /// Results of the domain name search. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2857 | core.List<RegisterParameters>? registerParameters; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2858 | |
| 2859 | SearchDomainsResponse(); |
| 2860 | |
| 2861 | SearchDomainsResponse.fromJson(core.Map _json) { |
| 2862 | if (_json.containsKey('registerParameters')) { |
| 2863 | registerParameters = (_json['registerParameters'] as core.List) |
| 2864 | .map<RegisterParameters>((value) => RegisterParameters.fromJson( |
| 2865 | value as core.Map<core.String, core.dynamic>)) |
| 2866 | .toList(); |
| 2867 | } |
| 2868 | } |
| 2869 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2870 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2871 | if (registerParameters != null) |
| 2872 | 'registerParameters': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2873 | registerParameters!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2874 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2875 | } |
| 2876 | |
| 2877 | /// Request message for `SetIamPolicy` method. |
| 2878 | class SetIamPolicyRequest { |
| 2879 | /// REQUIRED: The complete policy to be applied to the `resource`. |
| 2880 | /// |
| 2881 | /// The size of the policy is limited to a few 10s of KB. An empty policy is a |
| 2882 | /// valid policy but certain Cloud Platform services (such as Projects) might |
| 2883 | /// reject them. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2884 | Policy? policy; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2885 | |
| 2886 | /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. |
| 2887 | /// |
| 2888 | /// Only the fields in the mask will be modified. If no mask is provided, the |
| 2889 | /// following default mask is used: `paths: "bindings, etag"` |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2890 | core.String? updateMask; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2891 | |
| 2892 | SetIamPolicyRequest(); |
| 2893 | |
| 2894 | SetIamPolicyRequest.fromJson(core.Map _json) { |
| 2895 | if (_json.containsKey('policy')) { |
| 2896 | policy = Policy.fromJson( |
| 2897 | _json['policy'] as core.Map<core.String, core.dynamic>); |
| 2898 | } |
| 2899 | if (_json.containsKey('updateMask')) { |
| 2900 | updateMask = _json['updateMask'] as core.String; |
| 2901 | } |
| 2902 | } |
| 2903 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2904 | core.Map<core.String, core.Object?> toJson() => { |
| 2905 | if (policy != null) 'policy': policy!.toJson(), |
| 2906 | if (updateMask != null) 'updateMask': updateMask!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2907 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2908 | } |
| 2909 | |
| 2910 | /// The `Status` type defines a logical error model that is suitable for |
| 2911 | /// different programming environments, including REST APIs and RPC APIs. |
| 2912 | /// |
| 2913 | /// It is used by [gRPC](https://github.com/grpc). Each `Status` message |
| 2914 | /// contains three pieces of data: error code, error message, and error details. |
| 2915 | /// You can find out more about this error model and how to work with it in the |
| 2916 | /// [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 2917 | class Status { |
| 2918 | /// The status code, which should be an enum value of google.rpc.Code. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2919 | core.int? code; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2920 | |
| 2921 | /// A list of messages that carry the error details. |
| 2922 | /// |
| 2923 | /// There is a common set of message types for APIs to use. |
| 2924 | /// |
| 2925 | /// The values for Object must be JSON objects. It can consist of `num`, |
| 2926 | /// `String`, `bool` and `null` as well as `Map` and `List` values. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2927 | core.List<core.Map<core.String, core.Object>>? details; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2928 | |
| 2929 | /// A developer-facing error message, which should be in English. |
| 2930 | /// |
| 2931 | /// Any user-facing error message should be localized and sent in the |
| 2932 | /// google.rpc.Status.details field, or localized by the client. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2933 | core.String? message; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2934 | |
| 2935 | Status(); |
| 2936 | |
| 2937 | Status.fromJson(core.Map _json) { |
| 2938 | if (_json.containsKey('code')) { |
| 2939 | code = _json['code'] as core.int; |
| 2940 | } |
| 2941 | if (_json.containsKey('details')) { |
| 2942 | details = (_json['details'] as core.List) |
| 2943 | .map<core.Map<core.String, core.Object>>((value) => |
| 2944 | (value as core.Map).cast<core.String, core.Object>().map( |
| 2945 | (key, item) => core.MapEntry( |
| 2946 | key, |
| 2947 | item as core.Object, |
| 2948 | ), |
| 2949 | )) |
| 2950 | .toList(); |
| 2951 | } |
| 2952 | if (_json.containsKey('message')) { |
| 2953 | message = _json['message'] as core.String; |
| 2954 | } |
| 2955 | } |
| 2956 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2957 | core.Map<core.String, core.Object?> toJson() => { |
| 2958 | if (code != null) 'code': code!, |
| 2959 | if (details != null) 'details': details!, |
| 2960 | if (message != null) 'message': message!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2961 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2962 | } |
| 2963 | |
| 2964 | /// Request message for `TestIamPermissions` method. |
| 2965 | class TestIamPermissionsRequest { |
| 2966 | /// The set of permissions to check for the `resource`. |
| 2967 | /// |
| 2968 | /// Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |
| 2969 | /// For more information see |
| 2970 | /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2971 | core.List<core.String>? permissions; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2972 | |
| 2973 | TestIamPermissionsRequest(); |
| 2974 | |
| 2975 | TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 2976 | if (_json.containsKey('permissions')) { |
| 2977 | permissions = (_json['permissions'] as core.List) |
| 2978 | .map<core.String>((value) => value as core.String) |
| 2979 | .toList(); |
| 2980 | } |
| 2981 | } |
| 2982 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2983 | core.Map<core.String, core.Object?> toJson() => { |
| 2984 | if (permissions != null) 'permissions': permissions!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2985 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2986 | } |
| 2987 | |
| 2988 | /// Response message for `TestIamPermissions` method. |
| 2989 | class TestIamPermissionsResponse { |
| 2990 | /// A subset of `TestPermissionsRequest.permissions` that the caller is |
| 2991 | /// allowed. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2992 | core.List<core.String>? permissions; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2993 | |
| 2994 | TestIamPermissionsResponse(); |
| 2995 | |
| 2996 | TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 2997 | if (_json.containsKey('permissions')) { |
| 2998 | permissions = (_json['permissions'] as core.List) |
| 2999 | .map<core.String>((value) => value as core.String) |
| 3000 | .toList(); |
| 3001 | } |
| 3002 | } |
| 3003 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3004 | core.Map<core.String, core.Object?> toJson() => { |
| 3005 | if (permissions != null) 'permissions': permissions!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3006 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3007 | } |