blob: e41f391e3806f94a3f1e8278a4fb017f3860571a [file] [edit]
// Copyright 2022 Google LLC
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: doc_directive_unknown
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unintended_html_in_doc_comment
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_string_interpolations
/// Certificate Manager API - v1
///
/// For more information, see
/// <https://docs.cloud.google.com/certificate-manager/docs/overview>
///
/// Create an instance of [CertificateManagerApi] to access these resources:
///
/// - [ProjectsResource]
/// - [ProjectsLocationsResource]
/// - [ProjectsLocationsCertificateIssuanceConfigsResource]
/// - [ProjectsLocationsCertificateMapsResource]
/// - [ProjectsLocationsCertificateMapsCertificateMapEntriesResource]
/// - [ProjectsLocationsCertificatesResource]
/// - [ProjectsLocationsDnsAuthorizationsResource]
/// - [ProjectsLocationsOperationsResource]
/// - [ProjectsLocationsTrustConfigsResource]
library;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
class CertificateManagerApi {
/// See, edit, configure, and delete your Google Cloud data and see the email
/// address for your Google Account.
static const cloudPlatformScope =
'https://www.googleapis.com/auth/cloud-platform';
final commons.ApiRequester _requester;
ProjectsResource get projects => ProjectsResource(_requester);
CertificateManagerApi(
http.Client client, {
core.String rootUrl = 'https://certificatemanager.googleapis.com/',
core.String servicePath = '',
}) : _requester = commons.ApiRequester(
client,
rootUrl,
servicePath,
requestHeaders,
);
}
class ProjectsResource {
final commons.ApiRequester _requester;
ProjectsLocationsResource get locations =>
ProjectsLocationsResource(_requester);
ProjectsResource(commons.ApiRequester client) : _requester = client;
}
class ProjectsLocationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsCertificateIssuanceConfigsResource
get certificateIssuanceConfigs =>
ProjectsLocationsCertificateIssuanceConfigsResource(_requester);
ProjectsLocationsCertificateMapsResource get certificateMaps =>
ProjectsLocationsCertificateMapsResource(_requester);
ProjectsLocationsCertificatesResource get certificates =>
ProjectsLocationsCertificatesResource(_requester);
ProjectsLocationsDnsAuthorizationsResource get dnsAuthorizations =>
ProjectsLocationsDnsAuthorizationsResource(_requester);
ProjectsLocationsOperationsResource get operations =>
ProjectsLocationsOperationsResource(_requester);
ProjectsLocationsTrustConfigsResource get trustConfigs =>
ProjectsLocationsTrustConfigsResource(_requester);
ProjectsLocationsResource(commons.ApiRequester client) : _requester = client;
/// Gets information about a location.
///
/// Request parameters:
///
/// [name] - Resource name for the location.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Location].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Location> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Location.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists information about the supported locations for this service.
///
/// This method lists locations based on the resource scope provided in the
/// \[ListLocationsRequest.name\] field: * **Global locations**: If `name` is
/// empty, the method lists the public locations available to all projects. *
/// **Project-specific locations**: If `name` follows the format
/// `projects/{project}`, the method lists locations visible to that specific
/// project. This includes public, private, or other project-specific
/// locations enabled for the project. For gRPC and client library
/// implementations, the resource name is passed as the `name` field. For
/// direct service calls, the resource name is incorporated into the request
/// path based on the specific service implementation and version.
///
/// Request parameters:
///
/// [name] - The resource that owns the locations collection, if applicable.
/// Value must have pattern `^projects/\[^/\]+$`.
///
/// [extraLocationTypes] - Optional. Do not use this field. It is unsupported
/// and is ignored unless explicitly documented otherwise. This is primarily
/// for internal usage.
///
/// [filter] - A filter to narrow down results to a preferred subset. The
/// filtering language accepts strings like `"displayName=tokyo"`, and is
/// documented in more detail in \[AIP-160\](https://google.aip.dev/160).
///
/// [pageSize] - The maximum number of results to return. If not set, the
/// service selects a default.
///
/// [pageToken] - A page token received from the `next_page_token` field in
/// the response. Send that page token to receive the subsequent page.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLocationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLocationsResponse> list(
core.String name, {
core.List<core.String>? extraLocationTypes,
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'extraLocationTypes': ?extraLocationTypes,
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/locations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class ProjectsLocationsCertificateIssuanceConfigsResource {
final commons.ApiRequester _requester;
ProjectsLocationsCertificateIssuanceConfigsResource(
commons.ApiRequester client,
) : _requester = client;
/// Creates a new CertificateIssuanceConfig in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the certificate issuance
/// config. Must be in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [certificateIssuanceConfigId] - Required. A user-provided name of the
/// certificate config.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
CertificateIssuanceConfig request,
core.String parent, {
core.String? certificateIssuanceConfigId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'certificateIssuanceConfigId': ?certificateIssuanceConfigId == null
? null
: [certificateIssuanceConfigId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/certificateIssuanceConfigs';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single CertificateIssuanceConfig.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate issuance config to delete.
/// Must be in the format `projects / * /locations / *
/// /certificateIssuanceConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateIssuanceConfigs/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single CertificateIssuanceConfig.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate issuance config to describe.
/// Must be in the format `projects / * /locations / *
/// /certificateIssuanceConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateIssuanceConfigs/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [CertificateIssuanceConfig].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<CertificateIssuanceConfig> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return CertificateIssuanceConfig.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists CertificateIssuanceConfigs in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the certificate
/// should be listed, specified in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the Certificates
/// Configs returned.
///
/// [orderBy] - Optional. A list of Certificate Config field names used to
/// specify the order of the returned results. The default sorting order is
/// ascending. To specify descending order for a field, add a suffix `"
/// desc"`.
///
/// [pageSize] - Optional. Maximum number of certificate configs to return per
/// call.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListCertificateIssuanceConfigsResponse`. Indicates that this is a
/// continuation of a prior `ListCertificateIssuanceConfigs` call, and that
/// the system should return the next page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCertificateIssuanceConfigsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCertificateIssuanceConfigsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/certificateIssuanceConfigs';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCertificateIssuanceConfigsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a CertificateIssuanceConfig.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the certificate issuance
/// config. CertificateIssuanceConfig names must be unique globally and match
/// pattern `projects / * /locations / * /certificateIssuanceConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateIssuanceConfigs/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
CertificateIssuanceConfig request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsCertificateMapsResource {
final commons.ApiRequester _requester;
ProjectsLocationsCertificateMapsCertificateMapEntriesResource
get certificateMapEntries =>
ProjectsLocationsCertificateMapsCertificateMapEntriesResource(_requester);
ProjectsLocationsCertificateMapsResource(commons.ApiRequester client)
: _requester = client;
/// Creates a new CertificateMap in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the certificate map. Must be
/// in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [certificateMapId] - Required. A user-provided name of the certificate
/// map.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
CertificateMap request,
core.String parent, {
core.String? certificateMapId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'certificateMapId': ?certificateMapId == null ? null : [certificateMapId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/certificateMaps';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single CertificateMap.
///
/// A Certificate Map can't be deleted if it contains Certificate Map Entries.
/// Remove all the entries from the map before calling this method.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate map to delete. Must be in the
/// format `projects / * /locations / * /certificateMaps / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single CertificateMap.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate map to describe. Must be in
/// the format `projects / * /locations / * /certificateMaps / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [CertificateMap].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<CertificateMap> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return CertificateMap.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists CertificateMaps in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the certificate
/// maps should be listed, specified in the format `projects / * /locations /
/// * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the Certificates Maps
/// returned.
///
/// [orderBy] - Optional. A list of Certificate Map field names used to
/// specify the order of the returned results. The default sorting order is
/// ascending. To specify descending order for a field, add a suffix `"
/// desc"`.
///
/// [pageSize] - Optional. Maximum number of certificate maps to return per
/// call.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListCertificateMapsResponse`. Indicates that this is a continuation of a
/// prior `ListCertificateMaps` call, and that the system should return the
/// next page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCertificateMapsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCertificateMapsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/certificateMaps';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCertificateMapsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a CertificateMap.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the Certificate Map.
/// Certificate Map names must be unique globally and match pattern `projects
/// / * /locations / * /certificateMaps / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
CertificateMap request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsCertificateMapsCertificateMapEntriesResource {
final commons.ApiRequester _requester;
ProjectsLocationsCertificateMapsCertificateMapEntriesResource(
commons.ApiRequester client,
) : _requester = client;
/// Creates a new CertificateMapEntry in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the certificate map entry.
/// Must be in the format `projects / * /locations / * /certificateMaps / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+$`.
///
/// [certificateMapEntryId] - Required. A user-provided name of the
/// certificate map entry.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
CertificateMapEntry request,
core.String parent, {
core.String? certificateMapEntryId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'certificateMapEntryId': ?certificateMapEntryId == null
? null
: [certificateMapEntryId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/certificateMapEntries';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single CertificateMapEntry.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate map entry to delete. Must be
/// in the format `projects / * /locations / * /certificateMaps / *
/// /certificateMapEntries / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+/certificateMapEntries/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single CertificateMapEntry.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate map entry to describe. Must
/// be in the format `projects / * /locations / * /certificateMaps / *
/// /certificateMapEntries / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+/certificateMapEntries/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [CertificateMapEntry].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<CertificateMapEntry> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return CertificateMapEntry.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists CertificateMapEntries in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project, location and certificate map from which
/// the certificate map entries should be listed, specified in the format
/// `projects / * /locations / * /certificateMaps / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the returned
/// Certificate Map Entries.
///
/// [orderBy] - Optional. A list of Certificate Map Entry field names used to
/// specify the order of the returned results. The default sorting order is
/// ascending. To specify descending order for a field, add a suffix `"
/// desc"`.
///
/// [pageSize] - Optional. Maximum number of certificate map entries to
/// return. The service may return fewer than this value. If unspecified, at
/// most 50 certificate map entries will be returned. The maximum value is
/// 1000; values above 1000 will be coerced to 1000.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListCertificateMapEntriesResponse`. Indicates that this is a continuation
/// of a prior `ListCertificateMapEntries` call, and that the system should
/// return the next page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCertificateMapEntriesResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCertificateMapEntriesResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/certificateMapEntries';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCertificateMapEntriesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a CertificateMapEntry.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the Certificate Map Entry.
/// Certificate Map Entry names must be unique globally and match pattern
/// `projects / * /locations / * /certificateMaps / * /certificateMapEntries /
/// * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificateMaps/\[^/\]+/certificateMapEntries/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
CertificateMapEntry request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsCertificatesResource {
final commons.ApiRequester _requester;
ProjectsLocationsCertificatesResource(commons.ApiRequester client)
: _requester = client;
/// Creates a new Certificate in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the certificate. Must be in
/// the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [certificateId] - Required. A user-provided name of the certificate.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
Certificate request,
core.String parent, {
core.String? certificateId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'certificateId': ?certificateId == null ? null : [certificateId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/certificates';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single Certificate.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate to delete. Must be in the
/// format `projects / * /locations / * /certificates / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificates/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single Certificate.
///
/// Request parameters:
///
/// [name] - Required. A name of the certificate to describe. Must be in the
/// format `projects / * /locations / * /certificates / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificates/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Certificate].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Certificate> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Certificate.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists Certificates in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the certificate
/// should be listed, specified in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the Certificates
/// returned.
///
/// [orderBy] - Optional. A list of Certificate field names used to specify
/// the order of the returned results. The default sorting order is ascending.
/// To specify descending order for a field, add a suffix `" desc"`.
///
/// [pageSize] - Optional. Maximum number of certificates to return per call.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListCertificatesResponse`. Indicates that this is a continuation of a
/// prior `ListCertificates` call, and that the system should return the next
/// page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCertificatesResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCertificatesResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/certificates';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCertificatesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a Certificate.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the certificate. Certificate
/// names must be unique globally and match pattern `projects / * /locations /
/// * /certificates / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/certificates/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
Certificate request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsDnsAuthorizationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsDnsAuthorizationsResource(commons.ApiRequester client)
: _requester = client;
/// Creates a new DnsAuthorization in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the dns authorization. Must be
/// in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [dnsAuthorizationId] - Required. A user-provided name of the dns
/// authorization.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
DnsAuthorization request,
core.String parent, {
core.String? dnsAuthorizationId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'dnsAuthorizationId': ?dnsAuthorizationId == null
? null
: [dnsAuthorizationId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/dnsAuthorizations';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single DnsAuthorization.
///
/// Request parameters:
///
/// [name] - Required. A name of the dns authorization to delete. Must be in
/// the format `projects / * /locations / * /dnsAuthorizations / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/dnsAuthorizations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single DnsAuthorization.
///
/// Request parameters:
///
/// [name] - Required. A name of the dns authorization to describe. Must be in
/// the format `projects / * /locations / * /dnsAuthorizations / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/dnsAuthorizations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [DnsAuthorization].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<DnsAuthorization> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DnsAuthorization.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists DnsAuthorizations in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the dns
/// authorizations should be listed, specified in the format `projects / *
/// /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the Dns Authorizations
/// returned.
///
/// [orderBy] - Optional. A list of Dns Authorization field names used to
/// specify the order of the returned results. The default sorting order is
/// ascending. To specify descending order for a field, add a suffix `"
/// desc"`.
///
/// [pageSize] - Optional. Maximum number of dns authorizations to return per
/// call.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListDnsAuthorizationsResponse`. Indicates that this is a continuation of
/// a prior `ListDnsAuthorizations` call, and that the system should return
/// the next page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListDnsAuthorizationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListDnsAuthorizationsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/dnsAuthorizations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListDnsAuthorizationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a DnsAuthorization.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the dns authorization.
/// DnsAuthorization names must be unique globally and match pattern `projects
/// / * /locations / * /dnsAuthorizations / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/dnsAuthorizations/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
DnsAuthorization request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsOperationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResource(commons.ApiRequester client)
: _requester = client;
/// Starts asynchronous cancellation on a long-running operation.
///
/// The server makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation
/// or other methods to check whether the cancellation succeeded or whether
/// the operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with an
/// Operation.error value with a google.rpc.Status.code of `1`, corresponding
/// to `Code.CANCELLED`.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The name of the operation resource to be cancelled.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> cancel(
CancelOperationRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':cancel';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a long-running operation.
///
/// This method indicates that the client is no longer interested in the
/// operation result. It does not cancel the operation. If the server doesn't
/// support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation resource to be deleted.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets the latest state of a long-running operation.
///
/// Clients can use this method to poll the operation result at intervals as
/// recommended by the API service.
///
/// Request parameters:
///
/// [name] - The name of the operation resource.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists operations that match the specified filter in the request.
///
/// If the server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation's parent resource.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - The standard list filter.
///
/// [pageSize] - The standard list page size.
///
/// [pageToken] - The standard list page token.
///
/// [returnPartialSuccess] - When set to `true`, operations that are reachable
/// are returned as normal, and those that are unreachable are returned in the
/// ListOperationsResponse.unreachable field. This can only be `true` when
/// reading across collections. For example, when `parent` is set to
/// `"projects/example/locations/-"`. This field is not supported by default
/// and will result in an `UNIMPLEMENTED` error if set unless explicitly
/// documented otherwise in service or product specific documentation.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListOperationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListOperationsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.bool? returnPartialSuccess,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'returnPartialSuccess': ?returnPartialSuccess == null
? null
: ['${returnPartialSuccess}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/operations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListOperationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class ProjectsLocationsTrustConfigsResource {
final commons.ApiRequester _requester;
ProjectsLocationsTrustConfigsResource(commons.ApiRequester client)
: _requester = client;
/// Creates a new TrustConfig in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource of the TrustConfig. Must be in
/// the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [trustConfigId] - Required. A user-provided name of the TrustConfig. Must
/// match the regexp `[a-z0-9-]{1,63}`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> create(
TrustConfig request,
core.String parent, {
core.String? trustConfigId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'trustConfigId': ?trustConfigId == null ? null : [trustConfigId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/trustConfigs';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single TrustConfig.
///
/// Request parameters:
///
/// [name] - Required. A name of the TrustConfig to delete. Must be in the
/// format `projects / * /locations / * /trustConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/trustConfigs/\[^/\]+$`.
///
/// [etag] - Optional. The current etag of the TrustConfig. If an etag is
/// provided and does not match the current etag of the resource, deletion
/// will be blocked and an ABORTED error will be returned.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? etag,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'etag': ?etag == null ? null : [etag],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single TrustConfig.
///
/// Request parameters:
///
/// [name] - Required. A name of the TrustConfig to describe. Must be in the
/// format `projects / * /locations / * /trustConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/trustConfigs/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [TrustConfig].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<TrustConfig> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return TrustConfig.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists TrustConfigs in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the TrustConfigs
/// should be listed, specified in the format `projects / * /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filter expression to restrict the TrustConfigs
/// returned.
///
/// [orderBy] - Optional. A list of TrustConfig field names used to specify
/// the order of the returned results. The default sorting order is ascending.
/// To specify descending order for a field, add a suffix `" desc"`.
///
/// [pageSize] - Optional. Maximum number of TrustConfigs to return per call.
///
/// [pageToken] - Optional. The value returned by the last
/// `ListTrustConfigsResponse`. Indicates that this is a continuation of a
/// prior `ListTrustConfigs` call, and that the system should return the next
/// page of data.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListTrustConfigsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListTrustConfigsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/trustConfigs';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListTrustConfigsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a TrustConfig.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. A user-defined name of the trust config. TrustConfig
/// names must be unique globally and match pattern `projects / * /locations /
/// * /trustConfigs / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/trustConfigs/\[^/\]+$`.
///
/// [updateMask] - Required. The update mask applies to the resource. For the
/// `FieldMask` definition, see
/// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
TrustConfig request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
/// Defines an allowlisted certificate.
class AllowlistedCertificate {
/// PEM certificate that is allowlisted.
///
/// The certificate can be up to 5k bytes, and must be a parseable X.509
/// certificate.
///
/// Required.
core.String? pemCertificate;
AllowlistedCertificate({this.pemCertificate});
AllowlistedCertificate.fromJson(core.Map json_)
: this(pemCertificate: json_['pemCertificate'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final pemCertificate = this.pemCertificate;
return {'pemCertificate': ?pemCertificate};
}
}
/// State of the latest attempt to authorize a domain for certificate issuance.
class AuthorizationAttemptInfo {
/// The timestamp, when the authorization attempt was made.
///
/// Output only.
core.String? attemptTime;
/// Human readable explanation for reaching the state.
///
/// Provided to help address the configuration issues. Not guaranteed to be
/// stable. For programmatic access use FailureReason enum.
///
/// Output only.
core.String? details;
/// Domain name of the authorization attempt.
///
/// Output only.
core.String? domain;
/// Reason for failure of the authorization attempt for the domain.
///
/// Output only.
/// Possible string values are:
/// - "FAILURE_REASON_UNSPECIFIED" : FailureReason is unspecified.
/// - "CONFIG" : There was a problem with the user's DNS or load balancer
/// configuration for this domain.
/// - "CAA" : Certificate issuance forbidden by an explicit CAA record for the
/// domain or a failure to check CAA records for the domain.
/// - "RATE_LIMITED" : Reached a CA or internal rate-limit for the domain,
/// e.g. for certificates per top-level private domain.
core.String? failureReason;
/// State of the domain for managed certificate issuance.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : State is unspecified.
/// - "AUTHORIZING" : Certificate provisioning for this domain is under way.
/// Google Cloud will attempt to authorize the domain.
/// - "AUTHORIZED" : A managed certificate can be provisioned, no issues for
/// this domain.
/// - "FAILED" : Attempt to authorize the domain failed. This prevents the
/// Managed Certificate from being issued. See `failure_reason` and `details`
/// fields for more information.
core.String? state;
/// Troubleshooting information for the authorization attempt.
///
/// This field is only populated if the authorization attempt failed.
///
/// Output only.
Troubleshooting? troubleshooting;
AuthorizationAttemptInfo({
this.attemptTime,
this.details,
this.domain,
this.failureReason,
this.state,
this.troubleshooting,
});
AuthorizationAttemptInfo.fromJson(core.Map json_)
: this(
attemptTime: json_['attemptTime'] as core.String?,
details: json_['details'] as core.String?,
domain: json_['domain'] as core.String?,
failureReason: json_['failureReason'] as core.String?,
state: json_['state'] as core.String?,
troubleshooting: json_.containsKey('troubleshooting')
? Troubleshooting.fromJson(
json_['troubleshooting'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final attemptTime = this.attemptTime;
final details = this.details;
final domain = this.domain;
final failureReason = this.failureReason;
final state = this.state;
final troubleshooting = this.troubleshooting;
return {
'attemptTime': ?attemptTime,
'details': ?details,
'domain': ?domain,
'failureReason': ?failureReason,
'state': ?state,
'troubleshooting': ?troubleshooting,
};
}
}
/// CNAME troubleshooting information.
class CNAME {
/// The expected value of the CNAME record for the domain, equals to
/// `dns_resource_record.data` in the corresponding `DnsAuthorization`.
///
/// Output only.
core.String? expectedData;
/// The name of the CNAME record for the domain, equals to
/// `dns_resource_record.name` in the corresponding `DnsAuthorization`.
///
/// Output only.
core.String? name;
/// The resolved CNAME chain.
///
/// Empty list if the CNAME record for `CNAME.name` is not found. Otherwise
/// the first item is the value of the CNAME record for `CNAME.name`. If the
/// CNAME chain is longer, the second item is the value of the CNAME record
/// for the first item, and so on.
///
/// Output only.
core.List<core.String>? resolvedData;
CNAME({this.expectedData, this.name, this.resolvedData});
CNAME.fromJson(core.Map json_)
: this(
expectedData: json_['expectedData'] as core.String?,
name: json_['name'] as core.String?,
resolvedData: (json_['resolvedData'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final expectedData = this.expectedData;
final name = this.name;
final resolvedData = this.resolvedData;
return {
'expectedData': ?expectedData,
'name': ?name,
'resolvedData': ?resolvedData,
};
}
}
/// The request message for Operations.CancelOperation.
typedef CancelOperationRequest = $Empty;
/// Defines TLS certificate.
class Certificate {
/// The creation timestamp of a Certificate.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a certificate.
///
/// Optional.
core.String? description;
/// The expiry timestamp of a Certificate.
///
/// Output only.
core.String? expireTime;
/// Set of labels associated with a Certificate.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// If set, contains configuration and state of a managed certificate.
ManagedCertificate? managed;
/// If set, contains configuration and state of a managed identity
/// certificate.
ManagedIdentityCertificate? managedIdentity;
/// Identifier.
///
/// A user-defined name of the certificate. Certificate names must be unique
/// globally and match pattern `projects / * /locations / * /certificates / *
/// `.
core.String? name;
/// The PEM-encoded certificate chain.
///
/// Output only.
core.String? pemCertificate;
/// The list of Subject Alternative Names of dnsName type defined in the
/// certificate (see RFC 5280 4.2.1.6).
///
/// Managed certificates that haven't been provisioned yet have this field
/// populated with a value of the managed.domains field.
///
/// Output only.
core.List<core.String>? sanDnsnames;
/// The scope of the certificate.
///
/// Optional. Immutable.
/// Possible string values are:
/// - "DEFAULT" : Use the DEFAULT scope if you plan to use the certificate
/// with global external Application Load Balancer, global external proxy
/// Network Load Balancer, or any of the regional Google Cloud services.
/// - "EDGE_CACHE" : Use the EDGE_CACHE scope if you plan to use the
/// certificate with Media CDN. The certificates are served from Edge Points
/// of Presence. See https://cloud.google.com/vpc/docs/edge-locations.
/// - "ALL_REGIONS" : Use the ALL_REGIONS scope if you plan to use the
/// certificate with cross-region internal Application Load Balancer. The
/// certificates are served from all Google Cloud regions. See
/// https://cloud.google.com/compute/docs/regions-zones.
/// - "CLIENT_AUTH" : Associated with certificates used as client certificates
/// in Backend mTLS.
core.String? scope;
/// If set, defines data of a self-managed certificate.
SelfManagedCertificate? selfManaged;
/// The last update timestamp of a Certificate.
///
/// Output only.
core.String? updateTime;
/// The list of resources that use this Certificate.
///
/// Output only.
core.List<UsedBy>? usedBy;
Certificate({
this.createTime,
this.description,
this.expireTime,
this.labels,
this.managed,
this.managedIdentity,
this.name,
this.pemCertificate,
this.sanDnsnames,
this.scope,
this.selfManaged,
this.updateTime,
this.usedBy,
});
Certificate.fromJson(core.Map json_)
: this(
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
expireTime: json_['expireTime'] as core.String?,
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
managed: json_.containsKey('managed')
? ManagedCertificate.fromJson(
json_['managed'] as core.Map<core.String, core.dynamic>,
)
: null,
managedIdentity: json_.containsKey('managedIdentity')
? ManagedIdentityCertificate.fromJson(
json_['managedIdentity'] as core.Map<core.String, core.dynamic>,
)
: null,
name: json_['name'] as core.String?,
pemCertificate: json_['pemCertificate'] as core.String?,
sanDnsnames: (json_['sanDnsnames'] as core.List?)
?.map((value) => value as core.String)
.toList(),
scope: json_['scope'] as core.String?,
selfManaged: json_.containsKey('selfManaged')
? SelfManagedCertificate.fromJson(
json_['selfManaged'] as core.Map<core.String, core.dynamic>,
)
: null,
updateTime: json_['updateTime'] as core.String?,
usedBy: (json_['usedBy'] as core.List?)
?.map(
(value) =>
UsedBy.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final createTime = this.createTime;
final description = this.description;
final expireTime = this.expireTime;
final labels = this.labels;
final managed = this.managed;
final managedIdentity = this.managedIdentity;
final name = this.name;
final pemCertificate = this.pemCertificate;
final sanDnsnames = this.sanDnsnames;
final scope = this.scope;
final selfManaged = this.selfManaged;
final updateTime = this.updateTime;
final usedBy = this.usedBy;
return {
'createTime': ?createTime,
'description': ?description,
'expireTime': ?expireTime,
'labels': ?labels,
'managed': ?managed,
'managedIdentity': ?managedIdentity,
'name': ?name,
'pemCertificate': ?pemCertificate,
'sanDnsnames': ?sanDnsnames,
'scope': ?scope,
'selfManaged': ?selfManaged,
'updateTime': ?updateTime,
'usedBy': ?usedBy,
};
}
}
/// The CA that issues the workload certificate.
///
/// It includes CA address, type, authentication to CA service, etc.
class CertificateAuthorityConfig {
/// Defines a CertificateAuthorityServiceConfig.
CertificateAuthorityServiceConfig? certificateAuthorityServiceConfig;
CertificateAuthorityConfig({this.certificateAuthorityServiceConfig});
CertificateAuthorityConfig.fromJson(core.Map json_)
: this(
certificateAuthorityServiceConfig:
json_.containsKey('certificateAuthorityServiceConfig')
? CertificateAuthorityServiceConfig.fromJson(
json_['certificateAuthorityServiceConfig']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final certificateAuthorityServiceConfig =
this.certificateAuthorityServiceConfig;
return {
'certificateAuthorityServiceConfig': ?certificateAuthorityServiceConfig,
};
}
}
/// Contains information required to contact CA service.
class CertificateAuthorityServiceConfig {
/// A CA pool resource used to issue a certificate.
///
/// The CA pool string has a relative resource path following the form
/// "projects/{project}/locations/{location}/caPools/{ca_pool}".
///
/// Required.
core.String? caPool;
CertificateAuthorityServiceConfig({this.caPool});
CertificateAuthorityServiceConfig.fromJson(core.Map json_)
: this(caPool: json_['caPool'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final caPool = this.caPool;
return {'caPool': ?caPool};
}
}
/// CertificateIssuanceConfig specifies how to issue and manage a certificate.
class CertificateIssuanceConfig {
/// The CA that issues the workload certificate.
///
/// It includes the CA address, type, authentication to CA service, etc.
///
/// Required.
CertificateAuthorityConfig? certificateAuthorityConfig;
/// The creation timestamp of a CertificateIssuanceConfig.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a CertificateIssuanceConfig.
///
/// Optional.
core.String? description;
/// The key algorithm to use when generating the private key.
///
/// Required.
/// Possible string values are:
/// - "KEY_ALGORITHM_UNSPECIFIED" : Unspecified key algorithm.
/// - "RSA_2048" : Specifies RSA with a 2048-bit modulus.
/// - "ECDSA_P256" : Specifies ECDSA with curve P256.
core.String? keyAlgorithm;
/// Set of labels associated with a CertificateIssuanceConfig.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// Workload certificate lifetime requested.
///
/// Required.
core.String? lifetime;
/// Identifier.
///
/// A user-defined name of the certificate issuance config.
/// CertificateIssuanceConfig names must be unique globally and match pattern
/// `projects / * /locations / * /certificateIssuanceConfigs / * `.
core.String? name;
/// Specifies the percentage of elapsed time of the certificate lifetime to
/// wait before renewing the certificate.
///
/// Must be a number between 1-99, inclusive.
///
/// Required.
core.int? rotationWindowPercentage;
/// The last update timestamp of a CertificateIssuanceConfig.
///
/// Output only.
core.String? updateTime;
CertificateIssuanceConfig({
this.certificateAuthorityConfig,
this.createTime,
this.description,
this.keyAlgorithm,
this.labels,
this.lifetime,
this.name,
this.rotationWindowPercentage,
this.updateTime,
});
CertificateIssuanceConfig.fromJson(core.Map json_)
: this(
certificateAuthorityConfig:
json_.containsKey('certificateAuthorityConfig')
? CertificateAuthorityConfig.fromJson(
json_['certificateAuthorityConfig']
as core.Map<core.String, core.dynamic>,
)
: null,
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
keyAlgorithm: json_['keyAlgorithm'] as core.String?,
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
lifetime: json_['lifetime'] as core.String?,
name: json_['name'] as core.String?,
rotationWindowPercentage:
json_['rotationWindowPercentage'] as core.int?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final certificateAuthorityConfig = this.certificateAuthorityConfig;
final createTime = this.createTime;
final description = this.description;
final keyAlgorithm = this.keyAlgorithm;
final labels = this.labels;
final lifetime = this.lifetime;
final name = this.name;
final rotationWindowPercentage = this.rotationWindowPercentage;
final updateTime = this.updateTime;
return {
'certificateAuthorityConfig': ?certificateAuthorityConfig,
'createTime': ?createTime,
'description': ?description,
'keyAlgorithm': ?keyAlgorithm,
'labels': ?labels,
'lifetime': ?lifetime,
'name': ?name,
'rotationWindowPercentage': ?rotationWindowPercentage,
'updateTime': ?updateTime,
};
}
}
/// Defines a collection of certificate configurations.
class CertificateMap {
/// The creation timestamp of a Certificate Map.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a certificate map.
///
/// Optional.
core.String? description;
/// A list of GCLB targets that use this Certificate Map.
///
/// A Target Proxy is only present on this list if it's attached to a
/// Forwarding Rule.
///
/// Output only.
core.List<GclbTarget>? gclbTargets;
/// Set of labels associated with a Certificate Map.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// Identifier.
///
/// A user-defined name of the Certificate Map. Certificate Map names must be
/// unique globally and match pattern `projects / * /locations / *
/// /certificateMaps / * `.
core.String? name;
/// The update timestamp of a Certificate Map.
///
/// Output only.
core.String? updateTime;
CertificateMap({
this.createTime,
this.description,
this.gclbTargets,
this.labels,
this.name,
this.updateTime,
});
CertificateMap.fromJson(core.Map json_)
: this(
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
gclbTargets: (json_['gclbTargets'] as core.List?)
?.map(
(value) => GclbTarget.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
name: json_['name'] as core.String?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final createTime = this.createTime;
final description = this.description;
final gclbTargets = this.gclbTargets;
final labels = this.labels;
final name = this.name;
final updateTime = this.updateTime;
return {
'createTime': ?createTime,
'description': ?description,
'gclbTargets': ?gclbTargets,
'labels': ?labels,
'name': ?name,
'updateTime': ?updateTime,
};
}
}
/// Defines a certificate map entry.
class CertificateMapEntry {
/// A set of Certificates defines for the given `hostname`.
///
/// There can be defined up to four certificates in each Certificate Map
/// Entry. Each certificate must match pattern `projects / * /locations / *
/// /certificates / * `.
///
/// Optional.
core.List<core.String>? certificates;
/// The creation timestamp of a Certificate Map Entry.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a certificate map entry.
///
/// Optional.
core.String? description;
/// A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
/// (`*.example.com`) for a set of hostnames with common suffix.
///
/// Used as Server Name Indication (SNI) for selecting a proper certificate.
core.String? hostname;
/// Set of labels associated with a Certificate Map Entry.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// A predefined matcher for particular cases, other than SNI selection.
/// Possible string values are:
/// - "MATCHER_UNSPECIFIED" : A matcher has't been recognized.
/// - "PRIMARY" : A primary certificate that is served when SNI wasn't
/// specified in the request or SNI couldn't be found in the map.
core.String? matcher;
/// Identifier.
///
/// A user-defined name of the Certificate Map Entry. Certificate Map Entry
/// names must be unique globally and match pattern `projects / * /locations /
/// * /certificateMaps / * /certificateMapEntries / * `.
core.String? name;
/// A serving state of this Certificate Map Entry.
///
/// Output only.
/// Possible string values are:
/// - "SERVING_STATE_UNSPECIFIED" : The status is undefined.
/// - "ACTIVE" : The configuration is serving.
/// - "PENDING" : Update is in progress. Some frontends may serve this
/// configuration.
core.String? state;
/// The update timestamp of a Certificate Map Entry.
///
/// Output only.
core.String? updateTime;
CertificateMapEntry({
this.certificates,
this.createTime,
this.description,
this.hostname,
this.labels,
this.matcher,
this.name,
this.state,
this.updateTime,
});
CertificateMapEntry.fromJson(core.Map json_)
: this(
certificates: (json_['certificates'] as core.List?)
?.map((value) => value as core.String)
.toList(),
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
hostname: json_['hostname'] as core.String?,
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
matcher: json_['matcher'] as core.String?,
name: json_['name'] as core.String?,
state: json_['state'] as core.String?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final certificates = this.certificates;
final createTime = this.createTime;
final description = this.description;
final hostname = this.hostname;
final labels = this.labels;
final matcher = this.matcher;
final name = this.name;
final state = this.state;
final updateTime = this.updateTime;
return {
'certificates': ?certificates,
'createTime': ?createTime,
'description': ?description,
'hostname': ?hostname,
'labels': ?labels,
'matcher': ?matcher,
'name': ?name,
'state': ?state,
'updateTime': ?updateTime,
};
}
}
/// A DnsAuthorization resource describes a way to perform domain authorization
/// for certificate issuance.
class DnsAuthorization {
/// The creation timestamp of a DnsAuthorization.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a DnsAuthorization.
///
/// Optional.
core.String? description;
/// DNS Resource Record that needs to be added to DNS configuration.
///
/// Output only.
DnsResourceRecord? dnsResourceRecord;
/// A domain that is being authorized.
///
/// A DnsAuthorization resource covers a single domain and its wildcard, e.g.
/// authorization for `example.com` can be used to issue certificates for
/// `example.com` and `*.example.com`.
///
/// Required. Immutable.
core.String? domain;
/// Set of labels associated with a DnsAuthorization.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// Identifier.
///
/// A user-defined name of the dns authorization. DnsAuthorization names must
/// be unique globally and match pattern `projects / * /locations / *
/// /dnsAuthorizations / * `.
core.String? name;
/// Type of DnsAuthorization.
///
/// If unset during resource creation the following default will be used: - in
/// location `global`: FIXED_RECORD, - in other locations: PER_PROJECT_RECORD.
///
/// Optional. Immutable.
/// Possible string values are:
/// - "TYPE_UNSPECIFIED" : Type is unspecified.
/// - "FIXED_RECORD" : FIXED_RECORD DNS authorization uses DNS-01 validation
/// method.
/// - "PER_PROJECT_RECORD" : PER_PROJECT_RECORD DNS authorization allows for
/// independent management of Google-managed certificates with DNS
/// authorization across multiple projects.
core.String? type;
/// The last update timestamp of a DnsAuthorization.
///
/// Output only.
core.String? updateTime;
DnsAuthorization({
this.createTime,
this.description,
this.dnsResourceRecord,
this.domain,
this.labels,
this.name,
this.type,
this.updateTime,
});
DnsAuthorization.fromJson(core.Map json_)
: this(
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
dnsResourceRecord: json_.containsKey('dnsResourceRecord')
? DnsResourceRecord.fromJson(
json_['dnsResourceRecord']
as core.Map<core.String, core.dynamic>,
)
: null,
domain: json_['domain'] as core.String?,
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
name: json_['name'] as core.String?,
type: json_['type'] as core.String?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final createTime = this.createTime;
final description = this.description;
final dnsResourceRecord = this.dnsResourceRecord;
final domain = this.domain;
final labels = this.labels;
final name = this.name;
final type = this.type;
final updateTime = this.updateTime;
return {
'createTime': ?createTime,
'description': ?description,
'dnsResourceRecord': ?dnsResourceRecord,
'domain': ?domain,
'labels': ?labels,
'name': ?name,
'type': ?type,
'updateTime': ?updateTime,
};
}
}
/// The structure describing the DNS Resource Record that needs to be added to
/// DNS configuration for the authorization to be usable by certificate.
class DnsResourceRecord {
/// Data of the DNS Resource Record.
///
/// Output only.
core.String? data;
/// Fully qualified name of the DNS Resource Record.
///
/// e.g. `_acme-challenge.example.com`
///
/// Output only.
core.String? name;
/// Type of the DNS Resource Record.
///
/// Currently always set to "CNAME".
///
/// Output only.
core.String? type;
DnsResourceRecord({this.data, this.name, this.type});
DnsResourceRecord.fromJson(core.Map json_)
: this(
data: json_['data'] as core.String?,
name: json_['name'] as core.String?,
type: json_['type'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final data = this.data;
final name = this.name;
final type = this.type;
return {'data': ?data, 'name': ?name, 'type': ?type};
}
}
/// A generic empty message that you can re-use to avoid defining duplicated
/// empty messages in your APIs.
///
/// A typical example is to use it as the request or the response type of an API
/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
/// (google.protobuf.Empty); }
typedef Empty = $Empty;
/// Describes a Target Proxy that uses this Certificate Map.
class GclbTarget {
/// IP configurations for this Target Proxy where the Certificate Map is
/// serving.
///
/// Output only.
core.List<IpConfig>? ipConfigs;
/// This field returns the resource name in the following format:
/// `//compute.googleapis.com/projects / * /global/targetHttpsProxies / * `.
///
/// Output only.
core.String? targetHttpsProxy;
/// This field returns the resource name in the following format:
/// `//compute.googleapis.com/projects / * /global/targetSslProxies / * `.
///
/// Output only.
core.String? targetSslProxy;
GclbTarget({this.ipConfigs, this.targetHttpsProxy, this.targetSslProxy});
GclbTarget.fromJson(core.Map json_)
: this(
ipConfigs: (json_['ipConfigs'] as core.List?)
?.map(
(value) => IpConfig.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
targetHttpsProxy: json_['targetHttpsProxy'] as core.String?,
targetSslProxy: json_['targetSslProxy'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final ipConfigs = this.ipConfigs;
final targetHttpsProxy = this.targetHttpsProxy;
final targetSslProxy = this.targetSslProxy;
return {
'ipConfigs': ?ipConfigs,
'targetHttpsProxy': ?targetHttpsProxy,
'targetSslProxy': ?targetSslProxy,
};
}
}
/// IPs troubleshooting information.
class IPs {
/// The list of IP addresses resolved from the domain's A/AAAA records.
///
/// Can contain both ipv4 and ipv6 addresses.
///
/// Output only.
core.List<core.String>? resolved;
/// The list of IP addresses, where the certificate is attached and port 443
/// is open.
///
/// Output only.
core.List<core.String>? serving;
/// The list of IP addresses, where the certificate is attached, but port 443
/// is not open.
///
/// Output only.
core.List<core.String>? servingOnAltPorts;
IPs({this.resolved, this.serving, this.servingOnAltPorts});
IPs.fromJson(core.Map json_)
: this(
resolved: (json_['resolved'] as core.List?)
?.map((value) => value as core.String)
.toList(),
serving: (json_['serving'] as core.List?)
?.map((value) => value as core.String)
.toList(),
servingOnAltPorts: (json_['servingOnAltPorts'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final resolved = this.resolved;
final serving = this.serving;
final servingOnAltPorts = this.servingOnAltPorts;
return {
'resolved': ?resolved,
'serving': ?serving,
'servingOnAltPorts': ?servingOnAltPorts,
};
}
}
/// Defines an intermediate CA.
class IntermediateCA {
/// PEM intermediate certificate used for building up paths for validation.
///
/// Each certificate provided in PEM format may occupy up to 5kB.
core.String? pemCertificate;
IntermediateCA({this.pemCertificate});
IntermediateCA.fromJson(core.Map json_)
: this(pemCertificate: json_['pemCertificate'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final pemCertificate = this.pemCertificate;
return {'pemCertificate': ?pemCertificate};
}
}
/// Defines IP configuration where this Certificate Map is serving.
class IpConfig {
/// An external IP address.
///
/// Output only.
core.String? ipAddress;
/// Ports.
///
/// Output only.
core.List<core.int>? ports;
IpConfig({this.ipAddress, this.ports});
IpConfig.fromJson(core.Map json_)
: this(
ipAddress: json_['ipAddress'] as core.String?,
ports: (json_['ports'] as core.List?)
?.map((value) => value as core.int)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final ipAddress = this.ipAddress;
final ports = this.ports;
return {'ipAddress': ?ipAddress, 'ports': ?ports};
}
}
/// Response for the `ListCertificateIssuanceConfigs` method.
class ListCertificateIssuanceConfigsResponse {
/// A list of certificate configs for the parent resource.
core.List<CertificateIssuanceConfig>? certificateIssuanceConfigs;
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListCertificateIssuanceConfigsResponse({
this.certificateIssuanceConfigs,
this.nextPageToken,
this.unreachable,
});
ListCertificateIssuanceConfigsResponse.fromJson(core.Map json_)
: this(
certificateIssuanceConfigs:
(json_['certificateIssuanceConfigs'] as core.List?)
?.map(
(value) => CertificateIssuanceConfig.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final certificateIssuanceConfigs = this.certificateIssuanceConfigs;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'certificateIssuanceConfigs': ?certificateIssuanceConfigs,
'nextPageToken': ?nextPageToken,
'unreachable': ?unreachable,
};
}
}
/// Response for the `ListCertificateMapEntries` method.
class ListCertificateMapEntriesResponse {
/// A list of certificate map entries for the parent resource.
core.List<CertificateMapEntry>? certificateMapEntries;
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListCertificateMapEntriesResponse({
this.certificateMapEntries,
this.nextPageToken,
this.unreachable,
});
ListCertificateMapEntriesResponse.fromJson(core.Map json_)
: this(
certificateMapEntries: (json_['certificateMapEntries'] as core.List?)
?.map(
(value) => CertificateMapEntry.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final certificateMapEntries = this.certificateMapEntries;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'certificateMapEntries': ?certificateMapEntries,
'nextPageToken': ?nextPageToken,
'unreachable': ?unreachable,
};
}
}
/// Response for the `ListCertificateMaps` method.
class ListCertificateMapsResponse {
/// A list of certificate maps for the parent resource.
core.List<CertificateMap>? certificateMaps;
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListCertificateMapsResponse({
this.certificateMaps,
this.nextPageToken,
this.unreachable,
});
ListCertificateMapsResponse.fromJson(core.Map json_)
: this(
certificateMaps: (json_['certificateMaps'] as core.List?)
?.map(
(value) => CertificateMap.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final certificateMaps = this.certificateMaps;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'certificateMaps': ?certificateMaps,
'nextPageToken': ?nextPageToken,
'unreachable': ?unreachable,
};
}
}
/// Response for the `ListCertificates` method.
class ListCertificatesResponse {
/// A list of certificates for the parent resource.
core.List<Certificate>? certificates;
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// A list of locations that could not be reached.
core.List<core.String>? unreachable;
ListCertificatesResponse({
this.certificates,
this.nextPageToken,
this.unreachable,
});
ListCertificatesResponse.fromJson(core.Map json_)
: this(
certificates: (json_['certificates'] as core.List?)
?.map(
(value) => Certificate.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final certificates = this.certificates;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'certificates': ?certificates,
'nextPageToken': ?nextPageToken,
'unreachable': ?unreachable,
};
}
}
/// Response for the `ListDnsAuthorizations` method.
class ListDnsAuthorizationsResponse {
/// A list of dns authorizations for the parent resource.
core.List<DnsAuthorization>? dnsAuthorizations;
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListDnsAuthorizationsResponse({
this.dnsAuthorizations,
this.nextPageToken,
this.unreachable,
});
ListDnsAuthorizationsResponse.fromJson(core.Map json_)
: this(
dnsAuthorizations: (json_['dnsAuthorizations'] as core.List?)
?.map(
(value) => DnsAuthorization.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final dnsAuthorizations = this.dnsAuthorizations;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'dnsAuthorizations': ?dnsAuthorizations,
'nextPageToken': ?nextPageToken,
'unreachable': ?unreachable,
};
}
}
/// The response message for Locations.ListLocations.
class ListLocationsResponse {
/// A list of locations that matches the specified filter in the request.
core.List<Location>? locations;
/// The standard List next-page token.
core.String? nextPageToken;
ListLocationsResponse({this.locations, this.nextPageToken});
ListLocationsResponse.fromJson(core.Map json_)
: this(
locations: (json_['locations'] as core.List?)
?.map(
(value) => Location.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final locations = this.locations;
final nextPageToken = this.nextPageToken;
return {'locations': ?locations, 'nextPageToken': ?nextPageToken};
}
}
/// The response message for Operations.ListOperations.
class ListOperationsResponse {
/// The standard List next-page token.
core.String? nextPageToken;
/// A list of operations that matches the specified filter in the request.
core.List<Operation>? operations;
/// Unordered list.
///
/// Unreachable resources. Populated when the request sets
/// `ListOperationsRequest.return_partial_success` and reads across
/// collections. For example, when attempting to list all resources across all
/// supported locations.
core.List<core.String>? unreachable;
ListOperationsResponse({
this.nextPageToken,
this.operations,
this.unreachable,
});
ListOperationsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
operations: (json_['operations'] as core.List?)
?.map(
(value) => Operation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final operations = this.operations;
final unreachable = this.unreachable;
return {
'nextPageToken': ?nextPageToken,
'operations': ?operations,
'unreachable': ?unreachable,
};
}
}
/// Response for the `ListTrustConfigs` method.
class ListTrustConfigsResponse {
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included.
///
/// To get the next set of results, call this method again using the value of
/// `next_page_token` as `page_token`.
core.String? nextPageToken;
/// A list of TrustConfigs for the parent resource.
core.List<TrustConfig>? trustConfigs;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListTrustConfigsResponse({
this.nextPageToken,
this.trustConfigs,
this.unreachable,
});
ListTrustConfigsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
trustConfigs: (json_['trustConfigs'] as core.List?)
?.map(
(value) => TrustConfig.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final trustConfigs = this.trustConfigs;
final unreachable = this.unreachable;
return {
'nextPageToken': ?nextPageToken,
'trustConfigs': ?trustConfigs,
'unreachable': ?unreachable,
};
}
}
/// A resource that represents a Google Cloud location.
typedef Location = $Location00;
/// Configuration and state of a Managed Certificate.
///
/// Certificate Manager provisions and renews Managed Certificates
/// automatically, for as long as it's authorized to do so.
class ManagedCertificate {
/// Detailed state of the latest authorization attempt for each domain
/// specified for managed certificate resource.
///
/// Output only.
core.List<AuthorizationAttemptInfo>? authorizationAttemptInfo;
/// Authorizations that will be used for performing domain authorization.
///
/// Optional. Immutable.
core.List<core.String>? dnsAuthorizations;
/// The domains for which a managed SSL certificate will be generated.
///
/// Wildcard domains are only supported with DNS challenge resolution.
///
/// Optional. Immutable.
core.List<core.String>? domains;
/// The resource name for a CertificateIssuanceConfig used to configure
/// private PKI certificates in the format `projects / * /locations / *
/// /certificateIssuanceConfigs / * `.
///
/// If this field is not set, the certificates will instead be publicly signed
/// as documented at
/// https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa.
///
/// Optional. Immutable.
core.String? issuanceConfig;
/// Information about issues with provisioning a Managed Certificate.
///
/// Output only.
ProvisioningIssue? provisioningIssue;
/// State of the managed certificate resource.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : State is unspecified.
/// - "PROVISIONING" : Certificate Manager attempts to provision or renew the
/// certificate. If the process takes longer than expected, consult the
/// `provisioning_issue` field.
/// - "FAILED" : Multiple certificate provisioning attempts failed and
/// Certificate Manager gave up. To try again, delete and create a new managed
/// Certificate resource. For details see the `provisioning_issue` field.
/// - "ACTIVE" : The certificate management is working, and a certificate has
/// been provisioned.
core.String? state;
ManagedCertificate({
this.authorizationAttemptInfo,
this.dnsAuthorizations,
this.domains,
this.issuanceConfig,
this.provisioningIssue,
this.state,
});
ManagedCertificate.fromJson(core.Map json_)
: this(
authorizationAttemptInfo:
(json_['authorizationAttemptInfo'] as core.List?)
?.map(
(value) => AuthorizationAttemptInfo.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
dnsAuthorizations: (json_['dnsAuthorizations'] as core.List?)
?.map((value) => value as core.String)
.toList(),
domains: (json_['domains'] as core.List?)
?.map((value) => value as core.String)
.toList(),
issuanceConfig: json_['issuanceConfig'] as core.String?,
provisioningIssue: json_.containsKey('provisioningIssue')
? ProvisioningIssue.fromJson(
json_['provisioningIssue']
as core.Map<core.String, core.dynamic>,
)
: null,
state: json_['state'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final authorizationAttemptInfo = this.authorizationAttemptInfo;
final dnsAuthorizations = this.dnsAuthorizations;
final domains = this.domains;
final issuanceConfig = this.issuanceConfig;
final provisioningIssue = this.provisioningIssue;
final state = this.state;
return {
'authorizationAttemptInfo': ?authorizationAttemptInfo,
'dnsAuthorizations': ?dnsAuthorizations,
'domains': ?domains,
'issuanceConfig': ?issuanceConfig,
'provisioningIssue': ?provisioningIssue,
'state': ?state,
};
}
}
/// Configuration and state of a Managed Identity Certificate.
///
/// Certificate Manager provisions and renews Managed Identity Certificates
/// automatically, for as long as it's authorized to do so.
class ManagedIdentityCertificate {
/// SPIFFE ID of the Managed Identity used for this certificate.
///
/// Required. Immutable.
core.String? identity;
/// Information about issues with provisioning a managed certificate.
///
/// Output only.
ProvisioningIssue? provisioningIssue;
/// State of the managed certificate resource.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : State is unspecified.
/// - "PROVISIONING" : Certificate Manager attempts to provision or renew the
/// certificate. If the process takes longer than expected, consult the
/// `provisioning_issue` field.
/// - "FAILED" : Multiple certificate provisioning attempts failed and
/// Certificate Manager gave up. To try again, delete and create a new managed
/// Certificate resource. For details see the `provisioning_issue` field.
/// - "ACTIVE" : The certificate management is working, and a certificate has
/// been provisioned.
core.String? state;
ManagedIdentityCertificate({
this.identity,
this.provisioningIssue,
this.state,
});
ManagedIdentityCertificate.fromJson(core.Map json_)
: this(
identity: json_['identity'] as core.String?,
provisioningIssue: json_.containsKey('provisioningIssue')
? ProvisioningIssue.fromJson(
json_['provisioningIssue']
as core.Map<core.String, core.dynamic>,
)
: null,
state: json_['state'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final identity = this.identity;
final provisioningIssue = this.provisioningIssue;
final state = this.state;
return {
'identity': ?identity,
'provisioningIssue': ?provisioningIssue,
'state': ?state,
};
}
}
/// This resource represents a long-running operation that is the result of a
/// network API call.
class Operation {
/// If the value is `false`, it means the operation is still in progress.
///
/// If `true`, the operation is completed, and either `error` or `response` is
/// available.
core.bool? done;
/// The error result of the operation in case of failure or cancellation.
Status? error;
/// Service-specific metadata associated with the operation.
///
/// It typically contains progress information and common metadata such as
/// create time. Some services might not provide such metadata. Any method
/// that returns a long-running operation should document the metadata type,
/// if any.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? metadata;
/// The server-assigned name, which is only unique within the same service
/// that originally returns it.
///
/// If you use the default HTTP mapping, the `name` should be a resource name
/// ending with `operations/{unique_id}`.
core.String? name;
/// The normal, successful response of the operation.
///
/// If the original method returns no data on success, such as `Delete`, the
/// response is `google.protobuf.Empty`. If the original method is standard
/// `Get`/`Create`/`Update`, the response should be the resource. For other
/// methods, the response should have the type `XxxResponse`, where `Xxx` is
/// the original method name. For example, if the original method name is
/// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? response;
Operation({this.done, this.error, this.metadata, this.name, this.response});
Operation.fromJson(core.Map json_)
: this(
done: json_['done'] as core.bool?,
error: json_.containsKey('error')
? Status.fromJson(
json_['error'] as core.Map<core.String, core.dynamic>,
)
: null,
metadata: json_.containsKey('metadata')
? json_['metadata'] as core.Map<core.String, core.dynamic>
: null,
name: json_['name'] as core.String?,
response: json_.containsKey('response')
? json_['response'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final done = this.done;
final error = this.error;
final metadata = this.metadata;
final name = this.name;
final response = this.response;
return {
'done': ?done,
'error': ?error,
'metadata': ?metadata,
'name': ?name,
'response': ?response,
};
}
}
/// Information about issues with provisioning a Managed Certificate.
class ProvisioningIssue {
/// Human readable explanation about the issue.
///
/// Provided to help address the configuration issues. Not guaranteed to be
/// stable. For programmatic access use Reason enum.
///
/// Output only.
core.String? details;
/// Reason for provisioning failures.
///
/// Output only.
/// Possible string values are:
/// - "REASON_UNSPECIFIED" : Reason is unspecified.
/// - "AUTHORIZATION_ISSUE" : Certificate provisioning failed due to an issue
/// with one or more of the domains on the certificate. For details of which
/// domains failed, consult the `authorization_attempt_info` field.
/// - "RATE_LIMITED" : Exceeded Certificate Authority quotas or internal rate
/// limits of the system. Provisioning may take longer to complete.
core.String? reason;
ProvisioningIssue({this.details, this.reason});
ProvisioningIssue.fromJson(core.Map json_)
: this(
details: json_['details'] as core.String?,
reason: json_['reason'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final details = this.details;
final reason = this.reason;
return {'details': ?details, 'reason': ?reason};
}
}
/// Certificate data for a SelfManaged Certificate.
///
/// SelfManaged Certificates are uploaded by the user. Updating such
/// certificates before they expire remains the user's responsibility.
class SelfManagedCertificate {
/// Input only.
///
/// The PEM-encoded certificate chain. Leaf certificate comes first, followed
/// by intermediate ones if any.
///
/// Optional.
core.String? pemCertificate;
/// Input only.
///
/// The PEM-encoded private key of the leaf certificate.
///
/// Optional.
core.String? pemPrivateKey;
SelfManagedCertificate({this.pemCertificate, this.pemPrivateKey});
SelfManagedCertificate.fromJson(core.Map json_)
: this(
pemCertificate: json_['pemCertificate'] as core.String?,
pemPrivateKey: json_['pemPrivateKey'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final pemCertificate = this.pemCertificate;
final pemPrivateKey = this.pemPrivateKey;
return {'pemCertificate': ?pemCertificate, 'pemPrivateKey': ?pemPrivateKey};
}
}
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs.
///
/// It is used by [gRPC](https://github.com/grpc). Each `Status` message
/// contains three pieces of data: error code, error message, and error details.
/// You can find out more about this error model and how to work with it in the
/// [API Design Guide](https://cloud.google.com/apis/design/errors).
typedef Status = $Status00;
/// Troubleshooting information for the authorization attempt.
class Troubleshooting {
/// CNAME troubleshooting information.
///
/// Output only.
CNAME? cname;
/// IPs troubleshooting information.
///
/// Output only.
IPs? ips;
/// The list of issues discovered during the authorization attempt.
///
/// Output only.
core.List<core.String>? issues;
Troubleshooting({this.cname, this.ips, this.issues});
Troubleshooting.fromJson(core.Map json_)
: this(
cname: json_.containsKey('cname')
? CNAME.fromJson(
json_['cname'] as core.Map<core.String, core.dynamic>,
)
: null,
ips: json_.containsKey('ips')
? IPs.fromJson(json_['ips'] as core.Map<core.String, core.dynamic>)
: null,
issues: (json_['issues'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final cname = this.cname;
final ips = this.ips;
final issues = this.issues;
return {'cname': ?cname, 'ips': ?ips, 'issues': ?issues};
}
}
/// Defines a trust anchor.
class TrustAnchor {
/// PEM root certificate of the PKI used for validation.
///
/// Each certificate provided in PEM format may occupy up to 5kB.
core.String? pemCertificate;
TrustAnchor({this.pemCertificate});
TrustAnchor.fromJson(core.Map json_)
: this(pemCertificate: json_['pemCertificate'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final pemCertificate = this.pemCertificate;
return {'pemCertificate': ?pemCertificate};
}
}
/// Defines a trust config.
class TrustConfig {
/// A certificate matching an allowlisted certificate is always considered
/// valid as long as the certificate is parseable, proof of private key
/// possession is established, and constraints on the certificate's SAN field
/// are met.
///
/// Optional.
core.List<AllowlistedCertificate>? allowlistedCertificates;
/// The creation timestamp of a TrustConfig.
///
/// Output only.
core.String? createTime;
/// One or more paragraphs of text description of a TrustConfig.
///
/// Optional.
core.String? description;
/// This checksum is computed by the server based on the value of other
/// fields, and may be sent on update and delete requests to ensure the client
/// has an up-to-date value before proceeding.
core.String? etag;
/// Set of labels associated with a TrustConfig.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// Identifier.
///
/// A user-defined name of the trust config. TrustConfig names must be unique
/// globally and match pattern `projects / * /locations / * /trustConfigs / *
/// `.
core.String? name;
/// Defines a mapping from a trust domain to a TrustStore.
///
/// This is used for SPIFFE certificate validation.
///
/// Optional.
core.Map<core.String, TrustStore>? spiffeTrustStores;
/// Set of trust stores to perform validation against.
///
/// This field is supported when TrustConfig is configured with Load
/// Balancers, currently not supported for SPIFFE certificate validation. Only
/// one TrustStore specified is currently allowed.
///
/// Optional.
core.List<TrustStore>? trustStores;
/// The last update timestamp of a TrustConfig.
///
/// Output only.
core.String? updateTime;
TrustConfig({
this.allowlistedCertificates,
this.createTime,
this.description,
this.etag,
this.labels,
this.name,
this.spiffeTrustStores,
this.trustStores,
this.updateTime,
});
TrustConfig.fromJson(core.Map json_)
: this(
allowlistedCertificates:
(json_['allowlistedCertificates'] as core.List?)
?.map(
(value) => AllowlistedCertificate.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
createTime: json_['createTime'] as core.String?,
description: json_['description'] as core.String?,
etag: json_['etag'] as core.String?,
labels: (json_['labels'] as core.Map<core.String, core.dynamic>?)?.map(
(key, value) => core.MapEntry(key, value as core.String),
),
name: json_['name'] as core.String?,
spiffeTrustStores:
(json_['spiffeTrustStores'] as core.Map<core.String, core.dynamic>?)
?.map(
(key, value) => core.MapEntry(
key,
TrustStore.fromJson(
value as core.Map<core.String, core.dynamic>,
),
),
),
trustStores: (json_['trustStores'] as core.List?)
?.map(
(value) => TrustStore.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final allowlistedCertificates = this.allowlistedCertificates;
final createTime = this.createTime;
final description = this.description;
final etag = this.etag;
final labels = this.labels;
final name = this.name;
final spiffeTrustStores = this.spiffeTrustStores;
final trustStores = this.trustStores;
final updateTime = this.updateTime;
return {
'allowlistedCertificates': ?allowlistedCertificates,
'createTime': ?createTime,
'description': ?description,
'etag': ?etag,
'labels': ?labels,
'name': ?name,
'spiffeTrustStores': ?spiffeTrustStores,
'trustStores': ?trustStores,
'updateTime': ?updateTime,
};
}
}
/// Defines a trust store.
class TrustStore {
/// Set of intermediate CA certificates used for the path building phase of
/// chain validation.
///
/// The field is currently not supported if TrustConfig is used for the
/// workload certificate feature.
///
/// Optional.
core.List<IntermediateCA>? intermediateCas;
/// List of Trust Anchors to be used while performing validation against a
/// given TrustStore.
///
/// Optional.
core.List<TrustAnchor>? trustAnchors;
TrustStore({this.intermediateCas, this.trustAnchors});
TrustStore.fromJson(core.Map json_)
: this(
intermediateCas: (json_['intermediateCas'] as core.List?)
?.map(
(value) => IntermediateCA.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
trustAnchors: (json_['trustAnchors'] as core.List?)
?.map(
(value) => TrustAnchor.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final intermediateCas = this.intermediateCas;
final trustAnchors = this.trustAnchors;
return {'intermediateCas': ?intermediateCas, 'trustAnchors': ?trustAnchors};
}
}
/// Defines a resource that uses the certificate.
class UsedBy {
/// Full name of the resource https://google.aip.dev/122#full-resource-names,
/// e.g. `//certificatemanager.googleapis.com/projects / * /locations / *
/// /certificateMaps / * /certificateMapEntries / * ` or
/// `//compute.googleapis.com/projects / * /locations / * /targetHttpsProxies
/// / * `.
///
/// Output only.
core.String? name;
UsedBy({this.name});
UsedBy.fromJson(core.Map json_) : this(name: json_['name'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final name = this.name;
return {'name': ?name};
}
}