blob: b781261624dd1e86b7683e44785b115ad0c054d2 [file] [log] [blame]
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: unused_import, unnecessary_cast
library googleapis_beta.artifactregistry.v1beta1;
import 'dart:core' as core;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
const core.String USER_AGENT = 'dart-api-client artifactregistry/v1beta1';
/// Store and manage build artifacts in a scalable and integrated service built
/// on Google infrastructure.
class ArtifactregistryApi {
/// View and manage your data across Google Cloud Platform services
static const CloudPlatformScope =
"https://www.googleapis.com/auth/cloud-platform";
/// View your data across Google Cloud Platform services
static const CloudPlatformReadOnlyScope =
"https://www.googleapis.com/auth/cloud-platform.read-only";
final commons.ApiRequester _requester;
ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
ArtifactregistryApi(http.Client client,
{core.String rootUrl = "https://artifactregistry.googleapis.com/",
core.String servicePath = ""})
: _requester =
new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
}
class ProjectsResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsResourceApi get locations =>
new ProjectsLocationsResourceApi(_requester);
ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
}
class ProjectsLocationsResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResourceApi get operations =>
new ProjectsLocationsOperationsResourceApi(_requester);
ProjectsLocationsRepositoriesResourceApi get repositories =>
new ProjectsLocationsRepositoriesResourceApi(_requester);
ProjectsLocationsResourceApi(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}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Location.fromJson(data));
}
/// Lists information about the supported locations for this service.
///
/// Request parameters:
///
/// [name] - The resource that owns the locations collection, if applicable.
/// Value must have pattern "^projects/[^/]+$".
///
/// [pageToken] - The standard list page token.
///
/// [filter] - The standard list filter.
///
/// [pageSize] - The standard list page size.
///
/// [$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.String pageToken,
core.String filter,
core.int pageSize,
core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if (filter != null) {
_queryParams["filter"] = [filter];
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$name') +
'/locations';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListLocationsResponse.fromJson(data));
}
}
class ProjectsLocationsOperationsResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResourceApi(commons.ApiRequester client)
: _requester = client;
/// 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}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Operation.fromJson(data));
}
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the
/// `name` binding allows API services to override the binding to use
/// different resource name schemes, such as `users / * /operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users / * }/operations"` to their service configuration. For
/// backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding is
/// the parent resource, without the operations collection id.
///
/// 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.
///
/// [$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.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (filter != null) {
_queryParams["filter"] = [filter];
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$name') +
'/operations';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListOperationsResponse.fromJson(data));
}
}
class ProjectsLocationsRepositoriesResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsRepositoriesFilesResourceApi get files =>
new ProjectsLocationsRepositoriesFilesResourceApi(_requester);
ProjectsLocationsRepositoriesPackagesResourceApi get packages =>
new ProjectsLocationsRepositoriesPackagesResourceApi(_requester);
ProjectsLocationsRepositoriesResourceApi(commons.ApiRequester client)
: _requester = client;
/// Creates a repository. The returned Operation will finish once the
/// repository has been created. Its response will be the created Repository.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource where the repository will be
/// created.
/// Value must have pattern "^projects/[^/]+/locations/[^/]+$".
///
/// [repositoryId] - The repository id to use for this repository.
///
/// [$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(Repository request, core.String parent,
{core.String repositoryId, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (repositoryId != null) {
_queryParams["repositoryId"] = [repositoryId];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$parent') +
'/repositories';
var _response = _requester.request(_url, "POST",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Operation.fromJson(data));
}
/// Deletes a repository and all of its contents. The returned Operation will
/// finish once the repository has been deleted. It will not have any
/// Operation metadata and will return a google.protobuf.Empty response.
///
/// Request parameters:
///
/// [name] - The name of the repository to delete.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [$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}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "DELETE",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Operation.fromJson(data));
}
/// Gets a repository.
///
/// Request parameters:
///
/// [name] - The name of the repository to retrieve.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Repository].
///
/// 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<Repository> get(core.String name, {core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Repository.fromJson(data));
}
/// Gets the IAM policy for a given resource.
///
/// Request parameters:
///
/// [resource] - REQUIRED: The resource for which the policy is being
/// requested. See the operation documentation for the appropriate value for
/// this field.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [options_requestedPolicyVersion] - Optional. The policy format version to
/// be returned. Valid values are 0, 1, and 3. Requests specifying an invalid
/// value will be rejected. Requests for policies with any conditional
/// bindings must specify version 3. Policies without any conditional bindings
/// may specify any valid value or leave the field unset. To learn which
/// resources support conditions in their IAM policies, see the [IAM
/// documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Policy].
///
/// 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<Policy> getIamPolicy(core.String resource,
{core.int options_requestedPolicyVersion, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (resource == null) {
throw new core.ArgumentError("Parameter resource is required.");
}
if (options_requestedPolicyVersion != null) {
_queryParams["options.requestedPolicyVersion"] = [
"${options_requestedPolicyVersion}"
];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$resource') +
':getIamPolicy';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Policy.fromJson(data));
}
/// Lists repositories.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource whose repositories will be
/// listed.
/// Value must have pattern "^projects/[^/]+/locations/[^/]+$".
///
/// [pageSize] - The maximum number of repositories to return.
///
/// [pageToken] - The next_page_token value returned from a previous list
/// request, if any.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListRepositoriesResponse].
///
/// 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<ListRepositoriesResponse> list(core.String parent,
{core.int pageSize, core.String pageToken, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$parent') +
'/repositories';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response
.then((data) => new ListRepositoriesResponse.fromJson(data));
}
/// Updates a repository.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The name of the repository, for example:
/// "projects/p1/locations/us-central1/repositories/repo1".
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [updateMask] - 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 [Repository].
///
/// 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<Repository> patch(Repository request, core.String name,
{core.String updateMask, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (updateMask != null) {
_queryParams["updateMask"] = [updateMask];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "PATCH",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Repository.fromJson(data));
}
/// Updates the IAM policy for a given resource.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [resource] - REQUIRED: The resource for which the policy is being
/// specified. See the operation documentation for the appropriate value for
/// this field.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Policy].
///
/// 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<Policy> setIamPolicy(
SetIamPolicyRequest request, core.String resource,
{core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (resource == null) {
throw new core.ArgumentError("Parameter resource is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$resource') +
':setIamPolicy';
var _response = _requester.request(_url, "POST",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Policy.fromJson(data));
}
/// Tests if the caller has a list of permissions on a resource.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [resource] - REQUIRED: The resource for which the policy detail is being
/// requested. See the operation documentation for the appropriate value for
/// this field.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [TestIamPermissionsResponse].
///
/// 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<TestIamPermissionsResponse> testIamPermissions(
TestIamPermissionsRequest request, core.String resource,
{core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (resource == null) {
throw new core.ArgumentError("Parameter resource is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$resource') +
':testIamPermissions';
var _response = _requester.request(_url, "POST",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response
.then((data) => new TestIamPermissionsResponse.fromJson(data));
}
}
class ProjectsLocationsRepositoriesFilesResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsRepositoriesFilesResourceApi(commons.ApiRequester client)
: _requester = client;
/// Gets a file.
///
/// Request parameters:
///
/// [name] - The name of the file to retrieve.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/.*$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [File].
///
/// 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<File> get(core.String name, {core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new File.fromJson(data));
}
/// Lists files.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource whose files will be listed.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [pageSize] - The maximum number of files to return.
///
/// [filter] - An expression for filtering the results of the request. Filter
/// rules are case insensitive. The fields eligible for filtering are: *
/// `name` * `owner` An example of using a filter: *
/// `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b / *
/// "` --> Files with an ID starting with "a/b/". *
/// `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
/// --> Files owned by the version `1.0` in package `pkg1`.
///
/// [pageToken] - The next_page_token value returned from a previous list
/// request, if any.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilesResponse].
///
/// 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<ListFilesResponse> list(core.String parent,
{core.int pageSize,
core.String filter,
core.String pageToken,
core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if (filter != null) {
_queryParams["filter"] = [filter];
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$parent') +
'/files';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListFilesResponse.fromJson(data));
}
}
class ProjectsLocationsRepositoriesPackagesResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsRepositoriesPackagesTagsResourceApi get tags =>
new ProjectsLocationsRepositoriesPackagesTagsResourceApi(_requester);
ProjectsLocationsRepositoriesPackagesVersionsResourceApi get versions =>
new ProjectsLocationsRepositoriesPackagesVersionsResourceApi(_requester);
ProjectsLocationsRepositoriesPackagesResourceApi(commons.ApiRequester client)
: _requester = client;
/// Deletes a package and all of its versions and tags. The returned operation
/// will complete once the package has been deleted.
///
/// Request parameters:
///
/// [name] - The name of the package to delete.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$".
///
/// [$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}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "DELETE",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Operation.fromJson(data));
}
/// Gets a package.
///
/// Request parameters:
///
/// [name] - The name of the package to retrieve.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Package].
///
/// 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<Package> get(core.String name, {core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Package.fromJson(data));
}
/// Lists packages.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource whose packages will be listed.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$".
///
/// [pageToken] - The next_page_token value returned from a previous list
/// request, if any.
///
/// [pageSize] - The maximum number of packages to return.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListPackagesResponse].
///
/// 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<ListPackagesResponse> list(core.String parent,
{core.String pageToken, core.int pageSize, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$parent') +
'/packages';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListPackagesResponse.fromJson(data));
}
}
class ProjectsLocationsRepositoriesPackagesTagsResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsRepositoriesPackagesTagsResourceApi(
commons.ApiRequester client)
: _requester = client;
/// Creates a tag.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource where the tag will be created.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$".
///
/// [tagId] - The tag id to use for this repository.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Tag].
///
/// 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<Tag> create(Tag request, core.String parent,
{core.String tagId, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (tagId != null) {
_queryParams["tagId"] = [tagId];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url =
'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/tags';
var _response = _requester.request(_url, "POST",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Tag.fromJson(data));
}
/// Deletes a tag.
///
/// Request parameters:
///
/// [name] - The name of the tag to delete.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+$".
///
/// [$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}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "DELETE",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Empty.fromJson(data));
}
/// Gets a tag.
///
/// Request parameters:
///
/// [name] - The name of the tag to retrieve.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+$".
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Tag].
///
/// 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<Tag> get(core.String name, {core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Tag.fromJson(data));
}
/// Lists tags.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource whose tags will be listed.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$".
///
/// [pageSize] - The maximum number of tags to return.
///
/// [filter] - An expression for filtering the results of the request. Filter
/// rules are case insensitive. The fields eligible for filtering are: *
/// `version` An example of using a filter: *
/// `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
/// --> Tags that are applied to the version `1.0` in package `pkg1`.
///
/// [pageToken] - The next_page_token value returned from a previous list
/// request, if any.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListTagsResponse].
///
/// 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<ListTagsResponse> list(core.String parent,
{core.int pageSize,
core.String filter,
core.String pageToken,
core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if (filter != null) {
_queryParams["filter"] = [filter];
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url =
'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/tags';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListTagsResponse.fromJson(data));
}
/// Updates a tag.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The name of the tag, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+$".
///
/// [updateMask] - 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 [Tag].
///
/// 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<Tag> patch(Tag request, core.String name,
{core.String updateMask, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (request != null) {
_body = convert.json.encode((request).toJson());
}
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (updateMask != null) {
_queryParams["updateMask"] = [updateMask];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "PATCH",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Tag.fromJson(data));
}
}
class ProjectsLocationsRepositoriesPackagesVersionsResourceApi {
final commons.ApiRequester _requester;
ProjectsLocationsRepositoriesPackagesVersionsResourceApi(
commons.ApiRequester client)
: _requester = client;
/// Deletes a version and all of its content. The returned operation will
/// complete once the version has been deleted.
///
/// Request parameters:
///
/// [name] - The name of the version to delete.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+$".
///
/// [force] - By default, a version that is tagged may not be deleted. If
/// force=true, the version and any tags pointing to the version are deleted.
///
/// [$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.bool force, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (force != null) {
_queryParams["force"] = ["${force}"];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "DELETE",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Operation.fromJson(data));
}
/// Gets a version
///
/// Request parameters:
///
/// [name] - The name of the version to retrieve.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+$".
///
/// [view] - The view that should be returned in the response.
/// Possible string values are:
/// - "VERSION_VIEW_UNSPECIFIED" : The default / unset value. The API will
/// default to the BASIC view.
/// - "BASIC" : Includes basic information about the version, but not any
/// related tags.
/// - "FULL" : Include everything.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Version].
///
/// 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<Version> get(core.String name,
{core.String view, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (name == null) {
throw new core.ArgumentError("Parameter name is required.");
}
if (view != null) {
_queryParams["view"] = [view];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new Version.fromJson(data));
}
/// Lists versions.
///
/// Request parameters:
///
/// [parent] - The name of the parent resource whose versions will be listed.
/// Value must have pattern
/// "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$".
///
/// [pageToken] - The next_page_token value returned from a previous list
/// request, if any.
///
/// [view] - The view that should be returned in the response.
/// Possible string values are:
/// - "VERSION_VIEW_UNSPECIFIED" : The default / unset value. The API will
/// default to the BASIC view.
/// - "BASIC" : Includes basic information about the version, but not any
/// related tags.
/// - "FULL" : Include everything.
///
/// [pageSize] - The maximum number of versions to return.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListVersionsResponse].
///
/// 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<ListVersionsResponse> list(core.String parent,
{core.String pageToken,
core.String view,
core.int pageSize,
core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (parent == null) {
throw new core.ArgumentError("Parameter parent is required.");
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if (view != null) {
_queryParams["view"] = [view];
}
if (pageSize != null) {
_queryParams["pageSize"] = ["${pageSize}"];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'v1beta1/' +
commons.Escaper.ecapeVariableReserved('$parent') +
'/versions';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new ListVersionsResponse.fromJson(data));
}
}
/// Associates `members` with a `role`.
class Binding {
/// A client-specified ID for this binding. Expected to be globally unique to
/// support the internal bindings-by-ID API.
core.String bindingId;
/// The condition that is associated with this binding. If the condition
/// evaluates to `true`, then this binding applies to the current request. If
/// the condition evaluates to `false`, then this binding does not apply to
/// the current request. However, a different role binding might grant the
/// same role to one or more of the members in this binding. To learn which
/// resources support conditions in their IAM policies, see the [IAM
/// documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Expr condition;
/// Specifies the identities requesting access for a Cloud Platform resource.
/// `members` can have the following values: * `allUsers`: A special
/// identifier that represents anyone who is on the internet; with or without
/// a Google account. * `allAuthenticatedUsers`: A special identifier that
/// represents anyone who is authenticated with a Google account or a service
/// account. * `user:{emailid}`: An email address that represents a specific
/// Google account. For example, `alice@example.com` . *
/// `serviceAccount:{emailid}`: An email address that represents a service
/// account. For example, `my-other-app@appspot.gserviceaccount.com`. *
/// `group:{emailid}`: An email address that represents a Google group. For
/// example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`:
/// An email address (plus unique identifier) representing a user that has
/// been recently deleted. For example,
/// `alice@example.com?uid=123456789012345678901`. If the user is recovered,
/// this value reverts to `user:{emailid}` and the recovered user retains the
/// role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`:
/// An email address (plus unique identifier) representing a service account
/// that has been recently deleted. For example,
/// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If
/// the service account is undeleted, this value reverts to
/// `serviceAccount:{emailid}` and the undeleted service account retains the
/// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
/// address (plus unique identifier) representing a Google group that has been
/// recently deleted. For example,
/// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
/// this value reverts to `group:{emailid}` and the recovered group retains
/// the role in the binding. * `domain:{domain}`: The G Suite domain (primary)
/// that represents all the users of that domain. For example, `google.com` or
/// `example.com`.
core.List<core.String> members;
/// Role that is assigned to `members`. For example, `roles/viewer`,
/// `roles/editor`, or `roles/owner`.
core.String role;
Binding();
Binding.fromJson(core.Map _json) {
if (_json.containsKey("bindingId")) {
bindingId = _json["bindingId"];
}
if (_json.containsKey("condition")) {
condition = new Expr.fromJson(_json["condition"]);
}
if (_json.containsKey("members")) {
members = (_json["members"] as core.List).cast<core.String>();
}
if (_json.containsKey("role")) {
role = _json["role"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (bindingId != null) {
_json["bindingId"] = bindingId;
}
if (condition != null) {
_json["condition"] = (condition).toJson();
}
if (members != null) {
_json["members"] = members;
}
if (role != null) {
_json["role"] = role;
}
return _json;
}
}
/// 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); } The JSON
/// representation for `Empty` is empty JSON object `{}`.
class Empty {
Empty();
Empty.fromJson(core.Map _json) {}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
return _json;
}
}
/// Represents a textual expression in the Common Expression Language (CEL)
/// syntax. CEL is a C-like expression language. The syntax and semantics of CEL
/// are documented at https://github.com/google/cel-spec. Example (Comparison):
/// title: "Summary size limit" description: "Determines if a summary is less
/// than 100 chars" expression: "document.summary.size() < 100" Example
/// (Equality): title: "Requestor is owner" description: "Determines if
/// requestor is the document owner" expression: "document.owner ==
/// request.auth.claims.email" Example (Logic): title: "Public documents"
/// description: "Determine whether the document should be publicly visible"
/// expression: "document.type != 'private' && document.type != 'internal'"
/// Example (Data Manipulation): title: "Notification string" description:
/// "Create a notification string with a timestamp." expression: "'New message
/// received at ' + string(document.create_time)" The exact variables and
/// functions that may be referenced within an expression are determined by the
/// service that evaluates it. See the service documentation for additional
/// information.
class Expr {
/// Optional. Description of the expression. This is a longer text which
/// describes the expression, e.g. when hovered over it in a UI.
core.String description;
/// Textual representation of an expression in Common Expression Language
/// syntax.
core.String expression;
/// Optional. String indicating the location of the expression for error
/// reporting, e.g. a file name and a position in the file.
core.String location;
/// Optional. Title for the expression, i.e. a short string describing its
/// purpose. This can be used e.g. in UIs which allow to enter the expression.
core.String title;
Expr();
Expr.fromJson(core.Map _json) {
if (_json.containsKey("description")) {
description = _json["description"];
}
if (_json.containsKey("expression")) {
expression = _json["expression"];
}
if (_json.containsKey("location")) {
location = _json["location"];
}
if (_json.containsKey("title")) {
title = _json["title"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (description != null) {
_json["description"] = description;
}
if (expression != null) {
_json["expression"] = expression;
}
if (location != null) {
_json["location"] = location;
}
if (title != null) {
_json["title"] = title;
}
return _json;
}
}
/// Files store content that is potentially associated with Packages or
/// Versions.
class File {
/// The time when the File was created.
core.String createTime;
/// The hashes of the file content.
core.List<Hash> hashes;
/// The name of the file, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/files/a/b/c.txt".
core.String name;
/// The name of the Package or Version that owns this file, if any.
core.String owner;
/// The size of the File in bytes.
core.String sizeBytes;
/// The time when the File was last updated.
core.String updateTime;
File();
File.fromJson(core.Map _json) {
if (_json.containsKey("createTime")) {
createTime = _json["createTime"];
}
if (_json.containsKey("hashes")) {
hashes = (_json["hashes"] as core.List)
.map<Hash>((value) => new Hash.fromJson(value))
.toList();
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("owner")) {
owner = _json["owner"];
}
if (_json.containsKey("sizeBytes")) {
sizeBytes = _json["sizeBytes"];
}
if (_json.containsKey("updateTime")) {
updateTime = _json["updateTime"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (createTime != null) {
_json["createTime"] = createTime;
}
if (hashes != null) {
_json["hashes"] = hashes.map((value) => (value).toJson()).toList();
}
if (name != null) {
_json["name"] = name;
}
if (owner != null) {
_json["owner"] = owner;
}
if (sizeBytes != null) {
_json["sizeBytes"] = sizeBytes;
}
if (updateTime != null) {
_json["updateTime"] = updateTime;
}
return _json;
}
}
/// Error information explaining why a package was not imported.
class GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo {
/// The detailed error status.
Status error;
/// Google Cloud Storage location requested.
GoogleDevtoolsArtifactregistryV1alpha1GcsSource gcsSource;
GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo();
GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo.fromJson(core.Map _json) {
if (_json.containsKey("error")) {
error = new Status.fromJson(_json["error"]);
}
if (_json.containsKey("gcsSource")) {
gcsSource = new GoogleDevtoolsArtifactregistryV1alpha1GcsSource.fromJson(
_json["gcsSource"]);
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (error != null) {
_json["error"] = (error).toJson();
}
if (gcsSource != null) {
_json["gcsSource"] = (gcsSource).toJson();
}
return _json;
}
}
/// Google Cloud Storage location for the input content.
class GoogleDevtoolsArtifactregistryV1alpha1GcsSource {
/// Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
core.List<core.String> uris;
GoogleDevtoolsArtifactregistryV1alpha1GcsSource();
GoogleDevtoolsArtifactregistryV1alpha1GcsSource.fromJson(core.Map _json) {
if (_json.containsKey("uris")) {
uris = (_json["uris"] as core.List).cast<core.String>();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (uris != null) {
_json["uris"] = uris;
}
return _json;
}
}
/// The response message from importing artifacts.
class GoogleDevtoolsArtifactregistryV1alpha1ImportArtifactsResponse {
/// Detailed error info for packages that were not imported.
core.List<GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo> errors;
/// The packages updated.
core.List<GoogleDevtoolsArtifactregistryV1alpha1Package> packages;
GoogleDevtoolsArtifactregistryV1alpha1ImportArtifactsResponse();
GoogleDevtoolsArtifactregistryV1alpha1ImportArtifactsResponse.fromJson(
core.Map _json) {
if (_json.containsKey("errors")) {
errors = (_json["errors"] as core.List)
.map<GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo>((value) =>
new GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo.fromJson(
value))
.toList();
}
if (_json.containsKey("packages")) {
packages = (_json["packages"] as core.List)
.map<GoogleDevtoolsArtifactregistryV1alpha1Package>((value) =>
new GoogleDevtoolsArtifactregistryV1alpha1Package.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (errors != null) {
_json["errors"] = errors.map((value) => (value).toJson()).toList();
}
if (packages != null) {
_json["packages"] = packages.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// Packages are named collections of versions.
class GoogleDevtoolsArtifactregistryV1alpha1Package {
/// The time when the package was created.
core.String createTime;
/// The display name of the package.
core.String displayName;
/// The name of the package, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
core.String name;
/// The time when the package was last updated. This includes publishing a new
/// version of the package.
core.String updateTime;
GoogleDevtoolsArtifactregistryV1alpha1Package();
GoogleDevtoolsArtifactregistryV1alpha1Package.fromJson(core.Map _json) {
if (_json.containsKey("createTime")) {
createTime = _json["createTime"];
}
if (_json.containsKey("displayName")) {
displayName = _json["displayName"];
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("updateTime")) {
updateTime = _json["updateTime"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (createTime != null) {
_json["createTime"] = createTime;
}
if (displayName != null) {
_json["displayName"] = displayName;
}
if (name != null) {
_json["name"] = name;
}
if (updateTime != null) {
_json["updateTime"] = updateTime;
}
return _json;
}
}
/// A hash of file content.
class Hash {
/// The algorithm used to compute the hash value.
/// Possible string values are:
/// - "HASH_TYPE_UNSPECIFIED" : Unspecified.
/// - "SHA256" : SHA256 hash.
core.String type;
/// The hash value.
core.String value;
core.List<core.int> get valueAsBytes {
return convert.base64.decode(value);
}
set valueAsBytes(core.List<core.int> _bytes) {
value =
convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
}
Hash();
Hash.fromJson(core.Map _json) {
if (_json.containsKey("type")) {
type = _json["type"];
}
if (_json.containsKey("value")) {
value = _json["value"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (type != null) {
_json["type"] = type;
}
if (value != null) {
_json["value"] = value;
}
return _json;
}
}
/// The response from listing files.
class ListFilesResponse {
/// The files returned.
core.List<File> files;
/// The token to retrieve the next page of files, or empty if there are no
/// more files to return.
core.String nextPageToken;
ListFilesResponse();
ListFilesResponse.fromJson(core.Map _json) {
if (_json.containsKey("files")) {
files = (_json["files"] as core.List)
.map<File>((value) => new File.fromJson(value))
.toList();
}
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (files != null) {
_json["files"] = files.map((value) => (value).toJson()).toList();
}
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
return _json;
}
}
/// 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();
ListLocationsResponse.fromJson(core.Map _json) {
if (_json.containsKey("locations")) {
locations = (_json["locations"] as core.List)
.map<Location>((value) => new Location.fromJson(value))
.toList();
}
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (locations != null) {
_json["locations"] = locations.map((value) => (value).toJson()).toList();
}
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
return _json;
}
}
/// 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;
ListOperationsResponse();
ListOperationsResponse.fromJson(core.Map _json) {
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
if (_json.containsKey("operations")) {
operations = (_json["operations"] as core.List)
.map<Operation>((value) => new Operation.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
if (operations != null) {
_json["operations"] =
operations.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// The response from listing packages.
class ListPackagesResponse {
/// The token to retrieve the next page of packages, or empty if there are no
/// more packages to return.
core.String nextPageToken;
/// The packages returned.
core.List<Package> packages;
ListPackagesResponse();
ListPackagesResponse.fromJson(core.Map _json) {
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
if (_json.containsKey("packages")) {
packages = (_json["packages"] as core.List)
.map<Package>((value) => new Package.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
if (packages != null) {
_json["packages"] = packages.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// The response from listing repositories.
class ListRepositoriesResponse {
/// The token to retrieve the next page of repositories, or empty if there are
/// no more repositories to return.
core.String nextPageToken;
/// The repositories returned.
core.List<Repository> repositories;
ListRepositoriesResponse();
ListRepositoriesResponse.fromJson(core.Map _json) {
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
if (_json.containsKey("repositories")) {
repositories = (_json["repositories"] as core.List)
.map<Repository>((value) => new Repository.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
if (repositories != null) {
_json["repositories"] =
repositories.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// The response from listing tags.
class ListTagsResponse {
/// The token to retrieve the next page of tags, or empty if there are no more
/// tags to return.
core.String nextPageToken;
/// The tags returned.
core.List<Tag> tags;
ListTagsResponse();
ListTagsResponse.fromJson(core.Map _json) {
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
if (_json.containsKey("tags")) {
tags = (_json["tags"] as core.List)
.map<Tag>((value) => new Tag.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
if (tags != null) {
_json["tags"] = tags.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// The response from listing versions.
class ListVersionsResponse {
/// The token to retrieve the next page of versions, or empty if there are no
/// more versions to return.
core.String nextPageToken;
/// The versions returned.
core.List<Version> versions;
ListVersionsResponse();
ListVersionsResponse.fromJson(core.Map _json) {
if (_json.containsKey("nextPageToken")) {
nextPageToken = _json["nextPageToken"];
}
if (_json.containsKey("versions")) {
versions = (_json["versions"] as core.List)
.map<Version>((value) => new Version.fromJson(value))
.toList();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (nextPageToken != null) {
_json["nextPageToken"] = nextPageToken;
}
if (versions != null) {
_json["versions"] = versions.map((value) => (value).toJson()).toList();
}
return _json;
}
}
/// A resource that represents Google Cloud Platform location.
class Location {
/// The friendly name for this location, typically a nearby city name. For
/// example, "Tokyo".
core.String displayName;
/// Cross-service attributes for the location. For example
/// {"cloud.googleapis.com/region": "us-east1"}
core.Map<core.String, core.String> labels;
/// The canonical id for this location. For example: `"us-east1"`.
core.String locationId;
/// Service-specific metadata. For example the available capacity at the given
/// location.
///
/// 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;
/// Resource name for the location, which may vary between implementations.
/// For example: `"projects/example-project/locations/us-east1"`
core.String name;
Location();
Location.fromJson(core.Map _json) {
if (_json.containsKey("displayName")) {
displayName = _json["displayName"];
}
if (_json.containsKey("labels")) {
labels = (_json["labels"] as core.Map).cast<core.String, core.String>();
}
if (_json.containsKey("locationId")) {
locationId = _json["locationId"];
}
if (_json.containsKey("metadata")) {
metadata =
(_json["metadata"] as core.Map).cast<core.String, core.Object>();
}
if (_json.containsKey("name")) {
name = _json["name"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (displayName != null) {
_json["displayName"] = displayName;
}
if (labels != null) {
_json["labels"] = labels;
}
if (locationId != null) {
_json["locationId"] = locationId;
}
if (metadata != null) {
_json["metadata"] = metadata;
}
if (name != null) {
_json["name"] = name;
}
return _json;
}
}
/// 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 response of the operation in case of success. 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();
Operation.fromJson(core.Map _json) {
if (_json.containsKey("done")) {
done = _json["done"];
}
if (_json.containsKey("error")) {
error = new Status.fromJson(_json["error"]);
}
if (_json.containsKey("metadata")) {
metadata =
(_json["metadata"] as core.Map).cast<core.String, core.Object>();
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("response")) {
response =
(_json["response"] as core.Map).cast<core.String, core.Object>();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (done != null) {
_json["done"] = done;
}
if (error != null) {
_json["error"] = (error).toJson();
}
if (metadata != null) {
_json["metadata"] = metadata;
}
if (name != null) {
_json["name"] = name;
}
if (response != null) {
_json["response"] = response;
}
return _json;
}
}
/// Packages are named collections of versions.
class Package {
/// The time when the package was created.
core.String createTime;
/// The display name of the package.
core.String displayName;
/// The name of the package, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
core.String name;
/// The time when the package was last updated. This includes publishing a new
/// version of the package.
core.String updateTime;
Package();
Package.fromJson(core.Map _json) {
if (_json.containsKey("createTime")) {
createTime = _json["createTime"];
}
if (_json.containsKey("displayName")) {
displayName = _json["displayName"];
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("updateTime")) {
updateTime = _json["updateTime"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (createTime != null) {
_json["createTime"] = createTime;
}
if (displayName != null) {
_json["displayName"] = displayName;
}
if (name != null) {
_json["name"] = name;
}
if (updateTime != null) {
_json["updateTime"] = updateTime;
}
return _json;
}
}
/// An Identity and Access Management (IAM) policy, which specifies access
/// controls for Google Cloud resources. A `Policy` is a collection of
/// `bindings`. A `binding` binds one or more `members` to a single `role`.
/// Members can be user accounts, service accounts, Google groups, and domains
/// (such as G Suite). A `role` is a named list of permissions; each `role` can
/// be an IAM predefined role or a user-created custom role. For some types of
/// Google Cloud resources, a `binding` can also specify a `condition`, which is
/// a logical expression that allows access to a resource only if the expression
/// evaluates to `true`. A condition can add constraints based on attributes of
/// the request, the resource, or both. To learn which resources support
/// conditions in their IAM policies, see the [IAM
/// documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
/// **JSON example:** { "bindings": [ { "role":
/// "roles/resourcemanager.organizationAdmin", "members": [
/// "user:mike@example.com", "group:admins@example.com", "domain:google.com",
/// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
/// "roles/resourcemanager.organizationViewer", "members": [
/// "user:eve@example.com" ], "condition": { "title": "expirable access",
/// "description": "Does not grant access after Sep 2020", "expression":
/// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
/// "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: -
/// user:mike@example.com - group:admins@example.com - domain:google.com -
/// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
/// roles/resourcemanager.organizationAdmin - members: - user:eve@example.com
/// role: roles/resourcemanager.organizationViewer condition: title: expirable
/// access description: Does not grant access after Sep 2020 expression:
/// request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= -
/// version: 3 For a description of IAM and its features, see the [IAM
/// documentation](https://cloud.google.com/iam/docs/).
class Policy {
/// Associates a list of `members` to a `role`. Optionally, may specify a
/// `condition` that determines how and when the `bindings` are applied. Each
/// of the `bindings` must contain at least one member.
core.List<Binding> bindings;
/// `etag` is used for optimistic concurrency control as a way to help prevent
/// simultaneous updates of a policy from overwriting each other. It is
/// strongly suggested that systems make use of the `etag` in the
/// read-modify-write cycle to perform policy updates in order to avoid race
/// conditions: An `etag` is returned in the response to `getIamPolicy`, and
/// systems are expected to put that etag in the request to `setIamPolicy` to
/// ensure that their change will be applied to the same version of the
/// policy. **Important:** If you use IAM Conditions, you must include the
/// `etag` field whenever you call `setIamPolicy`. If you omit this field,
/// then IAM allows you to overwrite a version `3` policy with a version `1`
/// policy, and all of the conditions in the version `3` policy are lost.
core.String etag;
core.List<core.int> get etagAsBytes {
return convert.base64.decode(etag);
}
set etagAsBytes(core.List<core.int> _bytes) {
etag =
convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
}
/// Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
/// Requests that specify an invalid value are rejected. Any operation that
/// affects conditional role bindings must specify version `3`. This
/// requirement applies to the following operations: * Getting a policy that
/// includes a conditional role binding * Adding a conditional role binding to
/// a policy * Changing a conditional role binding in a policy * Removing any
/// role binding, with or without a condition, from a policy that includes
/// conditions **Important:** If you use IAM Conditions, you must include the
/// `etag` field whenever you call `setIamPolicy`. If you omit this field,
/// then IAM allows you to overwrite a version `3` policy with a version `1`
/// policy, and all of the conditions in the version `3` policy are lost. If a
/// policy does not include any conditions, operations on that policy may
/// specify any valid version or leave the field unset. To learn which
/// resources support conditions in their IAM policies, see the [IAM
/// documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
core.int version;
Policy();
Policy.fromJson(core.Map _json) {
if (_json.containsKey("bindings")) {
bindings = (_json["bindings"] as core.List)
.map<Binding>((value) => new Binding.fromJson(value))
.toList();
}
if (_json.containsKey("etag")) {
etag = _json["etag"];
}
if (_json.containsKey("version")) {
version = _json["version"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (bindings != null) {
_json["bindings"] = bindings.map((value) => (value).toJson()).toList();
}
if (etag != null) {
_json["etag"] = etag;
}
if (version != null) {
_json["version"] = version;
}
return _json;
}
}
/// A Repository for storing artifacts with a specific format.
class Repository {
/// The time when the repository was created.
core.String createTime;
/// The user-provided description of the repository.
core.String description;
/// The format of packages that are stored in the repository.
/// Possible string values are:
/// - "FORMAT_UNSPECIFIED" : Unspecified package format.
/// - "DOCKER" : Docker package format.
/// - "MAVEN" : Maven package format.
/// - "NPM" : NPM package format.
/// - "APT" : APT package format.
core.String format;
/// The Cloud KMS resource name of the customer managed encryption key that’s
/// used to encrypt the contents of the Repository. Has the form:
/// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
/// This value may not be changed after the Repository has been created.
core.String kmsKeyName;
/// Labels with user-defined metadata. This field may contain up to 64
/// entries. Label keys and values may be no longer than 63 characters. Label
/// keys must begin with a lowercase letter and may only contain lowercase
/// letters, numeric characters, underscores, and dashes.
core.Map<core.String, core.String> labels;
/// The name of the repository, for example:
/// "projects/p1/locations/us-central1/repositories/repo1".
core.String name;
/// The time when the repository was last updated.
core.String updateTime;
Repository();
Repository.fromJson(core.Map _json) {
if (_json.containsKey("createTime")) {
createTime = _json["createTime"];
}
if (_json.containsKey("description")) {
description = _json["description"];
}
if (_json.containsKey("format")) {
format = _json["format"];
}
if (_json.containsKey("kmsKeyName")) {
kmsKeyName = _json["kmsKeyName"];
}
if (_json.containsKey("labels")) {
labels = (_json["labels"] as core.Map).cast<core.String, core.String>();
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("updateTime")) {
updateTime = _json["updateTime"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (createTime != null) {
_json["createTime"] = createTime;
}
if (description != null) {
_json["description"] = description;
}
if (format != null) {
_json["format"] = format;
}
if (kmsKeyName != null) {
_json["kmsKeyName"] = kmsKeyName;
}
if (labels != null) {
_json["labels"] = labels;
}
if (name != null) {
_json["name"] = name;
}
if (updateTime != null) {
_json["updateTime"] = updateTime;
}
return _json;
}
}
/// Request message for `SetIamPolicy` method.
class SetIamPolicyRequest {
/// REQUIRED: The complete policy to be applied to the `resource`. The size of
/// the policy is limited to a few 10s of KB. An empty policy is a valid
/// policy but certain Cloud Platform services (such as Projects) might reject
/// them.
Policy policy;
SetIamPolicyRequest();
SetIamPolicyRequest.fromJson(core.Map _json) {
if (_json.containsKey("policy")) {
policy = new Policy.fromJson(_json["policy"]);
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (policy != null) {
_json["policy"] = (policy).toJson();
}
return _json;
}
}
/// 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).
class Status {
/// The status code, which should be an enum value of google.rpc.Code.
core.int code;
/// A list of messages that carry the error details. There is a common set of
/// message types for APIs to use.
///
/// 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.List<core.Map<core.String, core.Object>> details;
/// A developer-facing error message, which should be in English. Any
/// user-facing error message should be localized and sent in the
/// google.rpc.Status.details field, or localized by the client.
core.String message;
Status();
Status.fromJson(core.Map _json) {
if (_json.containsKey("code")) {
code = _json["code"];
}
if (_json.containsKey("details")) {
details = (_json["details"] as core.List)
.map<core.Map<core.String, core.Object>>(
(value) => (value as core.Map).cast<core.String, core.Object>())
.toList();
}
if (_json.containsKey("message")) {
message = _json["message"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (code != null) {
_json["code"] = code;
}
if (details != null) {
_json["details"] = details;
}
if (message != null) {
_json["message"] = message;
}
return _json;
}
}
/// Tags point to a version and represent an alternative name that can be used
/// to access the version.
class Tag {
/// The name of the tag, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
core.String name;
/// The name of the version the tag refers to, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811"
core.String version;
Tag();
Tag.fromJson(core.Map _json) {
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("version")) {
version = _json["version"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (name != null) {
_json["name"] = name;
}
if (version != null) {
_json["version"] = version;
}
return _json;
}
}
/// Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest {
/// The set of permissions to check for the `resource`. Permissions with
/// wildcards (such as '*' or 'storage.*') are not allowed. For more
/// information see [IAM
/// Overview](https://cloud.google.com/iam/docs/overview#permissions).
core.List<core.String> permissions;
TestIamPermissionsRequest();
TestIamPermissionsRequest.fromJson(core.Map _json) {
if (_json.containsKey("permissions")) {
permissions = (_json["permissions"] as core.List).cast<core.String>();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (permissions != null) {
_json["permissions"] = permissions;
}
return _json;
}
}
/// Response message for `TestIamPermissions` method.
class TestIamPermissionsResponse {
/// A subset of `TestPermissionsRequest.permissions` that the caller is
/// allowed.
core.List<core.String> permissions;
TestIamPermissionsResponse();
TestIamPermissionsResponse.fromJson(core.Map _json) {
if (_json.containsKey("permissions")) {
permissions = (_json["permissions"] as core.List).cast<core.String>();
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (permissions != null) {
_json["permissions"] = permissions;
}
return _json;
}
}
/// The body of a version resource. A version resource represents a collection
/// of components, such as files and other data. This may correspond to a
/// version in many package management schemes.
class Version {
/// The time when the version was created.
core.String createTime;
/// Optional. Description of the version, as specified in its metadata.
core.String description;
/// The name of the version, for example:
/// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1".
core.String name;
/// Output only. A list of related tags. Will contain up to 100 tags that
/// reference this version.
core.List<Tag> relatedTags;
/// The time when the version was last updated.
core.String updateTime;
Version();
Version.fromJson(core.Map _json) {
if (_json.containsKey("createTime")) {
createTime = _json["createTime"];
}
if (_json.containsKey("description")) {
description = _json["description"];
}
if (_json.containsKey("name")) {
name = _json["name"];
}
if (_json.containsKey("relatedTags")) {
relatedTags = (_json["relatedTags"] as core.List)
.map<Tag>((value) => new Tag.fromJson(value))
.toList();
}
if (_json.containsKey("updateTime")) {
updateTime = _json["updateTime"];
}
}
core.Map<core.String, core.Object> toJson() {
final core.Map<core.String, core.Object> _json =
new core.Map<core.String, core.Object>();
if (createTime != null) {
_json["createTime"] = createTime;
}
if (description != null) {
_json["description"] = description;
}
if (name != null) {
_json["name"] = name;
}
if (relatedTags != null) {
_json["relatedTags"] =
relatedTags.map((value) => (value).toJson()).toList();
}
if (updateTime != null) {
_json["updateTime"] = updateTime;
}
return _json;
}
}