Returns the executions Resource.
Close httplib2 connections.
execute(parent, body=None, requestId=None, triggerId=None, x__xgafv=None)
Executes integrations synchronously. The response is not returned until the requested execution is either fulfilled or experienced an error. Only one integration can be executed. Request format URL: https://integrations.googleapis.com/v2/projects/$PROJECT/locations/$LOCATION/integrations/$INTEGRATION_NAME:execute Request payload: (the entire payload is optional unless input variables need to be set.) {"variable1": "hello world", "variable2": 1, "variable3": {"my_json_key": "my json string value" }
generateIntegrationBranch(parent, body=None, x__xgafv=None)
Generates an integration branch.
generateIntegrationDocument(parent, body=None, x__xgafv=None)
Generates documentation for an integration version.
generateJavascript(parent, body=None, x__xgafv=None)
Generates Javascript code for data mapping.
recommendTasks(parent, body=None, x__xgafv=None)
Recommends tasks to replace a selected task.
schedule(parent, body=None, requestId=None, scheduleTime=None, triggerId=None, x__xgafv=None)
Schedules an integration for execution.
close()
Close httplib2 connections.
execute(parent, body=None, requestId=None, triggerId=None, x__xgafv=None)
Executes integrations synchronously. The response is not returned until the requested execution is either fulfilled or experienced an error. Only one integration can be executed. Request format URL: https://integrations.googleapis.com/v2/projects/$PROJECT/locations/$LOCATION/integrations/$INTEGRATION_NAME:execute Request payload: (the entire payload is optional unless input variables need to be set.) {"variable1": "hello world", "variable2": 1, "variable3": {"my_json_key": "my json string value" }
Args:
parent: string, Required. The integration resource name. (required)
body: object, The request body.
requestId: string, Optional. This is used to de-dup incoming request: if the duplicate request was detected, the response from the previous execution is returned.
triggerId: string, Required. The API trigger id associated with the integration. An integration can have multiple trigger_id. This field is required to disambiguate which trigger should be invoked.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
"contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body.
"data": "A String", # The HTTP request/response body as raw binary.
"extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
}
generateIntegrationBranch(parent, body=None, x__xgafv=None)
Generates an integration branch.
Args:
parent: string, Required. Format: `projects/{project}/locations/{location}/integrations/{integration}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for generating an integration branch containing tasks.
"integrationBranchRequest": { # The request for generating an integration branch. # Required. The integration branch request payload.
"branchCondition": "A String", # Optional. The condition for the particular branch which the user selected.
"integrationParameters": [ # Optional. A list of all the workflow parameters of the current integration.
{ # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
],
"taskConfigs": [ # Required. A list of all the tasks of the current integration.
{ # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
],
},
"prompt": "A String", # Required. User prompt.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message containing the generated integration branch data.
"integrationBranch": { # An integration branch skeleton containing basic fields which can be used to create an integration branch on the UI. # The integration branch returned by Duet
"branchCondition": "A String", # The condition for the branch.
"explanation": "A String", # Explanation of why this integration branch was generated.
"integrationParameters": [ # The newly generated workflow parameters.
{ # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
],
"taskConfigs": [ # The newly generated tasks which can be branched into the current integration.
{ # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
],
},
}
generateIntegrationDocument(parent, body=None, x__xgafv=None)
Generates documentation for an integration version.
Args:
parent: string, Required. Format: `projects/{project}/locations/{location}/integrations/{integration}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for generating documentation for an integration version.
"integrationDocumentRequest": { # The request for generating description of an integration. # Required. The integration document request payload.
"integrationVersion": { # The integration version definition. # Required. The current integrtion on the canvas.
"description": "A String", # Optional. The integration description.
"errorCatcherConfigs": [ # Optional. Error Catch Task configuration for the integration. It's optional.
{ # Configuration detail of a error catch task
"description": "A String", # Optional. User-provided description intended to give more business context about the error catcher config.
"errorCatcherId": "A String", # Required. An error catcher id is string representation for the error catcher config. Within a workflow, error_catcher_id uniquely identifies an error catcher config among all error catcher configs for the workflow
"errorCatcherNumber": "A String", # Required. A number to uniquely identify each error catcher config within the workflow on UI.
"label": "A String", # Optional. The user created label for a particular error catcher. Optional.
"startErrorTasks": [ # Required. The set of start tasks that are to be executed for the error catch flow
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
},
],
"integrationConfigParameters": [ # Optional. Config Parameters that are expected to be passed to the integration when an integration is published. This consists of all the parameters that are expected to provide configuration in the integration execution. This gives the user the ability to provide default values, value, add information like connection url, project based configuration value and also provide data types of each parameter.
{ # Integration Config Parameter is defined in the integration config and are used to provide external configuration for integration. It provide information about data types of the expected parameters and provide any default values or value. They can also be used to add custom attributes.
"parameter": { # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition. # Optional. Integration Parameter to provide the default value, data type and attributes required for the Integration config variables.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
],
"integrationParameters": [ # Optional. Parameters that are expected to be passed to the integration when an event is triggered. This consists of all the parameters that are expected in the integration execution. This gives the user the ability to provide default values, add information like PII and also provide data types of each parameter.
{ # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
],
"name": "A String", # Optional. Auto-generated primary key.
"snapshotNumber": "A String", # Optional. An increasing sequence that is set when a new snapshot is created. The last created snapshot can be identified by [workflow_name, org_id latest(snapshot_number)]. However, last created snapshot need not be same as the HEAD. So users should always use "HEAD" tag to identify the head.
"state": "A String", # Output only. User should not set it as an input.
"taskConfigs": [ # Optional. Task configuration for the integration. It's optional, but the integration doesn't do anything without task_configs.
{ # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
],
"triggerConfigs": [ # Optional. Trigger configurations.
{ # Configuration detail of a trigger.
"cloudSchedulerConfig": { # Cloud Scheduler Trigger configuration # Optional. Cloud Scheduler Trigger related metadata
"cronTab": "A String", # Required. The cron tab of cloud scheduler trigger.
"errorMessage": "A String", # Optional. When the job was deleted from Pantheon UI, error_message will be populated when Get/List integrations
"location": "A String", # Required. The location where associated cloud scheduler job will be created
"serviceAccountEmail": "A String", # Required. Service account used by Cloud Scheduler to trigger the integration at scheduled time
},
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"inputVariables": { # Variables names mapped to api trigger. # Optional. List of input variables for the api trigger.
"names": [ # Optional. List of variable names.
"A String",
],
},
"label": "A String", # Optional. The user created label for a particular trigger.
"outputVariables": { # Variables names mapped to api trigger. # Optional. List of output variables for the api trigger.
"names": [ # Optional. List of variable names.
"A String",
],
},
"properties": { # Optional. Configurable properties of the trigger, not to be confused with integration parameters. E.g. "name" is a property for API triggers and "subscription" is a property for Pub/sub triggers.
"a_key": "A String",
},
"startTasks": [ # Optional. Set of tasks numbers from where the integration execution is started by this trigger. If this is empty, then integration is executed with default start tasks. In the list of start tasks, none of two tasks can have direct ancestor-descendant relationships (i.e. in a same integration execution graph).
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"trigger": "A String", # Optional. Name of the trigger. Example: "API Trigger", "Cloud Pub Sub Trigger" When set will be sent out to monitoring dashabord for tracking purpose.
"triggerId": "A String", # Optional. The backend trigger ID.
"triggerNumber": "A String", # Required. A number to uniquely identify each trigger config within the integration on UI.
"triggerType": "A String", # Optional. Type of trigger
},
],
"userLabel": "A String", # Optional. A user-defined label that annotates an integration version. Typically, this is only set when the integration version is created.
},
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message containing generated integration documentation text.
"document": "A String", # The description of the integration returned by Duet AI.
}
generateJavascript(parent, body=None, x__xgafv=None)
Generates Javascript code for data mapping.
Args:
parent: string, Required. Format: `projects/{project}/locations/{location}/integrations/{integration}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for generating data mapping Javascript.
"javascriptRequest": { # Request message for Javascript Task using Gemini. # Required. The javascript request payload.
"copilotEnabled": True or False, # Optional. If this request is for copilot.
"integrationVersion": { # The integration version definition. # Required. The integration version which contains all the integration parameters, all triggers and tasks including the Javascript task.
"description": "A String", # Optional. The integration description.
"errorCatcherConfigs": [ # Optional. Error Catch Task configuration for the integration. It's optional.
{ # Configuration detail of a error catch task
"description": "A String", # Optional. User-provided description intended to give more business context about the error catcher config.
"errorCatcherId": "A String", # Required. An error catcher id is string representation for the error catcher config. Within a workflow, error_catcher_id uniquely identifies an error catcher config among all error catcher configs for the workflow
"errorCatcherNumber": "A String", # Required. A number to uniquely identify each error catcher config within the workflow on UI.
"label": "A String", # Optional. The user created label for a particular error catcher. Optional.
"startErrorTasks": [ # Required. The set of start tasks that are to be executed for the error catch flow
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
},
],
"integrationConfigParameters": [ # Optional. Config Parameters that are expected to be passed to the integration when an integration is published. This consists of all the parameters that are expected to provide configuration in the integration execution. This gives the user the ability to provide default values, value, add information like connection url, project based configuration value and also provide data types of each parameter.
{ # Integration Config Parameter is defined in the integration config and are used to provide external configuration for integration. It provide information about data types of the expected parameters and provide any default values or value. They can also be used to add custom attributes.
"parameter": { # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition. # Optional. Integration Parameter to provide the default value, data type and attributes required for the Integration config variables.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
],
"integrationParameters": [ # Optional. Parameters that are expected to be passed to the integration when an event is triggered. This consists of all the parameters that are expected in the integration execution. This gives the user the ability to provide default values, add information like PII and also provide data types of each parameter.
{ # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
],
"name": "A String", # Optional. Auto-generated primary key.
"snapshotNumber": "A String", # Optional. An increasing sequence that is set when a new snapshot is created. The last created snapshot can be identified by [workflow_name, org_id latest(snapshot_number)]. However, last created snapshot need not be same as the HEAD. So users should always use "HEAD" tag to identify the head.
"state": "A String", # Output only. User should not set it as an input.
"taskConfigs": [ # Optional. Task configuration for the integration. It's optional, but the integration doesn't do anything without task_configs.
{ # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
],
"triggerConfigs": [ # Optional. Trigger configurations.
{ # Configuration detail of a trigger.
"cloudSchedulerConfig": { # Cloud Scheduler Trigger configuration # Optional. Cloud Scheduler Trigger related metadata
"cronTab": "A String", # Required. The cron tab of cloud scheduler trigger.
"errorMessage": "A String", # Optional. When the job was deleted from Pantheon UI, error_message will be populated when Get/List integrations
"location": "A String", # Required. The location where associated cloud scheduler job will be created
"serviceAccountEmail": "A String", # Required. Service account used by Cloud Scheduler to trigger the integration at scheduled time
},
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"inputVariables": { # Variables names mapped to api trigger. # Optional. List of input variables for the api trigger.
"names": [ # Optional. List of variable names.
"A String",
],
},
"label": "A String", # Optional. The user created label for a particular trigger.
"outputVariables": { # Variables names mapped to api trigger. # Optional. List of output variables for the api trigger.
"names": [ # Optional. List of variable names.
"A String",
],
},
"properties": { # Optional. Configurable properties of the trigger, not to be confused with integration parameters. E.g. "name" is a property for API triggers and "subscription" is a property for Pub/sub triggers.
"a_key": "A String",
},
"startTasks": [ # Optional. Set of tasks numbers from where the integration execution is started by this trigger. If this is empty, then integration is executed with default start tasks. In the list of start tasks, none of two tasks can have direct ancestor-descendant relationships (i.e. in a same integration execution graph).
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"trigger": "A String", # Optional. Name of the trigger. Example: "API Trigger", "Cloud Pub Sub Trigger" When set will be sent out to monitoring dashabord for tracking purpose.
"triggerId": "A String", # Optional. The backend trigger ID.
"triggerNumber": "A String", # Required. A number to uniquely identify each trigger config within the integration on UI.
"triggerType": "A String", # Optional. Type of trigger
},
],
"userLabel": "A String", # Optional. A user-defined label that annotates an integration version. Typically, this is only set when the integration version is created.
},
"taskId": "A String", # Required. The task id of the Javascript task.
"useCurrentScript": True or False, # Optional. Whether to use the current javascript task config (JS code) to generate the Javascript code.
},
"prompt": "A String", # Optional. User prompt.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message containing generated Javascript code recommendations.
"recommendations": [ # List of the Javascript recommendations.
{ # Individual Javascript recommendation containing the task config with the new code, integration parameters and the explanation.
"explanation": "A String", # The explanation of the Javascript code.
"integrationParameters": [ # Optional. The list of the new integration parameters.
{ # Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.
"dataType": "A String", # Type of the parameter.
"defaultValue": { # The type of the parameter. # Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
"description": "A String", # Optional. Description of the parameter.
"displayName": "A String", # The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".
"inputOutputType": "A String", # Specifies the input/output type for the parameter.
"isTransient": True or False, # Whether this parameter is a transient parameter.
"jsonSchema": "A String", # This schema will be used to validate runtime JSON-typed values of this parameter.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
},
],
"taskConfig": { # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task. # Optional. The task config of the Javascript task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
},
],
}
recommendTasks(parent, body=None, x__xgafv=None)
Recommends tasks to replace a selected task.
Args:
parent: string, Required. Format: `projects/{project}/locations/{location}/integrations/{integration}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for recommending tasks to replace a selected task.
"prompt": "A String", # Optional. User prompt.
"replaceTaskRequest": { # Message for Replace Task Scenario. # Required. The current task to replace and options.
"copilotEnabled": True or False, # Optional. If this request is for copilot.
"taskConfig": { # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task. # Required. The current task selected on the UI.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
"taskTypes": [ # The list of task types.
"A String",
],
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message containing recommended tasks for replacement.
"taskConfigs": [ # The list of recommended tasks.
{ # The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
"description": "A String", # Optional. User-provided description intended to give additional business context about the task.
"displayName": "A String", # Optional. User-provided label that is attached to this TaskConfig in the UI.
"errorCatcherId": "A String", # Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
"externalTaskType": "A String", # Optional. External task type of the task
"nextTasks": [ # Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by `event_config_id`. Each of these next tasks are executed only if the condition associated with them evaluates to true.
{ # The task that is next in line to be executed, if the condition specified evaluated to true.
"condition": "A String", # Standard filter expression for this task to become an eligible next task.
"description": "A String", # User-provided description intended to give additional business context about the task.
"displayName": "A String", # User-provided label that is attached to this edge in the UI.
"taskConfigId": "A String", # ID of the next task.
"taskId": "A String", # Task number of the next task.
},
],
"parameters": { # Optional. The customized parameters the user can pass to this task.
"a_key": { # This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus.
"key": "A String", # Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.
"value": { # The type of the parameter. # Values for the defined keys. Each value can either be string, int, double or any proto message.
"booleanArray": { # This message only contains a field of boolean array. # Boolean Array.
"booleanValues": [ # Boolean array.
True or False,
],
},
"booleanValue": True or False, # Boolean.
"doubleArray": { # This message only contains a field of double number array. # Double Number Array.
"doubleValues": [ # Double number array.
3.14,
],
},
"doubleValue": 3.14, # Double Number.
"intArray": { # This message only contains a field of integer array. # Integer Array.
"intValues": [ # Integer array.
"A String",
],
},
"intValue": "A String", # Integer.
"jsonValue": "A String", # Json.
"stringArray": { # This message only contains a field of string array. # String Array.
"stringValues": [ # String array.
"A String",
],
},
"stringValue": "A String", # String.
},
},
},
"task": "A String", # Optional. The name for the task.
"taskId": "A String", # Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field `next_tasks.task_id`).
},
],
"taskResponseStatuses": [ # The list of task response status based on the task_types in the request.
{ # Message for task response status.
"errorMessage": "A String", # The error message of the task response in case of failure.
"httpCode": 42, # The http code of the task response.
"taskType": "A String", # The task type.
},
],
}
schedule(parent, body=None, requestId=None, scheduleTime=None, triggerId=None, x__xgafv=None)
Schedules an integration for execution.
Args:
parent: string, Required. The integration resource name. (required)
body: object, The request body.
requestId: string, Optional. This is used to de-dup incoming request: if the duplicate request was detected, the response from the previous execution is returned.
scheduleTime: string, Optional. The time that the integration should be executed. If the time is less or equal to the current time, the integration is executed immediately.
triggerId: string, Required. The API trigger id associated with the integration. An integration can have multiple trigger_id. This field is required to disambiguate which trigger should be invoked
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
"contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body.
"data": "A String", # The HTTP request/response body as raw binary.
"extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
}