@@ -3051,4 +3051,135 @@ def update_workflow_and_task_state_with_http_info(self, body, request_id, workfl
30513051 _return_http_data_only = params .get ('_return_http_data_only' ),
30523052 _preload_content = params .get ('_preload_content' , True ),
30533053 _request_timeout = params .get ('_request_timeout' ),
3054+ collection_formats = collection_formats )
3055+
3056+ def execute_workflow_cr (self , body , name , version , ** kwargs ): # noqa: E501
3057+ """Execute a workflow synchronously with reactive response # noqa: E501
3058+
3059+ This method makes a synchronous HTTP request by default. To make an
3060+ asynchronous HTTP request, please pass async_req=True
3061+ >>> thread = api.execute_workflow_cr(body,name,version)
3062+ >>> result = thread.get()
3063+
3064+ :param async_req bool
3065+ :param StartWorkflowRequest body: (required)
3066+ :param str name: (required)
3067+ :param int version: (required)
3068+ :param str request_id:
3069+ :param str wait_until_task_ref:
3070+ :param int wait_for_seconds:
3071+ :param str consistency: DURABLE or EVENTUAL
3072+ :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW
3073+ :return: WorkflowRun
3074+ If the method is called asynchronously,
3075+ returns the request thread.
3076+ """
3077+ kwargs ['_return_http_data_only' ] = True
3078+ if kwargs .get ('async_req' ):
3079+ return self .execute_workflow_reactive_with_http_info (body , name , version , ** kwargs ) # noqa: E501
3080+ else :
3081+ (data ) = self .execute_workflow_reactive_with_http_info (body , name , version , ** kwargs ) # noqa: E501
3082+ return data
3083+
3084+ def execute_workflow_reactive_with_http_info (self , body , name , version , ** kwargs ): # noqa: E501
3085+ """Execute a workflow synchronously with reactive response # noqa: E501
3086+
3087+ This method makes a synchronous HTTP request by default. To make an
3088+ asynchronous HTTP request, please pass async_req=True
3089+ >>> thread = api.execute_workflow_reactive_with_http_info(body, name, version, async_req=True)
3090+ >>> result = thread.get()
3091+
3092+ :param async_req bool
3093+ :param StartWorkflowRequest body: (required)
3094+ :param str name: (required)
3095+ :param int version: (required)
3096+ :param str request_id:
3097+ :param str wait_until_task_ref:
3098+ :param int wait_for_seconds:
3099+ :param str consistency: DURABLE or EVENTUAL
3100+ :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW
3101+ :return: WorkflowRun
3102+ If the method is called asynchronously,
3103+ returns the request thread.
3104+ """
3105+
3106+ all_params = ['body' , 'name' , 'version' , 'request_id' , 'wait_until_task_ref' , 'wait_for_seconds' , 'consistency' ,
3107+ 'return_strategy' , 'async_req' , '_return_http_data_only' , '_preload_content' ,
3108+ '_request_timeout' ] # noqa: E501
3109+
3110+ params = locals ()
3111+ for key , val in six .iteritems (params ['kwargs' ]):
3112+ if key not in all_params :
3113+ raise TypeError (
3114+ "Got an unexpected keyword argument '%s'"
3115+ " to method execute_workflow" % key
3116+ )
3117+ params [key ] = val
3118+ del params ['kwargs' ]
3119+ # verify the required parameter 'body' is set
3120+ if ('body' not in params or
3121+ params ['body' ] is None ):
3122+ raise ValueError ("Missing the required parameter `body` when calling `execute_workflow`" ) # noqa: E501
3123+ # verify the required parameter 'name' is set
3124+ if ('name' not in params or
3125+ params ['name' ] is None ):
3126+ raise ValueError ("Missing the required parameter `name` when calling `execute_workflow`" ) # noqa: E501
3127+ # verify the required parameter 'version' is set
3128+ if ('version' not in params or
3129+ params ['version' ] is None ):
3130+ raise ValueError ("Missing the required parameter `version` when calling `execute_workflow`" ) # noqa: E501
3131+
3132+ collection_formats = {}
3133+
3134+ path_params = {}
3135+ if 'name' in params :
3136+ path_params ['name' ] = params ['name' ] # noqa: E501
3137+ if 'version' in params :
3138+ path_params ['version' ] = params ['version' ] # noqa: E501
3139+
3140+ query_params = []
3141+ if 'request_id' in params :
3142+ query_params .append (('requestId' , params ['request_id' ])) # noqa: E501
3143+ if 'wait_until_task_ref' in params :
3144+ query_params .append (('waitUntilTaskRef' , params ['wait_until_task_ref' ])) # noqa: E501
3145+ if 'wait_for_seconds' in params :
3146+ query_params .append (('waitForSeconds' , params ['wait_for_seconds' ])) # noqa: E501
3147+ if 'consistency' in params :
3148+ query_params .append (('consistency' , params ['consistency' ])) # noqa: E501
3149+ if 'return_strategy' in params :
3150+ query_params .append (('returnStrategy' , params ['return_strategy' ])) # noqa: E501
3151+
3152+ header_params = {}
3153+
3154+ form_params = []
3155+ local_var_files = {}
3156+
3157+ body_params = None
3158+ if 'body' in params :
3159+ body_params = params ['body' ]
3160+ # HTTP header `Accept`
3161+ header_params ['Accept' ] = self .api_client .select_header_accept (
3162+ ['application/json' ]) # noqa: E501
3163+
3164+ # HTTP header `Content-Type`
3165+ header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
3166+ ['application/json' ]) # noqa: E501
3167+
3168+ # Authentication setting
3169+ auth_settings = ['api_key' ] # noqa: E501
3170+
3171+ return self .api_client .call_api (
3172+ '/workflow/execute/{name}/{version}' , 'POST' ,
3173+ path_params ,
3174+ query_params ,
3175+ header_params ,
3176+ body = body_params ,
3177+ post_params = form_params ,
3178+ files = local_var_files ,
3179+ response_type = 'WorkflowRun' , # noqa: E501
3180+ auth_settings = auth_settings ,
3181+ async_req = params .get ('async_req' ),
3182+ _return_http_data_only = params .get ('_return_http_data_only' ),
3183+ _preload_content = params .get ('_preload_content' , True ),
3184+ _request_timeout = params .get ('_request_timeout' ),
30543185 collection_formats = collection_formats )
0 commit comments