From cb9bd92cd1560f621cc27407e3d10e307970cf56 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 1 Sep 2020 00:38:12 +0000 Subject: [PATCH] Autogenerated update (2020-09-01) Update: - androidmanagement_v1 - apigee_v1 - websecurityscanner_v1alpha - websecurityscanner_v1beta --- api_names_out.yaml | 96 ++++ generated/google/apis/androidmanagement_v1.rb | 2 +- .../apis/androidmanagement_v1/classes.rb | 7 +- generated/google/apis/apigee_v1.rb | 2 +- generated/google/apis/apigee_v1/classes.rb | 50 +- .../google/apis/apigee_v1/representations.rb | 18 +- .../google/apis/websecurityscanner_v1alpha.rb | 2 +- .../google/apis/websecurityscanner_v1beta.rb | 2 +- generated/google/apis/workflows_v1beta.rb | 34 ++ .../google/apis/workflows_v1beta/classes.rb | 406 ++++++++++++++++ .../apis/workflows_v1beta/representations.rb | 173 +++++++ .../google/apis/workflows_v1beta/service.rb | 437 ++++++++++++++++++ 12 files changed, 1206 insertions(+), 23 deletions(-) create mode 100644 generated/google/apis/workflows_v1beta.rb create mode 100644 generated/google/apis/workflows_v1beta/classes.rb create mode 100644 generated/google/apis/workflows_v1beta/representations.rb create mode 100644 generated/google/apis/workflows_v1beta/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 2e65692e4..04bcf7faf 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -9942,12 +9942,18 @@ "/apigee:v1/GoogleCloudApigeeV1Metric/name": name "/apigee:v1/GoogleCloudApigeeV1Metric/values": values "/apigee:v1/GoogleCloudApigeeV1Metric/values/value": value +"/apigee:v1/GoogleCloudApigeeV1Operation": google_cloud_apigee_v1_operation +"/apigee:v1/GoogleCloudApigeeV1Operation/methods": methods_prop +"/apigee:v1/GoogleCloudApigeeV1Operation/methods/methods_prop": methods_prop +"/apigee:v1/GoogleCloudApigeeV1Operation/resource": resource "/apigee:v1/GoogleCloudApigeeV1OperationConfig": google_cloud_apigee_v1_operation_config "/apigee:v1/GoogleCloudApigeeV1OperationConfig/apiSource": api_source "/apigee:v1/GoogleCloudApigeeV1OperationConfig/attributes": attributes "/apigee:v1/GoogleCloudApigeeV1OperationConfig/attributes/attribute": attribute "/apigee:v1/GoogleCloudApigeeV1OperationConfig/methods": methods_prop "/apigee:v1/GoogleCloudApigeeV1OperationConfig/methods/methods_prop": methods_prop +"/apigee:v1/GoogleCloudApigeeV1OperationConfig/operations": operations +"/apigee:v1/GoogleCloudApigeeV1OperationConfig/operations/operation": operation "/apigee:v1/GoogleCloudApigeeV1OperationConfig/quota": quota "/apigee:v1/GoogleCloudApigeeV1OperationConfig/resources": resources "/apigee:v1/GoogleCloudApigeeV1OperationConfig/resources/resource": resource @@ -151592,6 +151598,96 @@ "/websecurityscanner:v1beta/websecurityscanner.projects.scanConfigs.scanRuns.stop/name": name "/websecurityscanner:v1beta/websecurityscanner.projects.scanConfigs.start": start_scan_config_scan_run "/websecurityscanner:v1beta/websecurityscanner.projects.scanConfigs.start/name": name +"/workflows:v1beta/Empty": empty +"/workflows:v1beta/ListLocationsResponse": list_locations_response +"/workflows:v1beta/ListLocationsResponse/locations": locations +"/workflows:v1beta/ListLocationsResponse/locations/location": location +"/workflows:v1beta/ListLocationsResponse/nextPageToken": next_page_token +"/workflows:v1beta/ListOperationsResponse": list_operations_response +"/workflows:v1beta/ListOperationsResponse/nextPageToken": next_page_token +"/workflows:v1beta/ListOperationsResponse/operations": operations +"/workflows:v1beta/ListOperationsResponse/operations/operation": operation +"/workflows:v1beta/ListWorkflowsResponse": list_workflows_response +"/workflows:v1beta/ListWorkflowsResponse/nextPageToken": next_page_token +"/workflows:v1beta/ListWorkflowsResponse/unreachable": unreachable +"/workflows:v1beta/ListWorkflowsResponse/unreachable/unreachable": unreachable +"/workflows:v1beta/ListWorkflowsResponse/workflows": workflows +"/workflows:v1beta/ListWorkflowsResponse/workflows/workflow": workflow +"/workflows:v1beta/Location": location +"/workflows:v1beta/Location/displayName": display_name +"/workflows:v1beta/Location/labels": labels +"/workflows:v1beta/Location/labels/label": label +"/workflows:v1beta/Location/locationId": location_id +"/workflows:v1beta/Location/metadata": metadata +"/workflows:v1beta/Location/metadata/metadatum": metadatum +"/workflows:v1beta/Location/name": name +"/workflows:v1beta/Operation": operation +"/workflows:v1beta/Operation/done": done +"/workflows:v1beta/Operation/error": error +"/workflows:v1beta/Operation/metadata": metadata +"/workflows:v1beta/Operation/metadata/metadatum": metadatum +"/workflows:v1beta/Operation/name": name +"/workflows:v1beta/Operation/response": response +"/workflows:v1beta/Operation/response/response": response +"/workflows:v1beta/OperationMetadata": operation_metadata +"/workflows:v1beta/OperationMetadata/apiVersion": api_version +"/workflows:v1beta/OperationMetadata/createTime": create_time +"/workflows:v1beta/OperationMetadata/endTime": end_time +"/workflows:v1beta/OperationMetadata/target": target +"/workflows:v1beta/OperationMetadata/verb": verb +"/workflows:v1beta/Status": status +"/workflows:v1beta/Status/code": code +"/workflows:v1beta/Status/details": details +"/workflows:v1beta/Status/details/detail": detail +"/workflows:v1beta/Status/details/detail/detail": detail +"/workflows:v1beta/Status/message": message +"/workflows:v1beta/Workflow": workflow +"/workflows:v1beta/Workflow/createTime": create_time +"/workflows:v1beta/Workflow/description": description +"/workflows:v1beta/Workflow/labels": labels +"/workflows:v1beta/Workflow/labels/label": label +"/workflows:v1beta/Workflow/name": name +"/workflows:v1beta/Workflow/revisionCreateTime": revision_create_time +"/workflows:v1beta/Workflow/revisionId": revision_id +"/workflows:v1beta/Workflow/serviceAccount": service_account +"/workflows:v1beta/Workflow/sourceContents": source_contents +"/workflows:v1beta/Workflow/state": state +"/workflows:v1beta/Workflow/updateTime": update_time +"/workflows:v1beta/fields": fields +"/workflows:v1beta/key": key +"/workflows:v1beta/quotaUser": quota_user +"/workflows:v1beta/workflows.projects.locations.get": get_project_location +"/workflows:v1beta/workflows.projects.locations.get/name": name +"/workflows:v1beta/workflows.projects.locations.list": list_project_locations +"/workflows:v1beta/workflows.projects.locations.list/filter": filter +"/workflows:v1beta/workflows.projects.locations.list/name": name +"/workflows:v1beta/workflows.projects.locations.list/pageSize": page_size +"/workflows:v1beta/workflows.projects.locations.list/pageToken": page_token +"/workflows:v1beta/workflows.projects.locations.operations.delete": delete_project_location_operation +"/workflows:v1beta/workflows.projects.locations.operations.delete/name": name +"/workflows:v1beta/workflows.projects.locations.operations.get": get_project_location_operation +"/workflows:v1beta/workflows.projects.locations.operations.get/name": name +"/workflows:v1beta/workflows.projects.locations.operations.list": list_project_location_operations +"/workflows:v1beta/workflows.projects.locations.operations.list/filter": filter +"/workflows:v1beta/workflows.projects.locations.operations.list/name": name +"/workflows:v1beta/workflows.projects.locations.operations.list/pageSize": page_size +"/workflows:v1beta/workflows.projects.locations.operations.list/pageToken": page_token +"/workflows:v1beta/workflows.projects.locations.workflows.create": create_project_location_workflow +"/workflows:v1beta/workflows.projects.locations.workflows.create/parent": parent +"/workflows:v1beta/workflows.projects.locations.workflows.create/workflowId": workflow_id +"/workflows:v1beta/workflows.projects.locations.workflows.delete": delete_project_location_workflow +"/workflows:v1beta/workflows.projects.locations.workflows.delete/name": name +"/workflows:v1beta/workflows.projects.locations.workflows.get": get_project_location_workflow +"/workflows:v1beta/workflows.projects.locations.workflows.get/name": name +"/workflows:v1beta/workflows.projects.locations.workflows.list": list_project_location_workflows +"/workflows:v1beta/workflows.projects.locations.workflows.list/filter": filter +"/workflows:v1beta/workflows.projects.locations.workflows.list/orderBy": order_by +"/workflows:v1beta/workflows.projects.locations.workflows.list/pageSize": page_size +"/workflows:v1beta/workflows.projects.locations.workflows.list/pageToken": page_token +"/workflows:v1beta/workflows.projects.locations.workflows.list/parent": parent +"/workflows:v1beta/workflows.projects.locations.workflows.patch": patch_project_location_workflow +"/workflows:v1beta/workflows.projects.locations.workflows.patch/name": name +"/workflows:v1beta/workflows.projects.locations.workflows.patch/updateMask": update_mask "/youtube:v3/AbuseReport": abuse_report "/youtube:v3/AbuseReport/abuseTypes": abuse_types "/youtube:v3/AbuseReport/abuseTypes/abuse_type": abuse_type diff --git a/generated/google/apis/androidmanagement_v1.rb b/generated/google/apis/androidmanagement_v1.rb index 31b17b873..2755deb11 100644 --- a/generated/google/apis/androidmanagement_v1.rb +++ b/generated/google/apis/androidmanagement_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/android/management module AndroidmanagementV1 VERSION = 'V1' - REVISION = '20200817' + REVISION = '20200824' # Manage Android devices and apps for your customers AUTH_ANDROIDMANAGEMENT = 'https://www.googleapis.com/auth/androidmanagement' diff --git a/generated/google/apis/androidmanagement_v1/classes.rb b/generated/google/apis/androidmanagement_v1/classes.rb index eeb3452c5..2eba1b14a 100644 --- a/generated/google/apis/androidmanagement_v1/classes.rb +++ b/generated/google/apis/androidmanagement_v1/classes.rb @@ -2226,7 +2226,7 @@ module Google end end - # Policies for apps on the personal profile of a company-owned device with a + # Policies for apps in the personal profile of a company-owned device with a # work profile. class PersonalApplicationPolicy include Google::Apis::Core::Hashable @@ -2273,12 +2273,13 @@ module Google # @return [Fixnum] attr_accessor :max_days_with_work_off - # Policy applied to applications on the personal profile. + # Policy applied to applications in the personal profile. # Corresponds to the JSON property `personalApplications` # @return [Array] attr_accessor :personal_applications - # Controls how apps on the personal profile are allowed or blocked. + # Used together with personal_applications to control how apps in the personal + # profile are allowed or blocked. # Corresponds to the JSON property `personalPlayStoreMode` # @return [String] attr_accessor :personal_play_store_mode diff --git a/generated/google/apis/apigee_v1.rb b/generated/google/apis/apigee_v1.rb index af62e06d3..d03d066e8 100644 --- a/generated/google/apis/apigee_v1.rb +++ b/generated/google/apis/apigee_v1.rb @@ -29,7 +29,7 @@ module Google # @see https://cloud.google.com/apigee-api-management/ module ApigeeV1 VERSION = 'V1' - REVISION = '20200821' + REVISION = '20200827' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/apigee_v1/classes.rb b/generated/google/apis/apigee_v1/classes.rb index d60ad7253..9c7c2d05d 100644 --- a/generated/google/apis/apigee_v1/classes.rb +++ b/generated/google/apis/apigee_v1/classes.rb @@ -3520,6 +3520,34 @@ module Google end end + # Operation represents the pairing of REST resource path and the actions (verbs) + # allowed on the resource path. + class GoogleCloudApigeeV1Operation + include Google::Apis::Core::Hashable + + # methods refers to the REST verbs as in https://www.w3.org/Protocols/rfc2616/ + # rfc2616-sec9.html. When none specified, all verb types are allowed. + # Corresponds to the JSON property `methods` + # @return [Array] + attr_accessor :methods_prop + + # Required. resource represents REST resource path associated with the proxy/ + # remote service. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @methods_prop = args[:methods_prop] if args.key?(:methods_prop) + @resource = args[:resource] if args.key?(:resource) + end + end + # OperationConfig binds the resources in a proxy or remote service with the # allowed REST methods and its associated quota enforcement. class GoogleCloudApigeeV1OperationConfig @@ -3536,11 +3564,12 @@ module Google # @return [Array] attr_accessor :attributes - # methods refers to the REST verbs as in https://www.w3.org/Protocols/rfc2616/ - # rfc2616-sec9.html. When none specified, all verb types are allowed. - # Corresponds to the JSON property `methods` - # @return [Array] - attr_accessor :methods_prop + # operations is the list of resource/methods pair, belonging to proxy/remote + # service, upon which quota will applied on. Note that currently we allow only a + # single operation. The call will fail if more than one is provided. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations # Quota contains the essential parameters needed that can be applied on a proxy/ # remote service, resources and methods combination associated with this API @@ -3550,12 +3579,6 @@ module Google # @return [Google::Apis::ApigeeV1::GoogleCloudApigeeV1Quota] attr_accessor :quota - # Required. resources represents a list of REST resource path associated with - # the proxy/remote service. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - def initialize(**args) update!(**args) end @@ -3564,9 +3587,8 @@ module Google def update!(**args) @api_source = args[:api_source] if args.key?(:api_source) @attributes = args[:attributes] if args.key?(:attributes) - @methods_prop = args[:methods_prop] if args.key?(:methods_prop) + @operations = args[:operations] if args.key?(:operations) @quota = args[:quota] if args.key?(:quota) - @resources = args[:resources] if args.key?(:resources) end end @@ -3802,7 +3824,7 @@ module Google # @return [Google::Apis::ApigeeV1::GoogleCloudApigeeV1Properties] attr_accessor :properties - # Output only. Runtime type of the Apigee organization based on the Apigee + # Required. Runtime type of the Apigee organization based on the Apigee # subscription purchased. # Corresponds to the JSON property `runtimeType` # @return [String] diff --git a/generated/google/apis/apigee_v1/representations.rb b/generated/google/apis/apigee_v1/representations.rb index ea694ef3c..36ff9937f 100644 --- a/generated/google/apis/apigee_v1/representations.rb +++ b/generated/google/apis/apigee_v1/representations.rb @@ -520,6 +520,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudApigeeV1Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudApigeeV1OperationConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1812,16 +1818,24 @@ module Google end end + class GoogleCloudApigeeV1Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :methods_prop, as: 'methods' + property :resource, as: 'resource' + end + end + class GoogleCloudApigeeV1OperationConfig # @private class Representation < Google::Apis::Core::JsonRepresentation property :api_source, as: 'apiSource' collection :attributes, as: 'attributes', class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Attribute, decorator: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Attribute::Representation - collection :methods_prop, as: 'methods' + collection :operations, as: 'operations', class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Operation, decorator: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Operation::Representation + property :quota, as: 'quota', class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Quota, decorator: Google::Apis::ApigeeV1::GoogleCloudApigeeV1Quota::Representation - collection :resources, as: 'resources' end end diff --git a/generated/google/apis/websecurityscanner_v1alpha.rb b/generated/google/apis/websecurityscanner_v1alpha.rb index a25b8a857..10a90fa94 100644 --- a/generated/google/apis/websecurityscanner_v1alpha.rb +++ b/generated/google/apis/websecurityscanner_v1alpha.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/ module WebsecurityscannerV1alpha VERSION = 'V1alpha' - REVISION = '20200801' + REVISION = '20200826' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/websecurityscanner_v1beta.rb b/generated/google/apis/websecurityscanner_v1beta.rb index 309ef4cf3..663cbb32a 100644 --- a/generated/google/apis/websecurityscanner_v1beta.rb +++ b/generated/google/apis/websecurityscanner_v1beta.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/ module WebsecurityscannerV1beta VERSION = 'V1beta' - REVISION = '20200801' + REVISION = '20200826' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/workflows_v1beta.rb b/generated/google/apis/workflows_v1beta.rb new file mode 100644 index 000000000..54929dfa5 --- /dev/null +++ b/generated/google/apis/workflows_v1beta.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/workflows_v1beta/service.rb' +require 'google/apis/workflows_v1beta/classes.rb' +require 'google/apis/workflows_v1beta/representations.rb' + +module Google + module Apis + # Workflows API + # + # + # + # @see https://cloud.google.com/workflows + module WorkflowsV1beta + VERSION = 'V1beta' + REVISION = '20200828' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/workflows_v1beta/classes.rb b/generated/google/apis/workflows_v1beta/classes.rb new file mode 100644 index 000000000..e37889787 --- /dev/null +++ b/generated/google/apis/workflows_v1beta/classes.rb @@ -0,0 +1,406 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module WorkflowsV1beta + + # 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 + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Response for the ListWorkflows method. + class ListWorkflowsResponse + include Google::Apis::Core::Hashable + + # A token, which can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Unreachable resources. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + # The workflows which match the request. + # Corresponds to the JSON property `workflows` + # @return [Array] + attr_accessor :workflows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + @workflows = args[:workflows] if args.key?(:workflows) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. For example, + # "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example `"cloud.googleapis.com/ + # region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Resource name for the location, which may vary between implementations. For + # example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # 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). + # Corresponds to the JSON property `error` + # @return [Google::Apis::WorkflowsV1beta::Status] + attr_accessor :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. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :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``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :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`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Represents the metadata of the long-running operation. + class OperationMetadata + include Google::Apis::Core::Hashable + + # API version used to start the operation. + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # The time the operation was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The time the operation finished running. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Server-defined resource path for the target of the operation. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Name of the verb executed by the operation. + # Corresponds to the JSON property `verb` + # @return [String] + attr_accessor :verb + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @create_time = args[:create_time] if args.key?(:create_time) + @end_time = args[:end_time] if args.key?(:end_time) + @target = args[:target] if args.key?(:target) + @verb = args[:verb] if args.key?(:verb) + end + end + + # 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 + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :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. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Workflow program to be executed by Workflows. + class Workflow + include Google::Apis::Core::Hashable + + # Output only. The timestamp of when the workflow was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Description of the workflow provided by the user. Must be at most 1000 unicode + # characters long. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :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. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The resource name of the workflow. Format: projects/`project`/locations/` + # location`/workflows/`workflow` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The timestamp that the latest revision of the workflow was + # created. + # Corresponds to the JSON property `revisionCreateTime` + # @return [String] + attr_accessor :revision_create_time + + # Output only. The revision of the workflow. A new revision of a workflow is + # created as a result of updating the following fields of a workflow: - ` + # source_code` - `service_account` 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. + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + # 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. + # Corresponds to the JSON property `serviceAccount` + # @return [String] + attr_accessor :service_account + + # Workflow code to be executed. The size limit is 32KB. + # Corresponds to the JSON property `sourceContents` + # @return [String] + attr_accessor :source_contents + + # Output only. State of the workflow deployment. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. The last update timestamp of the workflow. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time) + @revision_id = args[:revision_id] if args.key?(:revision_id) + @service_account = args[:service_account] if args.key?(:service_account) + @source_contents = args[:source_contents] if args.key?(:source_contents) + @state = args[:state] if args.key?(:state) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + end + end +end diff --git a/generated/google/apis/workflows_v1beta/representations.rb b/generated/google/apis/workflows_v1beta/representations.rb new file mode 100644 index 000000000..c05076f39 --- /dev/null +++ b/generated/google/apis/workflows_v1beta/representations.rb @@ -0,0 +1,173 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module WorkflowsV1beta + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListWorkflowsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Workflow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::WorkflowsV1beta::Location, decorator: Google::Apis::WorkflowsV1beta::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::WorkflowsV1beta::Operation, decorator: Google::Apis::WorkflowsV1beta::Operation::Representation + + end + end + + class ListWorkflowsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + collection :workflows, as: 'workflows', class: Google::Apis::WorkflowsV1beta::Workflow, decorator: Google::Apis::WorkflowsV1beta::Workflow::Representation + + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::WorkflowsV1beta::Status, decorator: Google::Apis::WorkflowsV1beta::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :create_time, as: 'createTime' + property :end_time, as: 'endTime' + property :target, as: 'target' + property :verb, as: 'verb' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class Workflow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + hash :labels, as: 'labels' + property :name, as: 'name' + property :revision_create_time, as: 'revisionCreateTime' + property :revision_id, as: 'revisionId' + property :service_account, as: 'serviceAccount' + property :source_contents, as: 'sourceContents' + property :state, as: 'state' + property :update_time, as: 'updateTime' + end + end + end + end +end diff --git a/generated/google/apis/workflows_v1beta/service.rb b/generated/google/apis/workflows_v1beta/service.rb new file mode 100644 index 000000000..1a32cf331 --- /dev/null +++ b/generated/google/apis/workflows_v1beta/service.rb @@ -0,0 +1,437 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module WorkflowsV1beta + # Workflows API + # + # + # + # @example + # require 'google/apis/workflows_v1beta' + # + # Workflows = Google::Apis::WorkflowsV1beta # Alias the module + # service = Workflows::WorkflowsService.new + # + # @see https://cloud.google.com/workflows + class WorkflowsService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://workflows.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::WorkflowsV1beta::Location::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}/locations', options) + command.response_representation = Google::Apis::WorkflowsV1beta::ListLocationsResponse::Representation + command.response_class = Google::Apis::WorkflowsV1beta::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::WorkflowsV1beta::Empty::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::WorkflowsV1beta::Operation::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}/operations', options) + command.response_representation = Google::Apis::WorkflowsV1beta::ListOperationsResponse::Representation + command.response_class = Google::Apis::WorkflowsV1beta::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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. + # @param [String] parent + # Required. Project and location in which the workflow should be created. Format: + # projects/`project`/locations/`location` + # @param [Google::Apis::WorkflowsV1beta::Workflow] workflow_object + # @param [String] workflow_id + # 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. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_workflow(parent, workflow_object = nil, workflow_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta/{+parent}/workflows', options) + command.request_representation = Google::Apis::WorkflowsV1beta::Workflow::Representation + command.request_object = workflow_object + command.response_representation = Google::Apis::WorkflowsV1beta::Operation::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Operation + command.params['parent'] = parent unless parent.nil? + command.query['workflowId'] = workflow_id unless workflow_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a workflow with the specified name. This method also cancels and + # deletes all running executions of the workflow. + # @param [String] name + # Required. Name of the workflow to be deleted. Format: projects/`project`/ + # locations/`location`/workflows/`workflow` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_workflow(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::WorkflowsV1beta::Operation::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details of a single Workflow. + # @param [String] name + # Required. Name of the workflow which information should be retrieved. Format: + # projects/`project`/locations/`location`/workflows/`workflow` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Workflow] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Workflow] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_workflow(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+name}', options) + command.response_representation = Google::Apis::WorkflowsV1beta::Workflow::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Workflow + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists Workflows in a given project and location. The default order is not + # specified. + # @param [String] parent + # Required. Project and location from which the workflows should be listed. + # Format: projects/`project`/locations/`location` + # @param [String] filter + # Filter to restrict results to specific workflows. + # @param [String] order_by + # 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. + # @param [Fixnum] page_size + # 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. + # @param [String] page_token + # 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. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::ListWorkflowsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::ListWorkflowsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_workflows(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta/{+parent}/workflows', options) + command.response_representation = Google::Apis::WorkflowsV1beta::ListWorkflowsResponse::Representation + command.response_class = Google::Apis::WorkflowsV1beta::ListWorkflowsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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. + # @param [String] name + # The resource name of the workflow. Format: projects/`project`/locations/` + # location`/workflows/`workflow` + # @param [Google::Apis::WorkflowsV1beta::Workflow] workflow_object + # @param [String] update_mask + # List of fields to be updated. If not present, the entire workflow will be + # updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WorkflowsV1beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WorkflowsV1beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_workflow(name, workflow_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta/{+name}', options) + command.request_representation = Google::Apis::WorkflowsV1beta::Workflow::Representation + command.request_object = workflow_object + command.response_representation = Google::Apis::WorkflowsV1beta::Operation::Representation + command.response_class = Google::Apis::WorkflowsV1beta::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end