blob: 329fd22b3a7a878c3ad9452648679ca9a5068b9c [file] [edit]
// Copyright 2024 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
/// Parallelstore API - v1
///
/// For more information, see <https://cloud.google.com/parallelstore>
///
/// Create an instance of [ParallelstoreApi] to access these resources:
///
/// - [ProjectsResource]
/// - [ProjectsLocationsResource]
/// - [ProjectsLocationsInstancesResource]
/// - [ProjectsLocationsOperationsResource]
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 ParallelstoreApi {
/// 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);
ParallelstoreApi(
http.Client client, {
core.String rootUrl = 'https://parallelstore.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;
ProjectsLocationsInstancesResource get instances =>
ProjectsLocationsInstancesResource(_requester);
ProjectsLocationsOperationsResource get operations =>
ProjectsLocationsOperationsResource(_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.
///
/// 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 ProjectsLocationsInstancesResource {
final commons.ApiRequester _requester;
ProjectsLocationsInstancesResource(commons.ApiRequester client)
: _requester = client;
/// Creates a Parallelstore instance in a given project and location.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The instance's project and location, in the format
/// `projects/{project}/locations/{location}`. Locations map to Google Cloud
/// zones; for example, `us-west1-b`.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [instanceId] - Required. The name of the Parallelstore instance. * Must
/// contain only lowercase letters, numbers, and hyphens. * Must start with a
/// letter. * Must be between 1-63 characters. * Must end with a number or a
/// letter. * Must be unique within the customer project / location
///
/// [requestId] - Optional. An optional request ID to identify requests.
/// Specify a unique request ID so that if you must retry your request, the
/// server will know to ignore the request if it has already been completed.
/// The server will guarantee that for at least 60 minutes since the first
/// request. For example, consider a situation where you make an initial
/// request and the request times out. If you make the request again with the
/// same request ID, the server can check if original operation with the same
/// request ID was received, and if so, will ignore the second request. This
/// prevents clients from accidentally creating duplicate commitments. The
/// request ID must be a valid UUID with the exception that zero UUID is not
/// supported (00000000-0000-0000-0000-000000000000).
///
/// [$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(
Instance request,
core.String parent, {
core.String? instanceId,
core.String? requestId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'instanceId': ?instanceId == null ? null : [instanceId],
'requestId': ?requestId == null ? null : [requestId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/instances';
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 instance.
///
/// Request parameters:
///
/// [name] - Required. Name of the resource
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [requestId] - Optional. An optional request ID to identify requests.
/// Specify a unique request ID so that if you must retry your request, the
/// server will know to ignore the request if it has already been completed.
/// The server will guarantee that for at least 60 minutes after the first
/// request. For example, consider a situation where you make an initial
/// request and the request times out. If you make the request again with the
/// same request ID, the server can check if original operation with the same
/// request ID was received, and if so, will ignore the second request. This
/// prevents clients from accidentally creating duplicate commitments. The
/// request ID must be a valid UUID with the exception that zero UUID is not
/// supported (00000000-0000-0000-0000-000000000000).
///
/// [$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? requestId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'requestId': ?requestId == null ? null : [requestId],
'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>);
}
/// Copies data from Parallelstore to Cloud Storage.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Required. Name of the resource.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$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> exportData(
ExportDataRequest 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') + ':exportData';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single instance.
///
/// Request parameters:
///
/// [name] - Required. The instance resource name, in the format
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Instance].
///
/// 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<Instance> 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 Instance.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Copies data from Cloud Storage to Parallelstore.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Required. Name of the resource.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$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> importData(
ImportDataRequest 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') + ':importData';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists all instances in a given project and location.
///
/// Request parameters:
///
/// [parent] - Required. The project and location for which to retrieve
/// instance information, in the format
/// `projects/{project_id}/locations/{location}`. To retrieve instance
/// information for all locations, use "-" as the value of `{location}`.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Optional. Filtering results.
///
/// [orderBy] - Optional. Hint for how to order the results.
///
/// [pageSize] - Optional. Requested page size. Server may return fewer items
/// than requested. If unspecified, the server will pick an appropriate
/// default.
///
/// [pageToken] - Optional. A token identifying a page of results the server
/// should return.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListInstancesResponse].
///
/// 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<ListInstancesResponse> 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') + '/instances';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListInstancesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates the parameters of a single instance.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Identifier. The resource name of the instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance_id}`.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [requestId] - Optional. An optional request ID to identify requests.
/// Specify a unique request ID so that if you must retry your request, the
/// server will know to ignore the request if it has already been completed.
/// The server will guarantee that for at least 60 minutes since the first
/// request. For example, consider a situation where you make an initial
/// request and the request times out. If you make the request again with the
/// same request ID, the server can check if original operation with the same
/// request ID was received, and if so, will ignore the second request. This
/// prevents clients from accidentally creating duplicate commitments. The
/// request ID must be a valid UUID with the exception that zero UUID is not
/// supported (00000000-0000-0000-0000-000000000000).
///
/// [updateMask] - Required. Mask of fields to update. Field mask is used to
/// specify the fields to be overwritten in the Instance resource by the
/// update. At least one path must be supplied in this field. The fields
/// specified in the update_mask are relative to the resource, not the full
/// request.
///
/// [$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(
Instance request,
core.String name, {
core.String? requestId,
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'requestId': ?requestId == null ? null : [requestId],
'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 [GoogleProtobufEmpty].
///
/// 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<GoogleProtobufEmpty> 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 GoogleProtobufEmpty.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 [GoogleProtobufEmpty].
///
/// 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<GoogleProtobufEmpty> 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 GoogleProtobufEmpty.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 e.g. when `parent` is set to
/// `"projects/example/locations/-"`. This field is not by default supported
/// 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>,
);
}
}
/// The request message for Operations.CancelOperation.
typedef CancelOperationRequest = $Empty;
/// Cloud Storage as the destination of a data transfer.
typedef DestinationGcsBucket = $GcsBucket;
/// Parallelstore as the destination of a data transfer.
typedef DestinationParallelstore = $Parallelstore;
/// Export data from Parallelstore to Cloud Storage.
class ExportDataRequest {
/// Cloud Storage destination.
DestinationGcsBucket? destinationGcsBucket;
/// The metadata options for the export data.
///
/// Optional.
TransferMetadataOptions? metadataOptions;
/// An optional request ID to identify requests.
///
/// Specify a unique request ID so that if you must retry your request, the
/// server will know to ignore the request if it has already been completed.
/// The server will guarantee that for at least 60 minutes since the first
/// request. For example, consider a situation where you make an initial
/// request and the request times out. If you make the request again with the
/// same request ID, the server can check if original operation with the same
/// request ID was received, and if so, will ignore the second request. This
/// prevents clients from accidentally creating duplicate commitments. The
/// request ID must be a valid UUID with the exception that zero UUID is not
/// supported (00000000-0000-0000-0000-000000000000).
///
/// Optional.
core.String? requestId;
/// User-specified Service Account (SA) credentials to be used when performing
/// the transfer.
///
/// Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` *
/// `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
/// * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If
/// unspecified, the Parallelstore service agent is used:
/// `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`
///
/// Optional.
core.String? serviceAccount;
/// Parallelstore source.
SourceParallelstore? sourceParallelstore;
ExportDataRequest({
this.destinationGcsBucket,
this.metadataOptions,
this.requestId,
this.serviceAccount,
this.sourceParallelstore,
});
ExportDataRequest.fromJson(core.Map json_)
: this(
destinationGcsBucket: json_.containsKey('destinationGcsBucket')
? DestinationGcsBucket.fromJson(
json_['destinationGcsBucket']
as core.Map<core.String, core.dynamic>,
)
: null,
metadataOptions: json_.containsKey('metadataOptions')
? TransferMetadataOptions.fromJson(
json_['metadataOptions'] as core.Map<core.String, core.dynamic>,
)
: null,
requestId: json_['requestId'] as core.String?,
serviceAccount: json_['serviceAccount'] as core.String?,
sourceParallelstore: json_.containsKey('sourceParallelstore')
? SourceParallelstore.fromJson(
json_['sourceParallelstore']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final destinationGcsBucket = this.destinationGcsBucket;
final metadataOptions = this.metadataOptions;
final requestId = this.requestId;
final serviceAccount = this.serviceAccount;
final sourceParallelstore = this.sourceParallelstore;
return {
'destinationGcsBucket': ?destinationGcsBucket,
'metadataOptions': ?metadataOptions,
'requestId': ?requestId,
'serviceAccount': ?serviceAccount,
'sourceParallelstore': ?sourceParallelstore,
};
}
}
/// 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 GoogleProtobufEmpty = $Empty;
/// Import data from Cloud Storage into a Parallelstore instance.
class ImportDataRequest {
/// Parallelstore destination.
DestinationParallelstore? destinationParallelstore;
/// The transfer metadata options for the import data.
///
/// Optional.
TransferMetadataOptions? metadataOptions;
/// An optional request ID to identify requests.
///
/// Specify a unique request ID so that if you must retry your request, the
/// server will know to ignore the request if it has already been completed.
/// The server will guarantee that for at least 60 minutes since the first
/// request. For example, consider a situation where you make an initial
/// request and the request times out. If you make the request again with the
/// same request ID, the server can check if original operation with the same
/// request ID was received, and if so, will ignore the second request. This
/// prevents clients from accidentally creating duplicate commitments. The
/// request ID must be a valid UUID with the exception that zero UUID is not
/// supported (00000000-0000-0000-0000-000000000000).
///
/// Optional.
core.String? requestId;
/// User-specified service account credentials to be used when performing the
/// transfer.
///
/// Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` *
/// `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
/// * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If
/// unspecified, the Parallelstore service agent is used:
/// `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`
///
/// Optional.
core.String? serviceAccount;
/// The Cloud Storage source bucket and, optionally, path inside the bucket.
SourceGcsBucket? sourceGcsBucket;
ImportDataRequest({
this.destinationParallelstore,
this.metadataOptions,
this.requestId,
this.serviceAccount,
this.sourceGcsBucket,
});
ImportDataRequest.fromJson(core.Map json_)
: this(
destinationParallelstore: json_.containsKey('destinationParallelstore')
? DestinationParallelstore.fromJson(
json_['destinationParallelstore']
as core.Map<core.String, core.dynamic>,
)
: null,
metadataOptions: json_.containsKey('metadataOptions')
? TransferMetadataOptions.fromJson(
json_['metadataOptions'] as core.Map<core.String, core.dynamic>,
)
: null,
requestId: json_['requestId'] as core.String?,
serviceAccount: json_['serviceAccount'] as core.String?,
sourceGcsBucket: json_.containsKey('sourceGcsBucket')
? SourceGcsBucket.fromJson(
json_['sourceGcsBucket'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final destinationParallelstore = this.destinationParallelstore;
final metadataOptions = this.metadataOptions;
final requestId = this.requestId;
final serviceAccount = this.serviceAccount;
final sourceGcsBucket = this.sourceGcsBucket;
return {
'destinationParallelstore': ?destinationParallelstore,
'metadataOptions': ?metadataOptions,
'requestId': ?requestId,
'serviceAccount': ?serviceAccount,
'sourceGcsBucket': ?sourceGcsBucket,
};
}
}
/// A Parallelstore instance.
class Instance {
/// A list of IPv4 addresses used for client side configuration.
///
/// Output only.
core.List<core.String>? accessPoints;
/// The instance's storage capacity in Gibibytes (GiB).
///
/// Allowed values are between 12000 and 100000, in multiples of 4000; e.g.,
/// 12000, 16000, 20000, ...
///
/// Required. Immutable.
core.String? capacityGib;
/// The time when the instance was created.
///
/// Output only.
core.String? createTime;
/// Deprecated: The version of DAOS software running in the instance.
///
/// Output only.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.String? daosVersion;
/// The deployment type of the instance.
///
/// Allowed values are: * `SCRATCH`: the instance is a scratch instance. *
/// `PERSISTENT`: the instance is a persistent instance.
///
/// Optional. Immutable.
/// Possible string values are:
/// - "DEPLOYMENT_TYPE_UNSPECIFIED" : Default Deployment Type It is equivalent
/// to SCRATCH
/// - "SCRATCH" : Scratch
/// - "PERSISTENT" : Persistent
core.String? deploymentType;
/// The description of the instance.
///
/// 2048 characters or less.
///
/// Optional.
core.String? description;
/// Stripe level for directories.
///
/// Allowed values are: * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when
/// directories contain a small number of files. *
/// `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads
/// involving a mix of small and large directories. *
/// `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large
/// number of files.
///
/// Optional. Immutable.
/// Possible string values are:
/// - "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED" : If not set, DirectoryStripeLevel
/// will default to DIRECTORY_STRIPE_LEVEL_MAX
/// - "DIRECTORY_STRIPE_LEVEL_MIN" : Minimum directory striping
/// - "DIRECTORY_STRIPE_LEVEL_BALANCED" : Medium directory striping
/// - "DIRECTORY_STRIPE_LEVEL_MAX" : Maximum directory striping
core.String? directoryStripeLevel;
/// The ID of the IP address range being used by the instance's VPC network.
///
/// This field is populated by the service and contains the value currently
/// used by the service.
///
/// Output only. Immutable.
core.String? effectiveReservedIpRange;
/// Stripe level for files.
///
/// Allowed values are: * `FILE_STRIPE_LEVEL_MIN`: offers the best performance
/// for small size files. * `FILE_STRIPE_LEVEL_BALANCED`: balances performance
/// for workloads involving a mix of small and large files. *
/// `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files.
///
/// Optional. Immutable.
/// Possible string values are:
/// - "FILE_STRIPE_LEVEL_UNSPECIFIED" : If not set, FileStripeLevel will
/// default to FILE_STRIPE_LEVEL_BALANCED
/// - "FILE_STRIPE_LEVEL_MIN" : Minimum file striping
/// - "FILE_STRIPE_LEVEL_BALANCED" : Medium file striping
/// - "FILE_STRIPE_LEVEL_MAX" : Maximum file striping
core.String? fileStripeLevel;
/// Cloud Labels are a flexible and lightweight mechanism for organizing cloud
/// resources into groups that reflect a customer's organizational needs and
/// deployment strategies.
///
/// See https://cloud.google.com/resource-manager/docs/labels-overview for
/// details.
///
/// Optional.
core.Map<core.String, core.String>? labels;
/// Identifier.
///
/// The resource name of the instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance_id}`.
core.String? name;
/// The name of the Compute Engine
/// [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the instance
/// is connected.
///
/// Optional. Immutable.
core.String? network;
/// The ID of the IP address range being used by the instance's VPC network.
///
/// See
/// [Configure a VPC network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc).
/// If no ID is provided, all ranges are considered.
///
/// Optional. Immutable.
core.String? reservedIpRange;
/// The instance state.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Not set.
/// - "CREATING" : The instance is being created.
/// - "ACTIVE" : The instance is available for use.
/// - "DELETING" : The instance is being deleted.
/// - "FAILED" : The instance is not usable.
/// - "UPGRADING" : The instance is being upgraded.
/// - "REPAIRING" : The instance is being repaired. This should only be used
/// by instances using the `PERSISTENT` deployment type.
core.String? state;
/// The time when the instance was updated.
///
/// Output only.
core.String? updateTime;
Instance({
this.accessPoints,
this.capacityGib,
this.createTime,
this.daosVersion,
this.deploymentType,
this.description,
this.directoryStripeLevel,
this.effectiveReservedIpRange,
this.fileStripeLevel,
this.labels,
this.name,
this.network,
this.reservedIpRange,
this.state,
this.updateTime,
});
Instance.fromJson(core.Map json_)
: this(
accessPoints: (json_['accessPoints'] as core.List?)
?.map((value) => value as core.String)
.toList(),
capacityGib: json_['capacityGib'] as core.String?,
createTime: json_['createTime'] as core.String?,
daosVersion: json_['daosVersion'] as core.String?,
deploymentType: json_['deploymentType'] as core.String?,
description: json_['description'] as core.String?,
directoryStripeLevel: json_['directoryStripeLevel'] as core.String?,
effectiveReservedIpRange:
json_['effectiveReservedIpRange'] as core.String?,
fileStripeLevel: json_['fileStripeLevel'] 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?,
network: json_['network'] as core.String?,
reservedIpRange: json_['reservedIpRange'] as core.String?,
state: json_['state'] as core.String?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final accessPoints = this.accessPoints;
final capacityGib = this.capacityGib;
final createTime = this.createTime;
final daosVersion = this.daosVersion;
final deploymentType = this.deploymentType;
final description = this.description;
final directoryStripeLevel = this.directoryStripeLevel;
final effectiveReservedIpRange = this.effectiveReservedIpRange;
final fileStripeLevel = this.fileStripeLevel;
final labels = this.labels;
final name = this.name;
final network = this.network;
final reservedIpRange = this.reservedIpRange;
final state = this.state;
final updateTime = this.updateTime;
return {
'accessPoints': ?accessPoints,
'capacityGib': ?capacityGib,
'createTime': ?createTime,
'daosVersion': ?daosVersion,
'deploymentType': ?deploymentType,
'description': ?description,
'directoryStripeLevel': ?directoryStripeLevel,
'effectiveReservedIpRange': ?effectiveReservedIpRange,
'fileStripeLevel': ?fileStripeLevel,
'labels': ?labels,
'name': ?name,
'network': ?network,
'reservedIpRange': ?reservedIpRange,
'state': ?state,
'updateTime': ?updateTime,
};
}
}
/// Response from ListInstances.
class ListInstancesResponse {
/// The list of Parallelstore instances.
core.List<Instance>? instances;
/// A token identifying a page of results the server should return.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListInstancesResponse({this.instances, this.nextPageToken, this.unreachable});
ListInstancesResponse.fromJson(core.Map json_)
: this(
instances: (json_['instances'] as core.List?)
?.map(
(value) => Instance.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 instances = this.instances;
final nextPageToken = this.nextPageToken;
final unreachable = this.unreachable;
return {
'instances': ?instances,
'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 e.g. 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,
};
}
}
/// A resource that represents a Google Cloud location.
typedef Location = $Location00;
/// 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,
};
}
}
/// Cloud Storage as the source of a data transfer.
typedef SourceGcsBucket = $GcsBucket;
/// Parallelstore as the source of a data transfer.
typedef SourceParallelstore = $Parallelstore;
/// 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;
/// Transfer metadata options for the instance.
class TransferMetadataOptions {
/// The GID preservation behavior.
///
/// Optional.
/// Possible string values are:
/// - "GID_UNSPECIFIED" : default is GID_NUMBER_PRESERVE.
/// - "GID_SKIP" : Do not preserve GID during a transfer job.
/// - "GID_NUMBER_PRESERVE" : Preserve GID that is in number format during a
/// transfer job.
core.String? gid;
/// The mode preservation behavior.
///
/// Optional.
/// Possible string values are:
/// - "MODE_UNSPECIFIED" : default is MODE_PRESERVE.
/// - "MODE_SKIP" : Do not preserve mode during a transfer job.
/// - "MODE_PRESERVE" : Preserve mode during a transfer job.
core.String? mode;
/// The UID preservation behavior.
///
/// Optional.
/// Possible string values are:
/// - "UID_UNSPECIFIED" : default is UID_NUMBER_PRESERVE.
/// - "UID_SKIP" : Do not preserve UID during a transfer job.
/// - "UID_NUMBER_PRESERVE" : Preserve UID that is in number format during a
/// transfer job.
core.String? uid;
TransferMetadataOptions({this.gid, this.mode, this.uid});
TransferMetadataOptions.fromJson(core.Map json_)
: this(
gid: json_['gid'] as core.String?,
mode: json_['mode'] as core.String?,
uid: json_['uid'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final gid = this.gid;
final mode = this.mode;
final uid = this.uid;
return {'gid': ?gid, 'mode': ?mode, 'uid': ?uid};
}
}