| // This is a generated file (see the discoveryapis_generator project). |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: file_names |
| // ignore_for_file: library_names |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_parenthesis |
| // ignore_for_file: unnecessary_string_interpolations |
| |
| /// Workflows API - v1beta |
| /// |
| /// Orchestrate Workflows consisting of Google Cloud APIs, SaaS APIs or private |
| /// API endpoints. |
| /// |
| /// For more information, see <https://cloud.google.com/workflows> |
| /// |
| /// Create an instance of [WorkflowsApi] to access these resources: |
| /// |
| /// - [ProjectsResource] |
| /// - [ProjectsLocationsResource] |
| /// - [ProjectsLocationsOperationsResource] |
| /// - [ProjectsLocationsWorkflowsResource] |
| library workflows.v1beta; |
| |
| 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 '../src/user_agent.dart'; |
| |
| export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| show ApiRequestError, DetailedApiRequestError; |
| |
| /// Orchestrate Workflows consisting of Google Cloud APIs, SaaS APIs or private |
| /// API endpoints. |
| class WorkflowsApi { |
| /// View and manage your data across Google Cloud Platform services |
| static const cloudPlatformScope = |
| 'https://www.googleapis.com/auth/cloud-platform'; |
| |
| final commons.ApiRequester _requester; |
| |
| ProjectsResource get projects => ProjectsResource(_requester); |
| |
| WorkflowsApi(http.Client client, |
| {core.String rootUrl = 'https://workflows.googleapis.com/', |
| core.String servicePath = ''}) |
| : _requester = |
| commons.ApiRequester(client, rootUrl, servicePath, userAgent); |
| } |
| |
| class ProjectsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsResource get locations => |
| ProjectsLocationsResource(_requester); |
| |
| ProjectsResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class ProjectsLocationsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsOperationsResource get operations => |
| ProjectsLocationsOperationsResource(_requester); |
| ProjectsLocationsWorkflowsResource get workflows => |
| ProjectsLocationsWorkflowsResource(_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 { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$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/\[^/\]+$`. |
| /// |
| /// [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 [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 filter, |
| core.int pageSize, |
| core.String pageToken, |
| core.String $fields, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if (filter != null) { |
| _queryParams['filter'] = [filter]; |
| } |
| if (pageSize != null) { |
| _queryParams['pageSize'] = ['${pageSize}']; |
| } |
| if (pageToken != null) { |
| _queryParams['pageToken'] = [pageToken]; |
| } |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + |
| commons.Escaper.ecapeVariableReserved('$name') + |
| '/locations'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return ListLocationsResponse.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsOperationsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsOperationsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Deletes a long-running operation. |
| /// |
| /// This method indicates that the client is no longer interested in the |
| /// operation result. It does not cancel the operation. If the server doesn't |
| /// support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation resource to be deleted. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete( |
| core.String name, { |
| core.String $fields, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'DELETE', |
| queryParams: _queryParams, |
| ); |
| return Empty.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets the latest state of a long-running operation. |
| /// |
| /// Clients can use this method to poll the operation result at intervals as |
| /// recommended by the API service. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation resource. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Operation> get( |
| core.String name, { |
| core.String $fields, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$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`. |
| /// 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, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if (filter != null) { |
| _queryParams['filter'] = [filter]; |
| } |
| if (pageSize != null) { |
| _queryParams['pageSize'] = ['${pageSize}']; |
| } |
| if (pageToken != null) { |
| _queryParams['pageToken'] = [pageToken]; |
| } |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + |
| commons.Escaper.ecapeVariableReserved('$name') + |
| '/operations'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return ListOperationsResponse.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsWorkflowsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsWorkflowsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new workflow. |
| /// |
| /// If a workflow with the specified name already exists in the specified |
| /// project and location, the long running operation will return |
| /// ALREADY_EXISTS error. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Project and location in which the workflow should be |
| /// created. Format: projects/{project}/locations/{location} |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [workflowId] - Required. The ID of the workflow to be created. It has to |
| /// fulfill the following requirements: * Must contain only letters, numbers, |
| /// underscores and hyphens. * Must start with a letter. * Must be between |
| /// 1-64 characters. * Must end with a number or a letter. * Must be unique |
| /// within the customer project and location. |
| /// |
| /// [$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( |
| Workflow request, |
| core.String parent, { |
| core.String workflowId, |
| core.String $fields, |
| }) async { |
| final _body = |
| request == null ? null : convert.json.encode(request.toJson()); |
| if (parent == null) { |
| throw core.ArgumentError('Parameter parent is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if (workflowId != null) { |
| _queryParams['workflowId'] = [workflowId]; |
| } |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + |
| commons.Escaper.ecapeVariableReserved('$parent') + |
| '/workflows'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'POST', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes a workflow with the specified name. |
| /// |
| /// This method also cancels and deletes all running executions of the |
| /// workflow. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the workflow to be deleted. Format: |
| /// projects/{project}/locations/{location}/workflows/{workflow} |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Operation> delete( |
| core.String name, { |
| core.String $fields, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'DELETE', |
| queryParams: _queryParams, |
| ); |
| return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets details of a single Workflow. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the workflow which information should be |
| /// retrieved. Format: |
| /// projects/{project}/locations/{location}/workflows/{workflow} |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Workflow]. |
| /// |
| /// 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<Workflow> get( |
| core.String name, { |
| core.String $fields, |
| }) async { |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return Workflow.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists Workflows in a given project and location. |
| /// |
| /// The default order is not specified. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Project and location from which the workflows should |
| /// be listed. Format: projects/{project}/locations/{location} |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [filter] - Filter to restrict results to specific workflows. |
| /// |
| /// [orderBy] - Comma-separated list of fields that that specify the order of |
| /// the results. Default sorting order for a field is ascending. To specify |
| /// descending order for a field, append a " desc" suffix. If not specified, |
| /// the results will be returned in an unspecified order. |
| /// |
| /// [pageSize] - Maximum number of workflows to return per call. The service |
| /// may return fewer than this value. If the value is not specified, a default |
| /// value of 500 will be used. The maximum permitted value is 1000 and values |
| /// greater than 1000 will be coerced down to 1000. |
| /// |
| /// [pageToken] - A page token, received from a previous `ListWorkflows` call. |
| /// Provide this to retrieve the subsequent page. When paginating, all other |
| /// parameters provided to `ListWorkflows` must match the call that provided |
| /// the page token. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListWorkflowsResponse]. |
| /// |
| /// 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<ListWorkflowsResponse> list( |
| core.String parent, { |
| core.String filter, |
| core.String orderBy, |
| core.int pageSize, |
| core.String pageToken, |
| core.String $fields, |
| }) async { |
| if (parent == null) { |
| throw core.ArgumentError('Parameter parent is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if (filter != null) { |
| _queryParams['filter'] = [filter]; |
| } |
| if (orderBy != null) { |
| _queryParams['orderBy'] = [orderBy]; |
| } |
| if (pageSize != null) { |
| _queryParams['pageSize'] = ['${pageSize}']; |
| } |
| if (pageToken != null) { |
| _queryParams['pageToken'] = [pageToken]; |
| } |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + |
| commons.Escaper.ecapeVariableReserved('$parent') + |
| '/workflows'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return ListWorkflowsResponse.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing workflow. |
| /// |
| /// Running this method has no impact on already running executions of the |
| /// workflow. A new revision of the workflow may be created as a result of a |
| /// successful update operation. In that case, such revision will be used in |
| /// new workflow executions. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The resource name of the workflow. Format: |
| /// projects/{project}/locations/{location}/workflows/{workflow} |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`. |
| /// |
| /// [updateMask] - List of fields to be updated. If not present, the entire |
| /// workflow will be updated. |
| /// |
| /// [$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( |
| Workflow request, |
| core.String name, { |
| core.String updateMask, |
| core.String $fields, |
| }) async { |
| final _body = |
| request == null ? null : convert.json.encode(request.toJson()); |
| if (name == null) { |
| throw core.ArgumentError('Parameter name is required.'); |
| } |
| final _queryParams = <core.String, core.List<core.String>>{}; |
| if (updateMask != null) { |
| _queryParams['updateMask'] = [updateMask]; |
| } |
| if ($fields != null) { |
| _queryParams['fields'] = [$fields]; |
| } |
| |
| final _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'PATCH', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Operation.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| /// 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( |
| // ignore: avoid_unused_constructor_parameters |
| core.Map _json); |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| 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) => |
| Location.fromJson(value as core.Map<core.String, core.dynamic>)) |
| .toList(); |
| } |
| if (_json.containsKey('nextPageToken')) { |
| nextPageToken = _json['nextPageToken'] as core.String; |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <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'] as core.String; |
| } |
| if (_json.containsKey('operations')) { |
| operations = (_json['operations'] as core.List) |
| .map<Operation>((value) => |
| Operation.fromJson(value as core.Map<core.String, core.dynamic>)) |
| .toList(); |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| if (nextPageToken != null) { |
| _json['nextPageToken'] = nextPageToken; |
| } |
| if (operations != null) { |
| _json['operations'] = operations.map((value) => value.toJson()).toList(); |
| } |
| return _json; |
| } |
| } |
| |
| /// Response for the ListWorkflows method. |
| class ListWorkflowsResponse { |
| /// A token, which can be sent as `page_token` to retrieve the next page. |
| /// |
| /// If this field is omitted, there are no subsequent pages. |
| core.String nextPageToken; |
| |
| /// Unreachable resources. |
| core.List<core.String> unreachable; |
| |
| /// The workflows which match the request. |
| core.List<Workflow> workflows; |
| |
| ListWorkflowsResponse(); |
| |
| ListWorkflowsResponse.fromJson(core.Map _json) { |
| if (_json.containsKey('nextPageToken')) { |
| nextPageToken = _json['nextPageToken'] as core.String; |
| } |
| if (_json.containsKey('unreachable')) { |
| unreachable = (_json['unreachable'] as core.List) |
| .map<core.String>((value) => value as core.String) |
| .toList(); |
| } |
| if (_json.containsKey('workflows')) { |
| workflows = (_json['workflows'] as core.List) |
| .map<Workflow>((value) => |
| Workflow.fromJson(value as core.Map<core.String, core.dynamic>)) |
| .toList(); |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| if (nextPageToken != null) { |
| _json['nextPageToken'] = nextPageToken; |
| } |
| if (unreachable != null) { |
| _json['unreachable'] = unreachable; |
| } |
| if (workflows != null) { |
| _json['workflows'] = workflows.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'] as core.String; |
| } |
| if (_json.containsKey('labels')) { |
| labels = |
| (_json['labels'] as core.Map).cast<core.String, core.String>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.String, |
| ), |
| ); |
| } |
| if (_json.containsKey('locationId')) { |
| locationId = _json['locationId'] as core.String; |
| } |
| if (_json.containsKey('metadata')) { |
| metadata = |
| (_json['metadata'] as core.Map).cast<core.String, core.Object>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.Object, |
| ), |
| ); |
| } |
| if (_json.containsKey('name')) { |
| name = _json['name'] as core.String; |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <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'] as core.bool; |
| } |
| if (_json.containsKey('error')) { |
| error = Status.fromJson( |
| _json['error'] as core.Map<core.String, core.dynamic>); |
| } |
| if (_json.containsKey('metadata')) { |
| metadata = |
| (_json['metadata'] as core.Map).cast<core.String, core.Object>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.Object, |
| ), |
| ); |
| } |
| if (_json.containsKey('name')) { |
| name = _json['name'] as core.String; |
| } |
| if (_json.containsKey('response')) { |
| response = |
| (_json['response'] as core.Map).cast<core.String, core.Object>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.Object, |
| ), |
| ); |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <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; |
| } |
| } |
| |
| /// Represents the metadata of the long-running operation. |
| class OperationMetadata { |
| /// API version used to start the operation. |
| core.String apiVersion; |
| |
| /// The time the operation was created. |
| core.String createTime; |
| |
| /// The time the operation finished running. |
| core.String endTime; |
| |
| /// Server-defined resource path for the target of the operation. |
| core.String target; |
| |
| /// Name of the verb executed by the operation. |
| core.String verb; |
| |
| OperationMetadata(); |
| |
| OperationMetadata.fromJson(core.Map _json) { |
| if (_json.containsKey('apiVersion')) { |
| apiVersion = _json['apiVersion'] as core.String; |
| } |
| if (_json.containsKey('createTime')) { |
| createTime = _json['createTime'] as core.String; |
| } |
| if (_json.containsKey('endTime')) { |
| endTime = _json['endTime'] as core.String; |
| } |
| if (_json.containsKey('target')) { |
| target = _json['target'] as core.String; |
| } |
| if (_json.containsKey('verb')) { |
| verb = _json['verb'] as core.String; |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| if (apiVersion != null) { |
| _json['apiVersion'] = apiVersion; |
| } |
| if (createTime != null) { |
| _json['createTime'] = createTime; |
| } |
| if (endTime != null) { |
| _json['endTime'] = endTime; |
| } |
| if (target != null) { |
| _json['target'] = target; |
| } |
| if (verb != null) { |
| _json['verb'] = verb; |
| } |
| 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'] as core.int; |
| } |
| 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>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.Object, |
| ), |
| )) |
| .toList(); |
| } |
| if (_json.containsKey('message')) { |
| message = _json['message'] as core.String; |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| if (code != null) { |
| _json['code'] = code; |
| } |
| if (details != null) { |
| _json['details'] = details; |
| } |
| if (message != null) { |
| _json['message'] = message; |
| } |
| return _json; |
| } |
| } |
| |
| /// Workflow program to be executed by Workflows. |
| class Workflow { |
| /// The timestamp of when the workflow was created. |
| /// |
| /// Output only. |
| core.String createTime; |
| |
| /// Description of the workflow provided by the user. |
| /// |
| /// Must be at most 1000 unicode characters long. |
| core.String description; |
| |
| /// Labels associated with this workflow. |
| /// |
| /// Labels can contain at most 64 entries. Keys and values can be no longer |
| /// than 63 characters and can only contain lowercase letters, numeric |
| /// characters, underscores and dashes. Label keys must start with a letter. |
| /// International characters are allowed. |
| core.Map<core.String, core.String> labels; |
| |
| /// The resource name of the workflow. |
| /// |
| /// Format: projects/{project}/locations/{location}/workflows/{workflow} |
| core.String name; |
| |
| /// The timestamp that the latest revision of the workflow was created. |
| /// |
| /// Output only. |
| core.String revisionCreateTime; |
| |
| /// The revision of the workflow. |
| /// |
| /// A new revision of a workflow is created as a result of updating the |
| /// following properties of a workflow: - Service account - Workflow code to |
| /// be executed The format is "000001-a4d", where the first 6 characters |
| /// define the zero-padded revision ordinal number. They are followed by a |
| /// hyphen and 3 hexadecimal random characters. |
| /// |
| /// Output only. |
| core.String revisionId; |
| |
| /// Name of the service account associated with the latest workflow version. |
| /// |
| /// This service account represents the identity of the workflow and |
| /// determines what permissions the workflow has. Format: |
| /// projects/{project}/serviceAccounts/{account} Using `-` as a wildcard for |
| /// the `{project}` will infer the project from the account. The `{account}` |
| /// value can be the `email` address or the `unique_id` of the service |
| /// account. If not provided, workflow will use the project's default service |
| /// account. Modifying this field for an existing workflow results in a new |
| /// workflow revision. |
| core.String serviceAccount; |
| |
| /// Workflow code to be executed. |
| /// |
| /// The size limit is 32KB. |
| core.String sourceContents; |
| |
| /// State of the workflow deployment. |
| /// |
| /// Output only. |
| /// Possible string values are: |
| /// - "STATE_UNSPECIFIED" : Invalid state. |
| /// - "ACTIVE" : The workflow has been deployed successfully and is serving. |
| core.String state; |
| |
| /// The last update timestamp of the workflow. |
| /// |
| /// Output only. |
| core.String updateTime; |
| |
| Workflow(); |
| |
| Workflow.fromJson(core.Map _json) { |
| if (_json.containsKey('createTime')) { |
| createTime = _json['createTime'] as core.String; |
| } |
| if (_json.containsKey('description')) { |
| description = _json['description'] as core.String; |
| } |
| if (_json.containsKey('labels')) { |
| labels = |
| (_json['labels'] as core.Map).cast<core.String, core.String>().map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.String, |
| ), |
| ); |
| } |
| if (_json.containsKey('name')) { |
| name = _json['name'] as core.String; |
| } |
| if (_json.containsKey('revisionCreateTime')) { |
| revisionCreateTime = _json['revisionCreateTime'] as core.String; |
| } |
| if (_json.containsKey('revisionId')) { |
| revisionId = _json['revisionId'] as core.String; |
| } |
| if (_json.containsKey('serviceAccount')) { |
| serviceAccount = _json['serviceAccount'] as core.String; |
| } |
| if (_json.containsKey('sourceContents')) { |
| sourceContents = _json['sourceContents'] as core.String; |
| } |
| if (_json.containsKey('state')) { |
| state = _json['state'] as core.String; |
| } |
| if (_json.containsKey('updateTime')) { |
| updateTime = _json['updateTime'] as core.String; |
| } |
| } |
| |
| core.Map<core.String, core.Object> toJson() { |
| final _json = <core.String, core.Object>{}; |
| if (createTime != null) { |
| _json['createTime'] = createTime; |
| } |
| if (description != null) { |
| _json['description'] = description; |
| } |
| if (labels != null) { |
| _json['labels'] = labels; |
| } |
| if (name != null) { |
| _json['name'] = name; |
| } |
| if (revisionCreateTime != null) { |
| _json['revisionCreateTime'] = revisionCreateTime; |
| } |
| if (revisionId != null) { |
| _json['revisionId'] = revisionId; |
| } |
| if (serviceAccount != null) { |
| _json['serviceAccount'] = serviceAccount; |
| } |
| if (sourceContents != null) { |
| _json['sourceContents'] = sourceContents; |
| } |
| if (state != null) { |
| _json['state'] = state; |
| } |
| if (updateTime != null) { |
| _json['updateTime'] = updateTime; |
| } |
| return _json; |
| } |
| } |