diff --git a/gen/iwfidl/.openapi-generator/FILES b/gen/iwfidl/.openapi-generator/FILES index b68eeca..244f21d 100644 --- a/gen/iwfidl/.openapi-generator/FILES +++ b/gen/iwfidl/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/openapi.yaml api_default.go client.go configuration.go +docs/ChannelInfo.md docs/ChannelRequestStatus.md docs/CommandCombination.md docs/CommandRequest.md @@ -17,6 +18,7 @@ docs/EncodedObject.md docs/ErrorResponse.md docs/ErrorSubStatus.md docs/ExecuteApiFailurePolicy.md +docs/ExecutingStateIdMode.md docs/HealthInfo.md docs/IDReusePolicy.md docs/InterStateChannelCommand.md @@ -40,6 +42,7 @@ docs/TimerStatus.md docs/TriggerContinueAsNewRequest.md docs/WaitUntilApiFailurePolicy.md docs/WorkerErrorResponse.md +docs/WorkflowAlreadyStartedOptions.md docs/WorkflowConditionalClose.md docs/WorkflowConditionalCloseType.md docs/WorkflowConfig.md @@ -62,6 +65,8 @@ docs/WorkflowRpcResponse.md docs/WorkflowSearchRequest.md docs/WorkflowSearchResponse.md docs/WorkflowSearchResponseEntry.md +docs/WorkflowSetDataObjectsRequest.md +docs/WorkflowSetSearchAttributesRequest.md docs/WorkflowSignalRequest.md docs/WorkflowSkipTimerRequest.md docs/WorkflowStartOptions.md @@ -82,6 +87,7 @@ docs/WorkflowWorkerRpcResponse.md git_push.sh go.mod go.sum +model_channel_info.go model_channel_request_status.go model_command_combination.go model_command_request.go @@ -92,6 +98,7 @@ model_encoded_object.go model_error_response.go model_error_sub_status.go model_execute_api_failure_policy.go +model_executing_state_id_mode.go model_health_info.go model_id_reuse_policy.go model_inter_state_channel_command.go @@ -115,6 +122,7 @@ model_timer_status.go model_trigger_continue_as_new_request.go model_wait_until_api_failure_policy.go model_worker_error_response.go +model_workflow_already_started_options.go model_workflow_conditional_close.go model_workflow_conditional_close_type.go model_workflow_config.go @@ -137,6 +145,8 @@ model_workflow_rpc_response.go model_workflow_search_request.go model_workflow_search_response.go model_workflow_search_response_entry.go +model_workflow_set_data_objects_request.go +model_workflow_set_search_attributes_request.go model_workflow_signal_request.go model_workflow_skip_timer_request.go model_workflow_start_options.go diff --git a/gen/iwfidl/README.md b/gen/iwfidl/README.md index c9adee4..4f4133c 100644 --- a/gen/iwfidl/README.md +++ b/gen/iwfidl/README.md @@ -78,7 +78,8 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DefaultApi* | [**ApiV1WorkflowConfigUpdatePost**](docs/DefaultApi.md#apiv1workflowconfigupdatepost) | **Post** /api/v1/workflow/config/update | update the config of a workflow -*DefaultApi* | [**ApiV1WorkflowDataobjectsGetPost**](docs/DefaultApi.md#apiv1workflowdataobjectsgetpost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects +*DefaultApi* | [**ApiV1WorkflowDataobjectsGetPost**](docs/DefaultApi.md#apiv1workflowdataobjectsgetpost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects aka data attributes +*DefaultApi* | [**ApiV1WorkflowDataobjectsSetPost**](docs/DefaultApi.md#apiv1workflowdataobjectssetpost) | **Post** /api/v1/workflow/dataobjects/set | set workflow data objects aka data attributes *DefaultApi* | [**ApiV1WorkflowGetPost**](docs/DefaultApi.md#apiv1workflowgetpost) | **Post** /api/v1/workflow/get | get a workflow's status and results(if completed & requested) *DefaultApi* | [**ApiV1WorkflowGetWithWaitPost**](docs/DefaultApi.md#apiv1workflowgetwithwaitpost) | **Post** /api/v1/workflow/getWithWait | get a workflow's status and results(if completed & requested), wait if the workflow is still running *DefaultApi* | [**ApiV1WorkflowInternalDumpPost**](docs/DefaultApi.md#apiv1workflowinternaldumppost) | **Post** /api/v1/workflow/internal/dump | dump internal info of a workflow @@ -86,6 +87,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**ApiV1WorkflowRpcPost**](docs/DefaultApi.md#apiv1workflowrpcpost) | **Post** /api/v1/workflow/rpc | execute an RPC of a workflow *DefaultApi* | [**ApiV1WorkflowSearchPost**](docs/DefaultApi.md#apiv1workflowsearchpost) | **Post** /api/v1/workflow/search | search for workflows by a search attribute query *DefaultApi* | [**ApiV1WorkflowSearchattributesGetPost**](docs/DefaultApi.md#apiv1workflowsearchattributesgetpost) | **Post** /api/v1/workflow/searchattributes/get | get workflow search attributes +*DefaultApi* | [**ApiV1WorkflowSearchattributesSetPost**](docs/DefaultApi.md#apiv1workflowsearchattributessetpost) | **Post** /api/v1/workflow/searchattributes/set | set workflow search attributes *DefaultApi* | [**ApiV1WorkflowSignalPost**](docs/DefaultApi.md#apiv1workflowsignalpost) | **Post** /api/v1/workflow/signal | signal a workflow *DefaultApi* | [**ApiV1WorkflowStartPost**](docs/DefaultApi.md#apiv1workflowstartpost) | **Post** /api/v1/workflow/start | start a workflow *DefaultApi* | [**ApiV1WorkflowStateDecidePost**](docs/DefaultApi.md#apiv1workflowstatedecidepost) | **Post** /api/v1/workflowState/decide | for invoking WorkflowState.execute API @@ -100,6 +102,7 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [ChannelInfo](docs/ChannelInfo.md) - [ChannelRequestStatus](docs/ChannelRequestStatus.md) - [CommandCombination](docs/CommandCombination.md) - [CommandRequest](docs/CommandRequest.md) @@ -110,6 +113,7 @@ Class | Method | HTTP request | Description - [ErrorResponse](docs/ErrorResponse.md) - [ErrorSubStatus](docs/ErrorSubStatus.md) - [ExecuteApiFailurePolicy](docs/ExecuteApiFailurePolicy.md) + - [ExecutingStateIdMode](docs/ExecutingStateIdMode.md) - [HealthInfo](docs/HealthInfo.md) - [IDReusePolicy](docs/IDReusePolicy.md) - [InterStateChannelCommand](docs/InterStateChannelCommand.md) @@ -133,6 +137,7 @@ Class | Method | HTTP request | Description - [TriggerContinueAsNewRequest](docs/TriggerContinueAsNewRequest.md) - [WaitUntilApiFailurePolicy](docs/WaitUntilApiFailurePolicy.md) - [WorkerErrorResponse](docs/WorkerErrorResponse.md) + - [WorkflowAlreadyStartedOptions](docs/WorkflowAlreadyStartedOptions.md) - [WorkflowConditionalClose](docs/WorkflowConditionalClose.md) - [WorkflowConditionalCloseType](docs/WorkflowConditionalCloseType.md) - [WorkflowConfig](docs/WorkflowConfig.md) @@ -155,6 +160,8 @@ Class | Method | HTTP request | Description - [WorkflowSearchRequest](docs/WorkflowSearchRequest.md) - [WorkflowSearchResponse](docs/WorkflowSearchResponse.md) - [WorkflowSearchResponseEntry](docs/WorkflowSearchResponseEntry.md) + - [WorkflowSetDataObjectsRequest](docs/WorkflowSetDataObjectsRequest.md) + - [WorkflowSetSearchAttributesRequest](docs/WorkflowSetSearchAttributesRequest.md) - [WorkflowSignalRequest](docs/WorkflowSignalRequest.md) - [WorkflowSkipTimerRequest](docs/WorkflowSkipTimerRequest.md) - [WorkflowStartOptions](docs/WorkflowStartOptions.md) diff --git a/gen/iwfidl/api/openapi.yaml b/gen/iwfidl/api/openapi.yaml index 3bc0cc4..1374195 100644 --- a/gen/iwfidl/api/openapi.yaml +++ b/gen/iwfidl/api/openapi.yaml @@ -86,7 +86,25 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Invalid input - summary: get workflow data objects + summary: get workflow data objects aka data attributes + /api/v1/workflow/dataobjects/set: + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowSetDataObjectsRequest' + responses: + "200": + content: {} + description: successful operation + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid input + summary: set workflow data objects aka data attributes /api/v1/workflow/searchattributes/get: post: requestBody: @@ -108,6 +126,24 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Invalid input summary: get workflow search attributes + /api/v1/workflow/searchattributes/set: + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowSetSearchAttributesRequest' + responses: + "200": + content: {} + description: successful operation + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid input + summary: set workflow search attributes /api/v1/workflow/get: post: requestBody: @@ -635,6 +671,18 @@ components: skipWaitUntil: type: boolean type: object + WorkflowAlreadyStartedOptions: + example: + requestId: requestId + ignoreAlreadyStartedError: true + properties: + ignoreAlreadyStartedError: + type: boolean + requestId: + type: string + required: + - ignoreAlreadyStartedError + type: object WorkflowStartOptions: example: workflowStartDelaySeconds: 3 @@ -644,10 +692,10 @@ components: maximumIntervalSeconds: 7 backoffCoefficient: 4.145608 workflowConfigOverride: - disableSystemSearchAttribute: true continueAsNewThreshold: 6 + optimizeTimer: true continueAsNewPageSizeInBytes: 7 - executingStateIdMode: ENABLED_FOR_ALL + executingStateIdMode: null optimizeActivity: true idReusePolicy: null searchAttributes: @@ -671,6 +719,9 @@ components: key: key useMemoForDataAttributes: true cronSchedule: cronSchedule + workflowAlreadyStartedOptions: + requestId: requestId + ignoreAlreadyStartedError: true dataAttributes: - value: data: data @@ -702,6 +753,8 @@ components: $ref: '#/components/schemas/WorkflowConfig' useMemoForDataAttributes: type: boolean + workflowAlreadyStartedOptions: + $ref: '#/components/schemas/WorkflowAlreadyStartedOptions' type: object IDReusePolicy: enum: @@ -876,10 +929,10 @@ components: maximumIntervalSeconds: 7 backoffCoefficient: 4.145608 workflowConfigOverride: - disableSystemSearchAttribute: true continueAsNewThreshold: 6 + optimizeTimer: true continueAsNewPageSizeInBytes: 7 - executingStateIdMode: ENABLED_FOR_ALL + executingStateIdMode: null optimizeActivity: true idReusePolicy: null searchAttributes: @@ -903,6 +956,9 @@ components: key: key useMemoForDataAttributes: true cronSchedule: cronSchedule + workflowAlreadyStartedOptions: + requestId: requestId + ignoreAlreadyStartedError: true dataAttributes: - value: data: data @@ -1039,6 +1095,31 @@ components: $ref: '#/components/schemas/KeyValue' type: array type: object + WorkflowSetDataObjectsRequest: + example: + objects: + - value: + data: data + encoding: encoding + key: key + - value: + data: data + encoding: encoding + key: key + workflowRunId: workflowRunId + workflowId: workflowId + properties: + workflowId: + type: string + workflowRunId: + type: string + objects: + items: + $ref: '#/components/schemas/KeyValue' + type: array + required: + - workflowId + type: object WorkflowGetSearchAttributesRequest: example: keys: @@ -1087,6 +1168,41 @@ components: $ref: '#/components/schemas/SearchAttribute' type: array type: object + WorkflowSetSearchAttributesRequest: + example: + searchAttributes: + - stringValue: stringValue + valueType: null + integerValue: 1 + boolValue: true + doubleValue: 1.4894159098541704 + stringArrayValue: + - stringArrayValue + - stringArrayValue + key: key + - stringValue: stringValue + valueType: null + integerValue: 1 + boolValue: true + doubleValue: 1.4894159098541704 + stringArrayValue: + - stringArrayValue + - stringArrayValue + key: key + workflowRunId: workflowRunId + workflowId: workflowId + properties: + workflowId: + type: string + workflowRunId: + type: string + searchAttributes: + items: + $ref: '#/components/schemas/SearchAttribute' + type: array + required: + - workflowId + type: object WorkflowGetRequest: example: waitTimeSeconds: 0 @@ -1144,6 +1260,7 @@ components: - STATE_DECISION_FAILING_WORKFLOW_ERROR_TYPE - CLIENT_API_FAILING_WORKFLOW_ERROR_TYPE - STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE + - STATE_API_FAIL_ERROR_TYPE - INVALID_USER_WORKFLOW_CODE_ERROR_TYPE - RPC_ACQUIRE_LOCK_FAILURE - SERVER_INTERNAL_ERROR_TYPE @@ -1231,6 +1348,7 @@ components: skipSignalReapply: true workflowRunId: workflowRunId workflowId: workflowId + skipUpdateReapply: true stateExecutionId: stateExecutionId properties: workflowId: @@ -1251,6 +1369,8 @@ components: type: string skipSignalReapply: type: boolean + skipUpdateReapply: + type: boolean required: - resetType - workflowId @@ -1379,9 +1499,15 @@ components: type: object WorkflowWorkerRpcRequest: example: + internalChannelInfos: + key: + size: 0 input: data: data encoding: encoding + signalChannelInfos: + key: + size: 0 context: firstAttemptTimestamp: 6 workflowStartedTimestamp: 0 @@ -1436,11 +1562,26 @@ components: items: $ref: '#/components/schemas/KeyValue' type: array + signalChannelInfos: + additionalProperties: + $ref: '#/components/schemas/ChannelInfo' + type: object + internalChannelInfos: + additionalProperties: + $ref: '#/components/schemas/ChannelInfo' + type: object required: - context - rpcName - workflowType type: object + ChannelInfo: + example: + size: 0 + properties: + size: + type: integer + type: object WorkflowWorkerRpcResponse: example: output: @@ -1782,10 +1923,10 @@ components: WorkflowConfigUpdateRequest: example: workflowConfig: - disableSystemSearchAttribute: true continueAsNewThreshold: 6 + optimizeTimer: true continueAsNewPageSizeInBytes: 7 - executingStateIdMode: ENABLED_FOR_ALL + executingStateIdMode: null optimizeActivity: true workflowRunId: workflowRunId workflowId: workflowId @@ -2864,28 +3005,30 @@ components: required: - channelName type: object + ExecutingStateIdMode: + enum: + - ENABLED_FOR_ALL + - ENABLED_FOR_STATES_WITH_WAIT_UNTIL + - DISABLED + type: string WorkflowConfig: example: - disableSystemSearchAttribute: true continueAsNewThreshold: 6 + optimizeTimer: true continueAsNewPageSizeInBytes: 7 - executingStateIdMode: ENABLED_FOR_ALL + executingStateIdMode: null optimizeActivity: true properties: - disableSystemSearchAttribute: - type: boolean executingStateIdMode: - enum: - - ENABLED_FOR_ALL - - ENABLED_FOR_STATES_WITH_WAIT_UNTIL - - DISABLED - type: string + $ref: '#/components/schemas/ExecutingStateIdMode' continueAsNewThreshold: type: integer continueAsNewPageSizeInBytes: type: integer optimizeActivity: type: boolean + optimizeTimer: + type: boolean type: object Context: example: diff --git a/gen/iwfidl/api_default.go b/gen/iwfidl/api_default.go index e2c5499..982ef02 100644 --- a/gen/iwfidl/api_default.go +++ b/gen/iwfidl/api_default.go @@ -32,7 +32,7 @@ type DefaultApi interface { ApiV1WorkflowConfigUpdatePostExecute(r ApiApiV1WorkflowConfigUpdatePostRequest) (*http.Response, error) /* - ApiV1WorkflowDataobjectsGetPost get workflow data objects + ApiV1WorkflowDataobjectsGetPost get workflow data objects aka data attributes @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiApiV1WorkflowDataobjectsGetPostRequest @@ -43,6 +43,17 @@ type DefaultApi interface { // @return WorkflowGetDataObjectsResponse ApiV1WorkflowDataobjectsGetPostExecute(r ApiApiV1WorkflowDataobjectsGetPostRequest) (*WorkflowGetDataObjectsResponse, *http.Response, error) + /* + ApiV1WorkflowDataobjectsSetPost set workflow data objects aka data attributes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApiV1WorkflowDataobjectsSetPostRequest + */ + ApiV1WorkflowDataobjectsSetPost(ctx context.Context) ApiApiV1WorkflowDataobjectsSetPostRequest + + // ApiV1WorkflowDataobjectsSetPostExecute executes the request + ApiV1WorkflowDataobjectsSetPostExecute(r ApiApiV1WorkflowDataobjectsSetPostRequest) (*http.Response, error) + /* ApiV1WorkflowGetPost get a workflow's status and results(if completed & requested) @@ -127,6 +138,17 @@ type DefaultApi interface { // @return WorkflowGetSearchAttributesResponse ApiV1WorkflowSearchattributesGetPostExecute(r ApiApiV1WorkflowSearchattributesGetPostRequest) (*WorkflowGetSearchAttributesResponse, *http.Response, error) + /* + ApiV1WorkflowSearchattributesSetPost set workflow search attributes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApiV1WorkflowSearchattributesSetPostRequest + */ + ApiV1WorkflowSearchattributesSetPost(ctx context.Context) ApiApiV1WorkflowSearchattributesSetPostRequest + + // ApiV1WorkflowSearchattributesSetPostExecute executes the request + ApiV1WorkflowSearchattributesSetPostExecute(r ApiApiV1WorkflowSearchattributesSetPostRequest) (*http.Response, error) + /* ApiV1WorkflowSignalPost signal a workflow @@ -367,7 +389,7 @@ func (r ApiApiV1WorkflowDataobjectsGetPostRequest) Execute() (*WorkflowGetDataOb } /* -ApiV1WorkflowDataobjectsGetPost get workflow data objects +ApiV1WorkflowDataobjectsGetPost get workflow data objects aka data attributes @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiApiV1WorkflowDataobjectsGetPostRequest @@ -467,6 +489,110 @@ func (a *DefaultApiService) ApiV1WorkflowDataobjectsGetPostExecute(r ApiApiV1Wor return localVarReturnValue, localVarHTTPResponse, nil } +type ApiApiV1WorkflowDataobjectsSetPostRequest struct { + ctx context.Context + ApiService DefaultApi + workflowSetDataObjectsRequest *WorkflowSetDataObjectsRequest +} + +func (r ApiApiV1WorkflowDataobjectsSetPostRequest) WorkflowSetDataObjectsRequest(workflowSetDataObjectsRequest WorkflowSetDataObjectsRequest) ApiApiV1WorkflowDataobjectsSetPostRequest { + r.workflowSetDataObjectsRequest = &workflowSetDataObjectsRequest + return r +} + +func (r ApiApiV1WorkflowDataobjectsSetPostRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiV1WorkflowDataobjectsSetPostExecute(r) +} + +/* +ApiV1WorkflowDataobjectsSetPost set workflow data objects aka data attributes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApiV1WorkflowDataobjectsSetPostRequest +*/ +func (a *DefaultApiService) ApiV1WorkflowDataobjectsSetPost(ctx context.Context) ApiApiV1WorkflowDataobjectsSetPostRequest { + return ApiApiV1WorkflowDataobjectsSetPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) ApiV1WorkflowDataobjectsSetPostExecute(r ApiApiV1WorkflowDataobjectsSetPostRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ApiV1WorkflowDataobjectsSetPost") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/workflow/dataobjects/set" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workflowSetDataObjectsRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiApiV1WorkflowGetPostRequest struct { ctx context.Context ApiService DefaultApi @@ -1312,6 +1438,110 @@ func (a *DefaultApiService) ApiV1WorkflowSearchattributesGetPostExecute(r ApiApi return localVarReturnValue, localVarHTTPResponse, nil } +type ApiApiV1WorkflowSearchattributesSetPostRequest struct { + ctx context.Context + ApiService DefaultApi + workflowSetSearchAttributesRequest *WorkflowSetSearchAttributesRequest +} + +func (r ApiApiV1WorkflowSearchattributesSetPostRequest) WorkflowSetSearchAttributesRequest(workflowSetSearchAttributesRequest WorkflowSetSearchAttributesRequest) ApiApiV1WorkflowSearchattributesSetPostRequest { + r.workflowSetSearchAttributesRequest = &workflowSetSearchAttributesRequest + return r +} + +func (r ApiApiV1WorkflowSearchattributesSetPostRequest) Execute() (*http.Response, error) { + return r.ApiService.ApiV1WorkflowSearchattributesSetPostExecute(r) +} + +/* +ApiV1WorkflowSearchattributesSetPost set workflow search attributes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApiV1WorkflowSearchattributesSetPostRequest +*/ +func (a *DefaultApiService) ApiV1WorkflowSearchattributesSetPost(ctx context.Context) ApiApiV1WorkflowSearchattributesSetPostRequest { + return ApiApiV1WorkflowSearchattributesSetPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) ApiV1WorkflowSearchattributesSetPostExecute(r ApiApiV1WorkflowSearchattributesSetPostRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ApiV1WorkflowSearchattributesSetPost") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/workflow/searchattributes/set" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workflowSetSearchAttributesRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiApiV1WorkflowSignalPostRequest struct { ctx context.Context ApiService DefaultApi diff --git a/gen/iwfidl/docs/ChannelInfo.md b/gen/iwfidl/docs/ChannelInfo.md new file mode 100644 index 0000000..c85b231 --- /dev/null +++ b/gen/iwfidl/docs/ChannelInfo.md @@ -0,0 +1,56 @@ +# ChannelInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | Pointer to **int32** | | [optional] + +## Methods + +### NewChannelInfo + +`func NewChannelInfo() *ChannelInfo` + +NewChannelInfo instantiates a new ChannelInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChannelInfoWithDefaults + +`func NewChannelInfoWithDefaults() *ChannelInfo` + +NewChannelInfoWithDefaults instantiates a new ChannelInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSize + +`func (o *ChannelInfo) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ChannelInfo) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ChannelInfo) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ChannelInfo) HasSize() bool` + +HasSize returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/docs/DefaultApi.md b/gen/iwfidl/docs/DefaultApi.md index 528a75a..4d9c7ec 100644 --- a/gen/iwfidl/docs/DefaultApi.md +++ b/gen/iwfidl/docs/DefaultApi.md @@ -5,7 +5,8 @@ All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**ApiV1WorkflowConfigUpdatePost**](DefaultApi.md#ApiV1WorkflowConfigUpdatePost) | **Post** /api/v1/workflow/config/update | update the config of a workflow -[**ApiV1WorkflowDataobjectsGetPost**](DefaultApi.md#ApiV1WorkflowDataobjectsGetPost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects +[**ApiV1WorkflowDataobjectsGetPost**](DefaultApi.md#ApiV1WorkflowDataobjectsGetPost) | **Post** /api/v1/workflow/dataobjects/get | get workflow data objects aka data attributes +[**ApiV1WorkflowDataobjectsSetPost**](DefaultApi.md#ApiV1WorkflowDataobjectsSetPost) | **Post** /api/v1/workflow/dataobjects/set | set workflow data objects aka data attributes [**ApiV1WorkflowGetPost**](DefaultApi.md#ApiV1WorkflowGetPost) | **Post** /api/v1/workflow/get | get a workflow's status and results(if completed & requested) [**ApiV1WorkflowGetWithWaitPost**](DefaultApi.md#ApiV1WorkflowGetWithWaitPost) | **Post** /api/v1/workflow/getWithWait | get a workflow's status and results(if completed & requested), wait if the workflow is still running [**ApiV1WorkflowInternalDumpPost**](DefaultApi.md#ApiV1WorkflowInternalDumpPost) | **Post** /api/v1/workflow/internal/dump | dump internal info of a workflow @@ -13,6 +14,7 @@ Method | HTTP request | Description [**ApiV1WorkflowRpcPost**](DefaultApi.md#ApiV1WorkflowRpcPost) | **Post** /api/v1/workflow/rpc | execute an RPC of a workflow [**ApiV1WorkflowSearchPost**](DefaultApi.md#ApiV1WorkflowSearchPost) | **Post** /api/v1/workflow/search | search for workflows by a search attribute query [**ApiV1WorkflowSearchattributesGetPost**](DefaultApi.md#ApiV1WorkflowSearchattributesGetPost) | **Post** /api/v1/workflow/searchattributes/get | get workflow search attributes +[**ApiV1WorkflowSearchattributesSetPost**](DefaultApi.md#ApiV1WorkflowSearchattributesSetPost) | **Post** /api/v1/workflow/searchattributes/set | set workflow search attributes [**ApiV1WorkflowSignalPost**](DefaultApi.md#ApiV1WorkflowSignalPost) | **Post** /api/v1/workflow/signal | signal a workflow [**ApiV1WorkflowStartPost**](DefaultApi.md#ApiV1WorkflowStartPost) | **Post** /api/v1/workflow/start | start a workflow [**ApiV1WorkflowStateDecidePost**](DefaultApi.md#ApiV1WorkflowStateDecidePost) | **Post** /api/v1/workflowState/decide | for invoking WorkflowState.execute API @@ -92,7 +94,7 @@ No authorization required > WorkflowGetDataObjectsResponse ApiV1WorkflowDataobjectsGetPost(ctx).WorkflowGetDataObjectsRequest(workflowGetDataObjectsRequest).Execute() -get workflow data objects +get workflow data objects aka data attributes ### Example @@ -152,6 +154,68 @@ No authorization required [[Back to README]](../README.md) +## ApiV1WorkflowDataobjectsSetPost + +> ApiV1WorkflowDataobjectsSetPost(ctx).WorkflowSetDataObjectsRequest(workflowSetDataObjectsRequest).Execute() + +set workflow data objects aka data attributes + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/indeedeng/iwf-idl" +) + +func main() { + workflowSetDataObjectsRequest := *openapiclient.NewWorkflowSetDataObjectsRequest("WorkflowId_example") // WorkflowSetDataObjectsRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DefaultApi.ApiV1WorkflowDataobjectsSetPost(context.Background()).WorkflowSetDataObjectsRequest(workflowSetDataObjectsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ApiV1WorkflowDataobjectsSetPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiApiV1WorkflowDataobjectsSetPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workflowSetDataObjectsRequest** | [**WorkflowSetDataObjectsRequest**](WorkflowSetDataObjectsRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## ApiV1WorkflowGetPost > WorkflowGetResponse ApiV1WorkflowGetPost(ctx).WorkflowGetRequest(workflowGetRequest).Execute() @@ -600,6 +664,68 @@ No authorization required [[Back to README]](../README.md) +## ApiV1WorkflowSearchattributesSetPost + +> ApiV1WorkflowSearchattributesSetPost(ctx).WorkflowSetSearchAttributesRequest(workflowSetSearchAttributesRequest).Execute() + +set workflow search attributes + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/indeedeng/iwf-idl" +) + +func main() { + workflowSetSearchAttributesRequest := *openapiclient.NewWorkflowSetSearchAttributesRequest("WorkflowId_example") // WorkflowSetSearchAttributesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DefaultApi.ApiV1WorkflowSearchattributesSetPost(context.Background()).WorkflowSetSearchAttributesRequest(workflowSetSearchAttributesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ApiV1WorkflowSearchattributesSetPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiApiV1WorkflowSearchattributesSetPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workflowSetSearchAttributesRequest** | [**WorkflowSetSearchAttributesRequest**](WorkflowSetSearchAttributesRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## ApiV1WorkflowSignalPost > ApiV1WorkflowSignalPost(ctx).WorkflowSignalRequest(workflowSignalRequest).Execute() diff --git a/gen/iwfidl/docs/ExecutingStateIdMode.md b/gen/iwfidl/docs/ExecutingStateIdMode.md new file mode 100644 index 0000000..00eb2a7 --- /dev/null +++ b/gen/iwfidl/docs/ExecutingStateIdMode.md @@ -0,0 +1,15 @@ +# ExecutingStateIdMode + +## Enum + + +* `ENABLED_FOR_ALL` (value: `"ENABLED_FOR_ALL"`) + +* `ENABLED_FOR_STATES_WITH_WAIT_UNTIL` (value: `"ENABLED_FOR_STATES_WITH_WAIT_UNTIL"`) + +* `DISABLED` (value: `"DISABLED"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/docs/WorkflowAlreadyStartedOptions.md b/gen/iwfidl/docs/WorkflowAlreadyStartedOptions.md new file mode 100644 index 0000000..dab0703 --- /dev/null +++ b/gen/iwfidl/docs/WorkflowAlreadyStartedOptions.md @@ -0,0 +1,77 @@ +# WorkflowAlreadyStartedOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IgnoreAlreadyStartedError** | **bool** | | +**RequestId** | Pointer to **string** | | [optional] + +## Methods + +### NewWorkflowAlreadyStartedOptions + +`func NewWorkflowAlreadyStartedOptions(ignoreAlreadyStartedError bool, ) *WorkflowAlreadyStartedOptions` + +NewWorkflowAlreadyStartedOptions instantiates a new WorkflowAlreadyStartedOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkflowAlreadyStartedOptionsWithDefaults + +`func NewWorkflowAlreadyStartedOptionsWithDefaults() *WorkflowAlreadyStartedOptions` + +NewWorkflowAlreadyStartedOptionsWithDefaults instantiates a new WorkflowAlreadyStartedOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIgnoreAlreadyStartedError + +`func (o *WorkflowAlreadyStartedOptions) GetIgnoreAlreadyStartedError() bool` + +GetIgnoreAlreadyStartedError returns the IgnoreAlreadyStartedError field if non-nil, zero value otherwise. + +### GetIgnoreAlreadyStartedErrorOk + +`func (o *WorkflowAlreadyStartedOptions) GetIgnoreAlreadyStartedErrorOk() (*bool, bool)` + +GetIgnoreAlreadyStartedErrorOk returns a tuple with the IgnoreAlreadyStartedError field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIgnoreAlreadyStartedError + +`func (o *WorkflowAlreadyStartedOptions) SetIgnoreAlreadyStartedError(v bool)` + +SetIgnoreAlreadyStartedError sets IgnoreAlreadyStartedError field to given value. + + +### GetRequestId + +`func (o *WorkflowAlreadyStartedOptions) GetRequestId() string` + +GetRequestId returns the RequestId field if non-nil, zero value otherwise. + +### GetRequestIdOk + +`func (o *WorkflowAlreadyStartedOptions) GetRequestIdOk() (*string, bool)` + +GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestId + +`func (o *WorkflowAlreadyStartedOptions) SetRequestId(v string)` + +SetRequestId sets RequestId field to given value. + +### HasRequestId + +`func (o *WorkflowAlreadyStartedOptions) HasRequestId() bool` + +HasRequestId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/docs/WorkflowConfig.md b/gen/iwfidl/docs/WorkflowConfig.md index 68fae4c..916f58c 100644 --- a/gen/iwfidl/docs/WorkflowConfig.md +++ b/gen/iwfidl/docs/WorkflowConfig.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DisableSystemSearchAttribute** | Pointer to **bool** | | [optional] -**ExecutingStateIdMode** | Pointer to **string** | | [optional] +**ExecutingStateIdMode** | Pointer to [**ExecutingStateIdMode**](ExecutingStateIdMode.md) | | [optional] **ContinueAsNewThreshold** | Pointer to **int32** | | [optional] **ContinueAsNewPageSizeInBytes** | Pointer to **int32** | | [optional] **OptimizeActivity** | Pointer to **bool** | | [optional] +**OptimizeTimer** | Pointer to **bool** | | [optional] ## Methods @@ -29,47 +29,22 @@ NewWorkflowConfigWithDefaults instantiates a new WorkflowConfig object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetDisableSystemSearchAttribute - -`func (o *WorkflowConfig) GetDisableSystemSearchAttribute() bool` - -GetDisableSystemSearchAttribute returns the DisableSystemSearchAttribute field if non-nil, zero value otherwise. - -### GetDisableSystemSearchAttributeOk - -`func (o *WorkflowConfig) GetDisableSystemSearchAttributeOk() (*bool, bool)` - -GetDisableSystemSearchAttributeOk returns a tuple with the DisableSystemSearchAttribute field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisableSystemSearchAttribute - -`func (o *WorkflowConfig) SetDisableSystemSearchAttribute(v bool)` - -SetDisableSystemSearchAttribute sets DisableSystemSearchAttribute field to given value. - -### HasDisableSystemSearchAttribute - -`func (o *WorkflowConfig) HasDisableSystemSearchAttribute() bool` - -HasDisableSystemSearchAttribute returns a boolean if a field has been set. - ### GetExecutingStateIdMode -`func (o *WorkflowConfig) GetExecutingStateIdMode() string` +`func (o *WorkflowConfig) GetExecutingStateIdMode() ExecutingStateIdMode` GetExecutingStateIdMode returns the ExecutingStateIdMode field if non-nil, zero value otherwise. ### GetExecutingStateIdModeOk -`func (o *WorkflowConfig) GetExecutingStateIdModeOk() (*string, bool)` +`func (o *WorkflowConfig) GetExecutingStateIdModeOk() (*ExecutingStateIdMode, bool)` GetExecutingStateIdModeOk returns a tuple with the ExecutingStateIdMode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExecutingStateIdMode -`func (o *WorkflowConfig) SetExecutingStateIdMode(v string)` +`func (o *WorkflowConfig) SetExecutingStateIdMode(v ExecutingStateIdMode)` SetExecutingStateIdMode sets ExecutingStateIdMode field to given value. @@ -154,6 +129,31 @@ SetOptimizeActivity sets OptimizeActivity field to given value. HasOptimizeActivity returns a boolean if a field has been set. +### GetOptimizeTimer + +`func (o *WorkflowConfig) GetOptimizeTimer() bool` + +GetOptimizeTimer returns the OptimizeTimer field if non-nil, zero value otherwise. + +### GetOptimizeTimerOk + +`func (o *WorkflowConfig) GetOptimizeTimerOk() (*bool, bool)` + +GetOptimizeTimerOk returns a tuple with the OptimizeTimer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOptimizeTimer + +`func (o *WorkflowConfig) SetOptimizeTimer(v bool)` + +SetOptimizeTimer sets OptimizeTimer field to given value. + +### HasOptimizeTimer + +`func (o *WorkflowConfig) HasOptimizeTimer() bool` + +HasOptimizeTimer returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gen/iwfidl/docs/WorkflowErrorType.md b/gen/iwfidl/docs/WorkflowErrorType.md index fa6e645..b22016c 100644 --- a/gen/iwfidl/docs/WorkflowErrorType.md +++ b/gen/iwfidl/docs/WorkflowErrorType.md @@ -9,6 +9,8 @@ * `STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE` (value: `"STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE"`) +* `STATE_API_FAIL_ERROR_TYPE` (value: `"STATE_API_FAIL_ERROR_TYPE"`) + * `INVALID_USER_WORKFLOW_CODE_ERROR_TYPE` (value: `"INVALID_USER_WORKFLOW_CODE_ERROR_TYPE"`) * `RPC_ACQUIRE_LOCK_FAILURE` (value: `"RPC_ACQUIRE_LOCK_FAILURE"`) diff --git a/gen/iwfidl/docs/WorkflowResetRequest.md b/gen/iwfidl/docs/WorkflowResetRequest.md index 18c103d..ad7794a 100644 --- a/gen/iwfidl/docs/WorkflowResetRequest.md +++ b/gen/iwfidl/docs/WorkflowResetRequest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **StateId** | Pointer to **string** | | [optional] **StateExecutionId** | Pointer to **string** | | [optional] **SkipSignalReapply** | Pointer to **bool** | | [optional] +**SkipUpdateReapply** | Pointer to **bool** | | [optional] ## Methods @@ -248,6 +249,31 @@ SetSkipSignalReapply sets SkipSignalReapply field to given value. HasSkipSignalReapply returns a boolean if a field has been set. +### GetSkipUpdateReapply + +`func (o *WorkflowResetRequest) GetSkipUpdateReapply() bool` + +GetSkipUpdateReapply returns the SkipUpdateReapply field if non-nil, zero value otherwise. + +### GetSkipUpdateReapplyOk + +`func (o *WorkflowResetRequest) GetSkipUpdateReapplyOk() (*bool, bool)` + +GetSkipUpdateReapplyOk returns a tuple with the SkipUpdateReapply field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkipUpdateReapply + +`func (o *WorkflowResetRequest) SetSkipUpdateReapply(v bool)` + +SetSkipUpdateReapply sets SkipUpdateReapply field to given value. + +### HasSkipUpdateReapply + +`func (o *WorkflowResetRequest) HasSkipUpdateReapply() bool` + +HasSkipUpdateReapply returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gen/iwfidl/docs/WorkflowSetDataObjectsRequest.md b/gen/iwfidl/docs/WorkflowSetDataObjectsRequest.md new file mode 100644 index 0000000..cd5f200 --- /dev/null +++ b/gen/iwfidl/docs/WorkflowSetDataObjectsRequest.md @@ -0,0 +1,103 @@ +# WorkflowSetDataObjectsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WorkflowId** | **string** | | +**WorkflowRunId** | Pointer to **string** | | [optional] +**Objects** | Pointer to [**[]KeyValue**](KeyValue.md) | | [optional] + +## Methods + +### NewWorkflowSetDataObjectsRequest + +`func NewWorkflowSetDataObjectsRequest(workflowId string, ) *WorkflowSetDataObjectsRequest` + +NewWorkflowSetDataObjectsRequest instantiates a new WorkflowSetDataObjectsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkflowSetDataObjectsRequestWithDefaults + +`func NewWorkflowSetDataObjectsRequestWithDefaults() *WorkflowSetDataObjectsRequest` + +NewWorkflowSetDataObjectsRequestWithDefaults instantiates a new WorkflowSetDataObjectsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWorkflowId + +`func (o *WorkflowSetDataObjectsRequest) GetWorkflowId() string` + +GetWorkflowId returns the WorkflowId field if non-nil, zero value otherwise. + +### GetWorkflowIdOk + +`func (o *WorkflowSetDataObjectsRequest) GetWorkflowIdOk() (*string, bool)` + +GetWorkflowIdOk returns a tuple with the WorkflowId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkflowId + +`func (o *WorkflowSetDataObjectsRequest) SetWorkflowId(v string)` + +SetWorkflowId sets WorkflowId field to given value. + + +### GetWorkflowRunId + +`func (o *WorkflowSetDataObjectsRequest) GetWorkflowRunId() string` + +GetWorkflowRunId returns the WorkflowRunId field if non-nil, zero value otherwise. + +### GetWorkflowRunIdOk + +`func (o *WorkflowSetDataObjectsRequest) GetWorkflowRunIdOk() (*string, bool)` + +GetWorkflowRunIdOk returns a tuple with the WorkflowRunId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkflowRunId + +`func (o *WorkflowSetDataObjectsRequest) SetWorkflowRunId(v string)` + +SetWorkflowRunId sets WorkflowRunId field to given value. + +### HasWorkflowRunId + +`func (o *WorkflowSetDataObjectsRequest) HasWorkflowRunId() bool` + +HasWorkflowRunId returns a boolean if a field has been set. + +### GetObjects + +`func (o *WorkflowSetDataObjectsRequest) GetObjects() []KeyValue` + +GetObjects returns the Objects field if non-nil, zero value otherwise. + +### GetObjectsOk + +`func (o *WorkflowSetDataObjectsRequest) GetObjectsOk() (*[]KeyValue, bool)` + +GetObjectsOk returns a tuple with the Objects field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjects + +`func (o *WorkflowSetDataObjectsRequest) SetObjects(v []KeyValue)` + +SetObjects sets Objects field to given value. + +### HasObjects + +`func (o *WorkflowSetDataObjectsRequest) HasObjects() bool` + +HasObjects returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/docs/WorkflowSetSearchAttributesRequest.md b/gen/iwfidl/docs/WorkflowSetSearchAttributesRequest.md new file mode 100644 index 0000000..054360c --- /dev/null +++ b/gen/iwfidl/docs/WorkflowSetSearchAttributesRequest.md @@ -0,0 +1,103 @@ +# WorkflowSetSearchAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WorkflowId** | **string** | | +**WorkflowRunId** | Pointer to **string** | | [optional] +**SearchAttributes** | Pointer to [**[]SearchAttribute**](SearchAttribute.md) | | [optional] + +## Methods + +### NewWorkflowSetSearchAttributesRequest + +`func NewWorkflowSetSearchAttributesRequest(workflowId string, ) *WorkflowSetSearchAttributesRequest` + +NewWorkflowSetSearchAttributesRequest instantiates a new WorkflowSetSearchAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkflowSetSearchAttributesRequestWithDefaults + +`func NewWorkflowSetSearchAttributesRequestWithDefaults() *WorkflowSetSearchAttributesRequest` + +NewWorkflowSetSearchAttributesRequestWithDefaults instantiates a new WorkflowSetSearchAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWorkflowId + +`func (o *WorkflowSetSearchAttributesRequest) GetWorkflowId() string` + +GetWorkflowId returns the WorkflowId field if non-nil, zero value otherwise. + +### GetWorkflowIdOk + +`func (o *WorkflowSetSearchAttributesRequest) GetWorkflowIdOk() (*string, bool)` + +GetWorkflowIdOk returns a tuple with the WorkflowId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkflowId + +`func (o *WorkflowSetSearchAttributesRequest) SetWorkflowId(v string)` + +SetWorkflowId sets WorkflowId field to given value. + + +### GetWorkflowRunId + +`func (o *WorkflowSetSearchAttributesRequest) GetWorkflowRunId() string` + +GetWorkflowRunId returns the WorkflowRunId field if non-nil, zero value otherwise. + +### GetWorkflowRunIdOk + +`func (o *WorkflowSetSearchAttributesRequest) GetWorkflowRunIdOk() (*string, bool)` + +GetWorkflowRunIdOk returns a tuple with the WorkflowRunId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkflowRunId + +`func (o *WorkflowSetSearchAttributesRequest) SetWorkflowRunId(v string)` + +SetWorkflowRunId sets WorkflowRunId field to given value. + +### HasWorkflowRunId + +`func (o *WorkflowSetSearchAttributesRequest) HasWorkflowRunId() bool` + +HasWorkflowRunId returns a boolean if a field has been set. + +### GetSearchAttributes + +`func (o *WorkflowSetSearchAttributesRequest) GetSearchAttributes() []SearchAttribute` + +GetSearchAttributes returns the SearchAttributes field if non-nil, zero value otherwise. + +### GetSearchAttributesOk + +`func (o *WorkflowSetSearchAttributesRequest) GetSearchAttributesOk() (*[]SearchAttribute, bool)` + +GetSearchAttributesOk returns a tuple with the SearchAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchAttributes + +`func (o *WorkflowSetSearchAttributesRequest) SetSearchAttributes(v []SearchAttribute)` + +SetSearchAttributes sets SearchAttributes field to given value. + +### HasSearchAttributes + +`func (o *WorkflowSetSearchAttributesRequest) HasSearchAttributes() bool` + +HasSearchAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/docs/WorkflowStartOptions.md b/gen/iwfidl/docs/WorkflowStartOptions.md index 0b0c5af..9dd0f61 100644 --- a/gen/iwfidl/docs/WorkflowStartOptions.md +++ b/gen/iwfidl/docs/WorkflowStartOptions.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **DataAttributes** | Pointer to [**[]KeyValue**](KeyValue.md) | | [optional] **WorkflowConfigOverride** | Pointer to [**WorkflowConfig**](WorkflowConfig.md) | | [optional] **UseMemoForDataAttributes** | Pointer to **bool** | | [optional] +**WorkflowAlreadyStartedOptions** | Pointer to [**WorkflowAlreadyStartedOptions**](WorkflowAlreadyStartedOptions.md) | | [optional] ## Methods @@ -232,6 +233,31 @@ SetUseMemoForDataAttributes sets UseMemoForDataAttributes field to given value. HasUseMemoForDataAttributes returns a boolean if a field has been set. +### GetWorkflowAlreadyStartedOptions + +`func (o *WorkflowStartOptions) GetWorkflowAlreadyStartedOptions() WorkflowAlreadyStartedOptions` + +GetWorkflowAlreadyStartedOptions returns the WorkflowAlreadyStartedOptions field if non-nil, zero value otherwise. + +### GetWorkflowAlreadyStartedOptionsOk + +`func (o *WorkflowStartOptions) GetWorkflowAlreadyStartedOptionsOk() (*WorkflowAlreadyStartedOptions, bool)` + +GetWorkflowAlreadyStartedOptionsOk returns a tuple with the WorkflowAlreadyStartedOptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkflowAlreadyStartedOptions + +`func (o *WorkflowStartOptions) SetWorkflowAlreadyStartedOptions(v WorkflowAlreadyStartedOptions)` + +SetWorkflowAlreadyStartedOptions sets WorkflowAlreadyStartedOptions field to given value. + +### HasWorkflowAlreadyStartedOptions + +`func (o *WorkflowStartOptions) HasWorkflowAlreadyStartedOptions() bool` + +HasWorkflowAlreadyStartedOptions returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gen/iwfidl/docs/WorkflowWorkerRpcRequest.md b/gen/iwfidl/docs/WorkflowWorkerRpcRequest.md index a239cef..a72be55 100644 --- a/gen/iwfidl/docs/WorkflowWorkerRpcRequest.md +++ b/gen/iwfidl/docs/WorkflowWorkerRpcRequest.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **Input** | Pointer to [**EncodedObject**](EncodedObject.md) | | [optional] **SearchAttributes** | Pointer to [**[]SearchAttribute**](SearchAttribute.md) | | [optional] **DataAttributes** | Pointer to [**[]KeyValue**](KeyValue.md) | | [optional] +**SignalChannelInfos** | Pointer to [**map[string]ChannelInfo**](ChannelInfo.md) | | [optional] +**InternalChannelInfos** | Pointer to [**map[string]ChannelInfo**](ChannelInfo.md) | | [optional] ## Methods @@ -165,6 +167,56 @@ SetDataAttributes sets DataAttributes field to given value. HasDataAttributes returns a boolean if a field has been set. +### GetSignalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) GetSignalChannelInfos() map[string]ChannelInfo` + +GetSignalChannelInfos returns the SignalChannelInfos field if non-nil, zero value otherwise. + +### GetSignalChannelInfosOk + +`func (o *WorkflowWorkerRpcRequest) GetSignalChannelInfosOk() (*map[string]ChannelInfo, bool)` + +GetSignalChannelInfosOk returns a tuple with the SignalChannelInfos field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSignalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) SetSignalChannelInfos(v map[string]ChannelInfo)` + +SetSignalChannelInfos sets SignalChannelInfos field to given value. + +### HasSignalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) HasSignalChannelInfos() bool` + +HasSignalChannelInfos returns a boolean if a field has been set. + +### GetInternalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) GetInternalChannelInfos() map[string]ChannelInfo` + +GetInternalChannelInfos returns the InternalChannelInfos field if non-nil, zero value otherwise. + +### GetInternalChannelInfosOk + +`func (o *WorkflowWorkerRpcRequest) GetInternalChannelInfosOk() (*map[string]ChannelInfo, bool)` + +GetInternalChannelInfosOk returns a tuple with the InternalChannelInfos field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInternalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) SetInternalChannelInfos(v map[string]ChannelInfo)` + +SetInternalChannelInfos sets InternalChannelInfos field to given value. + +### HasInternalChannelInfos + +`func (o *WorkflowWorkerRpcRequest) HasInternalChannelInfos() bool` + +HasInternalChannelInfos returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gen/iwfidl/model_channel_info.go b/gen/iwfidl/model_channel_info.go new file mode 100644 index 0000000..81f3cfa --- /dev/null +++ b/gen/iwfidl/model_channel_info.go @@ -0,0 +1,124 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" +) + +// checks if the ChannelInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChannelInfo{} + +// ChannelInfo struct for ChannelInfo +type ChannelInfo struct { + Size *int32 `json:"size,omitempty"` +} + +// NewChannelInfo instantiates a new ChannelInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChannelInfo() *ChannelInfo { + this := ChannelInfo{} + return &this +} + +// NewChannelInfoWithDefaults instantiates a new ChannelInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChannelInfoWithDefaults() *ChannelInfo { + this := ChannelInfo{} + return &this +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *ChannelInfo) GetSize() int32 { + if o == nil || IsNil(o.Size) { + var ret int32 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChannelInfo) GetSizeOk() (*int32, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *ChannelInfo) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int32 and assigns it to the Size field. +func (o *ChannelInfo) SetSize(v int32) { + o.Size = &v +} + +func (o ChannelInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChannelInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableChannelInfo struct { + value *ChannelInfo + isSet bool +} + +func (v NullableChannelInfo) Get() *ChannelInfo { + return v.value +} + +func (v *NullableChannelInfo) Set(val *ChannelInfo) { + v.value = val + v.isSet = true +} + +func (v NullableChannelInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableChannelInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChannelInfo(val *ChannelInfo) *NullableChannelInfo { + return &NullableChannelInfo{value: val, isSet: true} +} + +func (v NullableChannelInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChannelInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/iwfidl/model_executing_state_id_mode.go b/gen/iwfidl/model_executing_state_id_mode.go new file mode 100644 index 0000000..ad91b55 --- /dev/null +++ b/gen/iwfidl/model_executing_state_id_mode.go @@ -0,0 +1,112 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" + "fmt" +) + +// ExecutingStateIdMode the model 'ExecutingStateIdMode' +type ExecutingStateIdMode string + +// List of ExecutingStateIdMode +const ( + ENABLED_FOR_ALL ExecutingStateIdMode = "ENABLED_FOR_ALL" + ENABLED_FOR_STATES_WITH_WAIT_UNTIL ExecutingStateIdMode = "ENABLED_FOR_STATES_WITH_WAIT_UNTIL" + DISABLED ExecutingStateIdMode = "DISABLED" +) + +// All allowed values of ExecutingStateIdMode enum +var AllowedExecutingStateIdModeEnumValues = []ExecutingStateIdMode{ + "ENABLED_FOR_ALL", + "ENABLED_FOR_STATES_WITH_WAIT_UNTIL", + "DISABLED", +} + +func (v *ExecutingStateIdMode) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ExecutingStateIdMode(value) + for _, existing := range AllowedExecutingStateIdModeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ExecutingStateIdMode", value) +} + +// NewExecutingStateIdModeFromValue returns a pointer to a valid ExecutingStateIdMode +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewExecutingStateIdModeFromValue(v string) (*ExecutingStateIdMode, error) { + ev := ExecutingStateIdMode(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ExecutingStateIdMode: valid values are %v", v, AllowedExecutingStateIdModeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ExecutingStateIdMode) IsValid() bool { + for _, existing := range AllowedExecutingStateIdModeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ExecutingStateIdMode value +func (v ExecutingStateIdMode) Ptr() *ExecutingStateIdMode { + return &v +} + +type NullableExecutingStateIdMode struct { + value *ExecutingStateIdMode + isSet bool +} + +func (v NullableExecutingStateIdMode) Get() *ExecutingStateIdMode { + return v.value +} + +func (v *NullableExecutingStateIdMode) Set(val *ExecutingStateIdMode) { + v.value = val + v.isSet = true +} + +func (v NullableExecutingStateIdMode) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutingStateIdMode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutingStateIdMode(val *ExecutingStateIdMode) *NullableExecutingStateIdMode { + return &NullableExecutingStateIdMode{value: val, isSet: true} +} + +func (v NullableExecutingStateIdMode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutingStateIdMode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/iwfidl/model_workflow_already_started_options.go b/gen/iwfidl/model_workflow_already_started_options.go new file mode 100644 index 0000000..087d95e --- /dev/null +++ b/gen/iwfidl/model_workflow_already_started_options.go @@ -0,0 +1,151 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" +) + +// checks if the WorkflowAlreadyStartedOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowAlreadyStartedOptions{} + +// WorkflowAlreadyStartedOptions struct for WorkflowAlreadyStartedOptions +type WorkflowAlreadyStartedOptions struct { + IgnoreAlreadyStartedError bool `json:"ignoreAlreadyStartedError"` + RequestId *string `json:"requestId,omitempty"` +} + +// NewWorkflowAlreadyStartedOptions instantiates a new WorkflowAlreadyStartedOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowAlreadyStartedOptions(ignoreAlreadyStartedError bool) *WorkflowAlreadyStartedOptions { + this := WorkflowAlreadyStartedOptions{} + this.IgnoreAlreadyStartedError = ignoreAlreadyStartedError + return &this +} + +// NewWorkflowAlreadyStartedOptionsWithDefaults instantiates a new WorkflowAlreadyStartedOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowAlreadyStartedOptionsWithDefaults() *WorkflowAlreadyStartedOptions { + this := WorkflowAlreadyStartedOptions{} + return &this +} + +// GetIgnoreAlreadyStartedError returns the IgnoreAlreadyStartedError field value +func (o *WorkflowAlreadyStartedOptions) GetIgnoreAlreadyStartedError() bool { + if o == nil { + var ret bool + return ret + } + + return o.IgnoreAlreadyStartedError +} + +// GetIgnoreAlreadyStartedErrorOk returns a tuple with the IgnoreAlreadyStartedError field value +// and a boolean to check if the value has been set. +func (o *WorkflowAlreadyStartedOptions) GetIgnoreAlreadyStartedErrorOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IgnoreAlreadyStartedError, true +} + +// SetIgnoreAlreadyStartedError sets field value +func (o *WorkflowAlreadyStartedOptions) SetIgnoreAlreadyStartedError(v bool) { + o.IgnoreAlreadyStartedError = v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *WorkflowAlreadyStartedOptions) GetRequestId() string { + if o == nil || IsNil(o.RequestId) { + var ret string + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowAlreadyStartedOptions) GetRequestIdOk() (*string, bool) { + if o == nil || IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *WorkflowAlreadyStartedOptions) HasRequestId() bool { + if o != nil && !IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given string and assigns it to the RequestId field. +func (o *WorkflowAlreadyStartedOptions) SetRequestId(v string) { + o.RequestId = &v +} + +func (o WorkflowAlreadyStartedOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowAlreadyStartedOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ignoreAlreadyStartedError"] = o.IgnoreAlreadyStartedError + if !IsNil(o.RequestId) { + toSerialize["requestId"] = o.RequestId + } + return toSerialize, nil +} + +type NullableWorkflowAlreadyStartedOptions struct { + value *WorkflowAlreadyStartedOptions + isSet bool +} + +func (v NullableWorkflowAlreadyStartedOptions) Get() *WorkflowAlreadyStartedOptions { + return v.value +} + +func (v *NullableWorkflowAlreadyStartedOptions) Set(val *WorkflowAlreadyStartedOptions) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowAlreadyStartedOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowAlreadyStartedOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowAlreadyStartedOptions(val *WorkflowAlreadyStartedOptions) *NullableWorkflowAlreadyStartedOptions { + return &NullableWorkflowAlreadyStartedOptions{value: val, isSet: true} +} + +func (v NullableWorkflowAlreadyStartedOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowAlreadyStartedOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/iwfidl/model_workflow_config.go b/gen/iwfidl/model_workflow_config.go index 3b8924f..38c8936 100644 --- a/gen/iwfidl/model_workflow_config.go +++ b/gen/iwfidl/model_workflow_config.go @@ -19,11 +19,11 @@ var _ MappedNullable = &WorkflowConfig{} // WorkflowConfig struct for WorkflowConfig type WorkflowConfig struct { - DisableSystemSearchAttribute *bool `json:"disableSystemSearchAttribute,omitempty"` - ExecutingStateIdMode *string `json:"executingStateIdMode,omitempty"` - ContinueAsNewThreshold *int32 `json:"continueAsNewThreshold,omitempty"` - ContinueAsNewPageSizeInBytes *int32 `json:"continueAsNewPageSizeInBytes,omitempty"` - OptimizeActivity *bool `json:"optimizeActivity,omitempty"` + ExecutingStateIdMode *ExecutingStateIdMode `json:"executingStateIdMode,omitempty"` + ContinueAsNewThreshold *int32 `json:"continueAsNewThreshold,omitempty"` + ContinueAsNewPageSizeInBytes *int32 `json:"continueAsNewPageSizeInBytes,omitempty"` + OptimizeActivity *bool `json:"optimizeActivity,omitempty"` + OptimizeTimer *bool `json:"optimizeTimer,omitempty"` } // NewWorkflowConfig instantiates a new WorkflowConfig object @@ -43,42 +43,10 @@ func NewWorkflowConfigWithDefaults() *WorkflowConfig { return &this } -// GetDisableSystemSearchAttribute returns the DisableSystemSearchAttribute field value if set, zero value otherwise. -func (o *WorkflowConfig) GetDisableSystemSearchAttribute() bool { - if o == nil || IsNil(o.DisableSystemSearchAttribute) { - var ret bool - return ret - } - return *o.DisableSystemSearchAttribute -} - -// GetDisableSystemSearchAttributeOk returns a tuple with the DisableSystemSearchAttribute field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WorkflowConfig) GetDisableSystemSearchAttributeOk() (*bool, bool) { - if o == nil || IsNil(o.DisableSystemSearchAttribute) { - return nil, false - } - return o.DisableSystemSearchAttribute, true -} - -// HasDisableSystemSearchAttribute returns a boolean if a field has been set. -func (o *WorkflowConfig) HasDisableSystemSearchAttribute() bool { - if o != nil && !IsNil(o.DisableSystemSearchAttribute) { - return true - } - - return false -} - -// SetDisableSystemSearchAttribute gets a reference to the given bool and assigns it to the DisableSystemSearchAttribute field. -func (o *WorkflowConfig) SetDisableSystemSearchAttribute(v bool) { - o.DisableSystemSearchAttribute = &v -} - // GetExecutingStateIdMode returns the ExecutingStateIdMode field value if set, zero value otherwise. -func (o *WorkflowConfig) GetExecutingStateIdMode() string { +func (o *WorkflowConfig) GetExecutingStateIdMode() ExecutingStateIdMode { if o == nil || IsNil(o.ExecutingStateIdMode) { - var ret string + var ret ExecutingStateIdMode return ret } return *o.ExecutingStateIdMode @@ -86,7 +54,7 @@ func (o *WorkflowConfig) GetExecutingStateIdMode() string { // GetExecutingStateIdModeOk returns a tuple with the ExecutingStateIdMode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WorkflowConfig) GetExecutingStateIdModeOk() (*string, bool) { +func (o *WorkflowConfig) GetExecutingStateIdModeOk() (*ExecutingStateIdMode, bool) { if o == nil || IsNil(o.ExecutingStateIdMode) { return nil, false } @@ -102,8 +70,8 @@ func (o *WorkflowConfig) HasExecutingStateIdMode() bool { return false } -// SetExecutingStateIdMode gets a reference to the given string and assigns it to the ExecutingStateIdMode field. -func (o *WorkflowConfig) SetExecutingStateIdMode(v string) { +// SetExecutingStateIdMode gets a reference to the given ExecutingStateIdMode and assigns it to the ExecutingStateIdMode field. +func (o *WorkflowConfig) SetExecutingStateIdMode(v ExecutingStateIdMode) { o.ExecutingStateIdMode = &v } @@ -203,6 +171,38 @@ func (o *WorkflowConfig) SetOptimizeActivity(v bool) { o.OptimizeActivity = &v } +// GetOptimizeTimer returns the OptimizeTimer field value if set, zero value otherwise. +func (o *WorkflowConfig) GetOptimizeTimer() bool { + if o == nil || IsNil(o.OptimizeTimer) { + var ret bool + return ret + } + return *o.OptimizeTimer +} + +// GetOptimizeTimerOk returns a tuple with the OptimizeTimer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowConfig) GetOptimizeTimerOk() (*bool, bool) { + if o == nil || IsNil(o.OptimizeTimer) { + return nil, false + } + return o.OptimizeTimer, true +} + +// HasOptimizeTimer returns a boolean if a field has been set. +func (o *WorkflowConfig) HasOptimizeTimer() bool { + if o != nil && !IsNil(o.OptimizeTimer) { + return true + } + + return false +} + +// SetOptimizeTimer gets a reference to the given bool and assigns it to the OptimizeTimer field. +func (o *WorkflowConfig) SetOptimizeTimer(v bool) { + o.OptimizeTimer = &v +} + func (o WorkflowConfig) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -213,9 +213,6 @@ func (o WorkflowConfig) MarshalJSON() ([]byte, error) { func (o WorkflowConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.DisableSystemSearchAttribute) { - toSerialize["disableSystemSearchAttribute"] = o.DisableSystemSearchAttribute - } if !IsNil(o.ExecutingStateIdMode) { toSerialize["executingStateIdMode"] = o.ExecutingStateIdMode } @@ -228,6 +225,9 @@ func (o WorkflowConfig) ToMap() (map[string]interface{}, error) { if !IsNil(o.OptimizeActivity) { toSerialize["optimizeActivity"] = o.OptimizeActivity } + if !IsNil(o.OptimizeTimer) { + toSerialize["optimizeTimer"] = o.OptimizeTimer + } return toSerialize, nil } diff --git a/gen/iwfidl/model_workflow_error_type.go b/gen/iwfidl/model_workflow_error_type.go index 647cec8..e740329 100644 --- a/gen/iwfidl/model_workflow_error_type.go +++ b/gen/iwfidl/model_workflow_error_type.go @@ -23,6 +23,7 @@ const ( STATE_DECISION_FAILING_WORKFLOW_ERROR_TYPE WorkflowErrorType = "STATE_DECISION_FAILING_WORKFLOW_ERROR_TYPE" CLIENT_API_FAILING_WORKFLOW_ERROR_TYPE WorkflowErrorType = "CLIENT_API_FAILING_WORKFLOW_ERROR_TYPE" STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE WorkflowErrorType = "STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE" + STATE_API_FAIL_ERROR_TYPE WorkflowErrorType = "STATE_API_FAIL_ERROR_TYPE" INVALID_USER_WORKFLOW_CODE_ERROR_TYPE WorkflowErrorType = "INVALID_USER_WORKFLOW_CODE_ERROR_TYPE" RPC_ACQUIRE_LOCK_FAILURE WorkflowErrorType = "RPC_ACQUIRE_LOCK_FAILURE" SERVER_INTERNAL_ERROR_TYPE WorkflowErrorType = "SERVER_INTERNAL_ERROR_TYPE" @@ -33,6 +34,7 @@ var AllowedWorkflowErrorTypeEnumValues = []WorkflowErrorType{ "STATE_DECISION_FAILING_WORKFLOW_ERROR_TYPE", "CLIENT_API_FAILING_WORKFLOW_ERROR_TYPE", "STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE", + "STATE_API_FAIL_ERROR_TYPE", "INVALID_USER_WORKFLOW_CODE_ERROR_TYPE", "RPC_ACQUIRE_LOCK_FAILURE", "SERVER_INTERNAL_ERROR_TYPE", diff --git a/gen/iwfidl/model_workflow_reset_request.go b/gen/iwfidl/model_workflow_reset_request.go index ac6f7df..b87dd23 100644 --- a/gen/iwfidl/model_workflow_reset_request.go +++ b/gen/iwfidl/model_workflow_reset_request.go @@ -28,6 +28,7 @@ type WorkflowResetRequest struct { StateId *string `json:"stateId,omitempty"` StateExecutionId *string `json:"stateExecutionId,omitempty"` SkipSignalReapply *bool `json:"skipSignalReapply,omitempty"` + SkipUpdateReapply *bool `json:"skipUpdateReapply,omitempty"` } // NewWorkflowResetRequest instantiates a new WorkflowResetRequest object @@ -321,6 +322,38 @@ func (o *WorkflowResetRequest) SetSkipSignalReapply(v bool) { o.SkipSignalReapply = &v } +// GetSkipUpdateReapply returns the SkipUpdateReapply field value if set, zero value otherwise. +func (o *WorkflowResetRequest) GetSkipUpdateReapply() bool { + if o == nil || IsNil(o.SkipUpdateReapply) { + var ret bool + return ret + } + return *o.SkipUpdateReapply +} + +// GetSkipUpdateReapplyOk returns a tuple with the SkipUpdateReapply field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowResetRequest) GetSkipUpdateReapplyOk() (*bool, bool) { + if o == nil || IsNil(o.SkipUpdateReapply) { + return nil, false + } + return o.SkipUpdateReapply, true +} + +// HasSkipUpdateReapply returns a boolean if a field has been set. +func (o *WorkflowResetRequest) HasSkipUpdateReapply() bool { + if o != nil && !IsNil(o.SkipUpdateReapply) { + return true + } + + return false +} + +// SetSkipUpdateReapply gets a reference to the given bool and assigns it to the SkipUpdateReapply field. +func (o *WorkflowResetRequest) SetSkipUpdateReapply(v bool) { + o.SkipUpdateReapply = &v +} + func (o WorkflowResetRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -354,6 +387,9 @@ func (o WorkflowResetRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.SkipSignalReapply) { toSerialize["skipSignalReapply"] = o.SkipSignalReapply } + if !IsNil(o.SkipUpdateReapply) { + toSerialize["skipUpdateReapply"] = o.SkipUpdateReapply + } return toSerialize, nil } diff --git a/gen/iwfidl/model_workflow_set_data_objects_request.go b/gen/iwfidl/model_workflow_set_data_objects_request.go new file mode 100644 index 0000000..febc7c9 --- /dev/null +++ b/gen/iwfidl/model_workflow_set_data_objects_request.go @@ -0,0 +1,187 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" +) + +// checks if the WorkflowSetDataObjectsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowSetDataObjectsRequest{} + +// WorkflowSetDataObjectsRequest struct for WorkflowSetDataObjectsRequest +type WorkflowSetDataObjectsRequest struct { + WorkflowId string `json:"workflowId"` + WorkflowRunId *string `json:"workflowRunId,omitempty"` + Objects []KeyValue `json:"objects,omitempty"` +} + +// NewWorkflowSetDataObjectsRequest instantiates a new WorkflowSetDataObjectsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowSetDataObjectsRequest(workflowId string) *WorkflowSetDataObjectsRequest { + this := WorkflowSetDataObjectsRequest{} + this.WorkflowId = workflowId + return &this +} + +// NewWorkflowSetDataObjectsRequestWithDefaults instantiates a new WorkflowSetDataObjectsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowSetDataObjectsRequestWithDefaults() *WorkflowSetDataObjectsRequest { + this := WorkflowSetDataObjectsRequest{} + return &this +} + +// GetWorkflowId returns the WorkflowId field value +func (o *WorkflowSetDataObjectsRequest) GetWorkflowId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkflowId +} + +// GetWorkflowIdOk returns a tuple with the WorkflowId field value +// and a boolean to check if the value has been set. +func (o *WorkflowSetDataObjectsRequest) GetWorkflowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkflowId, true +} + +// SetWorkflowId sets field value +func (o *WorkflowSetDataObjectsRequest) SetWorkflowId(v string) { + o.WorkflowId = v +} + +// GetWorkflowRunId returns the WorkflowRunId field value if set, zero value otherwise. +func (o *WorkflowSetDataObjectsRequest) GetWorkflowRunId() string { + if o == nil || IsNil(o.WorkflowRunId) { + var ret string + return ret + } + return *o.WorkflowRunId +} + +// GetWorkflowRunIdOk returns a tuple with the WorkflowRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowSetDataObjectsRequest) GetWorkflowRunIdOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowRunId) { + return nil, false + } + return o.WorkflowRunId, true +} + +// HasWorkflowRunId returns a boolean if a field has been set. +func (o *WorkflowSetDataObjectsRequest) HasWorkflowRunId() bool { + if o != nil && !IsNil(o.WorkflowRunId) { + return true + } + + return false +} + +// SetWorkflowRunId gets a reference to the given string and assigns it to the WorkflowRunId field. +func (o *WorkflowSetDataObjectsRequest) SetWorkflowRunId(v string) { + o.WorkflowRunId = &v +} + +// GetObjects returns the Objects field value if set, zero value otherwise. +func (o *WorkflowSetDataObjectsRequest) GetObjects() []KeyValue { + if o == nil || IsNil(o.Objects) { + var ret []KeyValue + return ret + } + return o.Objects +} + +// GetObjectsOk returns a tuple with the Objects field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowSetDataObjectsRequest) GetObjectsOk() ([]KeyValue, bool) { + if o == nil || IsNil(o.Objects) { + return nil, false + } + return o.Objects, true +} + +// HasObjects returns a boolean if a field has been set. +func (o *WorkflowSetDataObjectsRequest) HasObjects() bool { + if o != nil && !IsNil(o.Objects) { + return true + } + + return false +} + +// SetObjects gets a reference to the given []KeyValue and assigns it to the Objects field. +func (o *WorkflowSetDataObjectsRequest) SetObjects(v []KeyValue) { + o.Objects = v +} + +func (o WorkflowSetDataObjectsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowSetDataObjectsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workflowId"] = o.WorkflowId + if !IsNil(o.WorkflowRunId) { + toSerialize["workflowRunId"] = o.WorkflowRunId + } + if !IsNil(o.Objects) { + toSerialize["objects"] = o.Objects + } + return toSerialize, nil +} + +type NullableWorkflowSetDataObjectsRequest struct { + value *WorkflowSetDataObjectsRequest + isSet bool +} + +func (v NullableWorkflowSetDataObjectsRequest) Get() *WorkflowSetDataObjectsRequest { + return v.value +} + +func (v *NullableWorkflowSetDataObjectsRequest) Set(val *WorkflowSetDataObjectsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowSetDataObjectsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowSetDataObjectsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowSetDataObjectsRequest(val *WorkflowSetDataObjectsRequest) *NullableWorkflowSetDataObjectsRequest { + return &NullableWorkflowSetDataObjectsRequest{value: val, isSet: true} +} + +func (v NullableWorkflowSetDataObjectsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowSetDataObjectsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/iwfidl/model_workflow_set_search_attributes_request.go b/gen/iwfidl/model_workflow_set_search_attributes_request.go new file mode 100644 index 0000000..d17f0a1 --- /dev/null +++ b/gen/iwfidl/model_workflow_set_search_attributes_request.go @@ -0,0 +1,187 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" +) + +// checks if the WorkflowSetSearchAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowSetSearchAttributesRequest{} + +// WorkflowSetSearchAttributesRequest struct for WorkflowSetSearchAttributesRequest +type WorkflowSetSearchAttributesRequest struct { + WorkflowId string `json:"workflowId"` + WorkflowRunId *string `json:"workflowRunId,omitempty"` + SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` +} + +// NewWorkflowSetSearchAttributesRequest instantiates a new WorkflowSetSearchAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowSetSearchAttributesRequest(workflowId string) *WorkflowSetSearchAttributesRequest { + this := WorkflowSetSearchAttributesRequest{} + this.WorkflowId = workflowId + return &this +} + +// NewWorkflowSetSearchAttributesRequestWithDefaults instantiates a new WorkflowSetSearchAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowSetSearchAttributesRequestWithDefaults() *WorkflowSetSearchAttributesRequest { + this := WorkflowSetSearchAttributesRequest{} + return &this +} + +// GetWorkflowId returns the WorkflowId field value +func (o *WorkflowSetSearchAttributesRequest) GetWorkflowId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkflowId +} + +// GetWorkflowIdOk returns a tuple with the WorkflowId field value +// and a boolean to check if the value has been set. +func (o *WorkflowSetSearchAttributesRequest) GetWorkflowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkflowId, true +} + +// SetWorkflowId sets field value +func (o *WorkflowSetSearchAttributesRequest) SetWorkflowId(v string) { + o.WorkflowId = v +} + +// GetWorkflowRunId returns the WorkflowRunId field value if set, zero value otherwise. +func (o *WorkflowSetSearchAttributesRequest) GetWorkflowRunId() string { + if o == nil || IsNil(o.WorkflowRunId) { + var ret string + return ret + } + return *o.WorkflowRunId +} + +// GetWorkflowRunIdOk returns a tuple with the WorkflowRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowSetSearchAttributesRequest) GetWorkflowRunIdOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowRunId) { + return nil, false + } + return o.WorkflowRunId, true +} + +// HasWorkflowRunId returns a boolean if a field has been set. +func (o *WorkflowSetSearchAttributesRequest) HasWorkflowRunId() bool { + if o != nil && !IsNil(o.WorkflowRunId) { + return true + } + + return false +} + +// SetWorkflowRunId gets a reference to the given string and assigns it to the WorkflowRunId field. +func (o *WorkflowSetSearchAttributesRequest) SetWorkflowRunId(v string) { + o.WorkflowRunId = &v +} + +// GetSearchAttributes returns the SearchAttributes field value if set, zero value otherwise. +func (o *WorkflowSetSearchAttributesRequest) GetSearchAttributes() []SearchAttribute { + if o == nil || IsNil(o.SearchAttributes) { + var ret []SearchAttribute + return ret + } + return o.SearchAttributes +} + +// GetSearchAttributesOk returns a tuple with the SearchAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowSetSearchAttributesRequest) GetSearchAttributesOk() ([]SearchAttribute, bool) { + if o == nil || IsNil(o.SearchAttributes) { + return nil, false + } + return o.SearchAttributes, true +} + +// HasSearchAttributes returns a boolean if a field has been set. +func (o *WorkflowSetSearchAttributesRequest) HasSearchAttributes() bool { + if o != nil && !IsNil(o.SearchAttributes) { + return true + } + + return false +} + +// SetSearchAttributes gets a reference to the given []SearchAttribute and assigns it to the SearchAttributes field. +func (o *WorkflowSetSearchAttributesRequest) SetSearchAttributes(v []SearchAttribute) { + o.SearchAttributes = v +} + +func (o WorkflowSetSearchAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowSetSearchAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workflowId"] = o.WorkflowId + if !IsNil(o.WorkflowRunId) { + toSerialize["workflowRunId"] = o.WorkflowRunId + } + if !IsNil(o.SearchAttributes) { + toSerialize["searchAttributes"] = o.SearchAttributes + } + return toSerialize, nil +} + +type NullableWorkflowSetSearchAttributesRequest struct { + value *WorkflowSetSearchAttributesRequest + isSet bool +} + +func (v NullableWorkflowSetSearchAttributesRequest) Get() *WorkflowSetSearchAttributesRequest { + return v.value +} + +func (v *NullableWorkflowSetSearchAttributesRequest) Set(val *WorkflowSetSearchAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowSetSearchAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowSetSearchAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowSetSearchAttributesRequest(val *WorkflowSetSearchAttributesRequest) *NullableWorkflowSetSearchAttributesRequest { + return &NullableWorkflowSetSearchAttributesRequest{value: val, isSet: true} +} + +func (v NullableWorkflowSetSearchAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowSetSearchAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/iwfidl/model_workflow_start_options.go b/gen/iwfidl/model_workflow_start_options.go index edb5506..3c103e6 100644 --- a/gen/iwfidl/model_workflow_start_options.go +++ b/gen/iwfidl/model_workflow_start_options.go @@ -19,14 +19,15 @@ var _ MappedNullable = &WorkflowStartOptions{} // WorkflowStartOptions struct for WorkflowStartOptions type WorkflowStartOptions struct { - IdReusePolicy *IDReusePolicy `json:"idReusePolicy,omitempty"` - CronSchedule *string `json:"cronSchedule,omitempty"` - WorkflowStartDelaySeconds *int32 `json:"workflowStartDelaySeconds,omitempty"` - RetryPolicy *WorkflowRetryPolicy `json:"retryPolicy,omitempty"` - SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` - DataAttributes []KeyValue `json:"dataAttributes,omitempty"` - WorkflowConfigOverride *WorkflowConfig `json:"workflowConfigOverride,omitempty"` - UseMemoForDataAttributes *bool `json:"useMemoForDataAttributes,omitempty"` + IdReusePolicy *IDReusePolicy `json:"idReusePolicy,omitempty"` + CronSchedule *string `json:"cronSchedule,omitempty"` + WorkflowStartDelaySeconds *int32 `json:"workflowStartDelaySeconds,omitempty"` + RetryPolicy *WorkflowRetryPolicy `json:"retryPolicy,omitempty"` + SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` + DataAttributes []KeyValue `json:"dataAttributes,omitempty"` + WorkflowConfigOverride *WorkflowConfig `json:"workflowConfigOverride,omitempty"` + UseMemoForDataAttributes *bool `json:"useMemoForDataAttributes,omitempty"` + WorkflowAlreadyStartedOptions *WorkflowAlreadyStartedOptions `json:"workflowAlreadyStartedOptions,omitempty"` } // NewWorkflowStartOptions instantiates a new WorkflowStartOptions object @@ -302,6 +303,38 @@ func (o *WorkflowStartOptions) SetUseMemoForDataAttributes(v bool) { o.UseMemoForDataAttributes = &v } +// GetWorkflowAlreadyStartedOptions returns the WorkflowAlreadyStartedOptions field value if set, zero value otherwise. +func (o *WorkflowStartOptions) GetWorkflowAlreadyStartedOptions() WorkflowAlreadyStartedOptions { + if o == nil || IsNil(o.WorkflowAlreadyStartedOptions) { + var ret WorkflowAlreadyStartedOptions + return ret + } + return *o.WorkflowAlreadyStartedOptions +} + +// GetWorkflowAlreadyStartedOptionsOk returns a tuple with the WorkflowAlreadyStartedOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowStartOptions) GetWorkflowAlreadyStartedOptionsOk() (*WorkflowAlreadyStartedOptions, bool) { + if o == nil || IsNil(o.WorkflowAlreadyStartedOptions) { + return nil, false + } + return o.WorkflowAlreadyStartedOptions, true +} + +// HasWorkflowAlreadyStartedOptions returns a boolean if a field has been set. +func (o *WorkflowStartOptions) HasWorkflowAlreadyStartedOptions() bool { + if o != nil && !IsNil(o.WorkflowAlreadyStartedOptions) { + return true + } + + return false +} + +// SetWorkflowAlreadyStartedOptions gets a reference to the given WorkflowAlreadyStartedOptions and assigns it to the WorkflowAlreadyStartedOptions field. +func (o *WorkflowStartOptions) SetWorkflowAlreadyStartedOptions(v WorkflowAlreadyStartedOptions) { + o.WorkflowAlreadyStartedOptions = &v +} + func (o WorkflowStartOptions) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -336,6 +369,9 @@ func (o WorkflowStartOptions) ToMap() (map[string]interface{}, error) { if !IsNil(o.UseMemoForDataAttributes) { toSerialize["useMemoForDataAttributes"] = o.UseMemoForDataAttributes } + if !IsNil(o.WorkflowAlreadyStartedOptions) { + toSerialize["workflowAlreadyStartedOptions"] = o.WorkflowAlreadyStartedOptions + } return toSerialize, nil } diff --git a/gen/iwfidl/model_workflow_worker_rpc_request.go b/gen/iwfidl/model_workflow_worker_rpc_request.go index cf0ac60..e300397 100644 --- a/gen/iwfidl/model_workflow_worker_rpc_request.go +++ b/gen/iwfidl/model_workflow_worker_rpc_request.go @@ -19,12 +19,14 @@ var _ MappedNullable = &WorkflowWorkerRpcRequest{} // WorkflowWorkerRpcRequest struct for WorkflowWorkerRpcRequest type WorkflowWorkerRpcRequest struct { - Context Context `json:"context"` - WorkflowType string `json:"workflowType"` - RpcName string `json:"rpcName"` - Input *EncodedObject `json:"input,omitempty"` - SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` - DataAttributes []KeyValue `json:"dataAttributes,omitempty"` + Context Context `json:"context"` + WorkflowType string `json:"workflowType"` + RpcName string `json:"rpcName"` + Input *EncodedObject `json:"input,omitempty"` + SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` + DataAttributes []KeyValue `json:"dataAttributes,omitempty"` + SignalChannelInfos *map[string]ChannelInfo `json:"signalChannelInfos,omitempty"` + InternalChannelInfos *map[string]ChannelInfo `json:"internalChannelInfos,omitempty"` } // NewWorkflowWorkerRpcRequest instantiates a new WorkflowWorkerRpcRequest object @@ -215,6 +217,70 @@ func (o *WorkflowWorkerRpcRequest) SetDataAttributes(v []KeyValue) { o.DataAttributes = v } +// GetSignalChannelInfos returns the SignalChannelInfos field value if set, zero value otherwise. +func (o *WorkflowWorkerRpcRequest) GetSignalChannelInfos() map[string]ChannelInfo { + if o == nil || IsNil(o.SignalChannelInfos) { + var ret map[string]ChannelInfo + return ret + } + return *o.SignalChannelInfos +} + +// GetSignalChannelInfosOk returns a tuple with the SignalChannelInfos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowWorkerRpcRequest) GetSignalChannelInfosOk() (*map[string]ChannelInfo, bool) { + if o == nil || IsNil(o.SignalChannelInfos) { + return nil, false + } + return o.SignalChannelInfos, true +} + +// HasSignalChannelInfos returns a boolean if a field has been set. +func (o *WorkflowWorkerRpcRequest) HasSignalChannelInfos() bool { + if o != nil && !IsNil(o.SignalChannelInfos) { + return true + } + + return false +} + +// SetSignalChannelInfos gets a reference to the given map[string]ChannelInfo and assigns it to the SignalChannelInfos field. +func (o *WorkflowWorkerRpcRequest) SetSignalChannelInfos(v map[string]ChannelInfo) { + o.SignalChannelInfos = &v +} + +// GetInternalChannelInfos returns the InternalChannelInfos field value if set, zero value otherwise. +func (o *WorkflowWorkerRpcRequest) GetInternalChannelInfos() map[string]ChannelInfo { + if o == nil || IsNil(o.InternalChannelInfos) { + var ret map[string]ChannelInfo + return ret + } + return *o.InternalChannelInfos +} + +// GetInternalChannelInfosOk returns a tuple with the InternalChannelInfos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowWorkerRpcRequest) GetInternalChannelInfosOk() (*map[string]ChannelInfo, bool) { + if o == nil || IsNil(o.InternalChannelInfos) { + return nil, false + } + return o.InternalChannelInfos, true +} + +// HasInternalChannelInfos returns a boolean if a field has been set. +func (o *WorkflowWorkerRpcRequest) HasInternalChannelInfos() bool { + if o != nil && !IsNil(o.InternalChannelInfos) { + return true + } + + return false +} + +// SetInternalChannelInfos gets a reference to the given map[string]ChannelInfo and assigns it to the InternalChannelInfos field. +func (o *WorkflowWorkerRpcRequest) SetInternalChannelInfos(v map[string]ChannelInfo) { + o.InternalChannelInfos = &v +} + func (o WorkflowWorkerRpcRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -237,6 +303,12 @@ func (o WorkflowWorkerRpcRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.DataAttributes) { toSerialize["dataAttributes"] = o.DataAttributes } + if !IsNil(o.SignalChannelInfos) { + toSerialize["signalChannelInfos"] = o.SignalChannelInfos + } + if !IsNil(o.InternalChannelInfos) { + toSerialize["internalChannelInfos"] = o.InternalChannelInfos + } return toSerialize, nil } diff --git a/integ/abnormal_exit_test.go b/integ/abnormal_exit_test.go index d65885a..b75f24a 100644 --- a/integ/abnormal_exit_test.go +++ b/integ/abnormal_exit_test.go @@ -28,7 +28,7 @@ func TestAbnormalExitWorkflow(t *testing.T) { wErr, ok := iwf.AsWorkflowUncompletedError(err) assert.True(t, ok) assert.True(t, strings.Contains(*wErr.ErrorMessage, "abnormal exit state")) - assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE), wErr.ErrorMessage, wErr.StateResults, iwf.GetDefaultObjectEncoder()), wErr) + assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_ERROR_TYPE), wErr.ErrorMessage, wErr.StateResults, iwf.GetDefaultObjectEncoder()), wErr) // Starting a workflow with the same ID should be allowed since the previous failed abnormally _, err = client.StartWorkflow(context.Background(), &basicWorkflow{}, wfId, 10, 1, &opt) diff --git a/integ/workflow_uncompleted_test.go b/integ/workflow_uncompleted_test.go index 836cc0d..6917eb5 100644 --- a/integ/workflow_uncompleted_test.go +++ b/integ/workflow_uncompleted_test.go @@ -87,7 +87,7 @@ func TestStateApiFailWorkflow(t *testing.T) { wErr, ok := iwf.AsWorkflowUncompletedError(err) assert.True(t, ok) - assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE), wErr.ErrorMessage, nil, iwf.GetDefaultObjectEncoder()), wErr) + assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_ERROR_TYPE), wErr.ErrorMessage, nil, iwf.GetDefaultObjectEncoder()), wErr) assert.True(t, strings.Contains(*wErr.ErrorMessage, "test api failing"), "must contain api failing message") @@ -95,7 +95,7 @@ func TestStateApiFailWorkflow(t *testing.T) { assert.Nil(t, out) assert.Equal(t, err, err2) - assert.True(t, strings.Contains(err.Error(), "workflow is not completed successfully, closedStatus: FAILED, failedErrorType(applies if failed as closedStatus):STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE, error message:statusCode: 400, responseBody: {\"error\":\"error message:test api failing")) + assert.True(t, strings.Contains(err.Error(), "workflow is not completed successfully, closedStatus: FAILED, failedErrorType(applies if failed as closedStatus):STATE_API_FAIL_ERROR_TYPE, error message:statusCode: 400, responseBody: {\"error\":\"error message:test api failing")) } func TestStateApiTimeoutWorkflow(t *testing.T) { @@ -108,11 +108,11 @@ func TestStateApiTimeoutWorkflow(t *testing.T) { wErr, ok := iwf.AsWorkflowUncompletedError(err) assert.True(t, ok) - assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE), wErr.ErrorMessage, nil, iwf.GetDefaultObjectEncoder()), wErr) + assert.Equal(t, iwf.NewWorkflowUncompletedError(runId, iwfidl.FAILED, ptr.Any(iwfidl.STATE_API_FAIL_ERROR_TYPE), wErr.ErrorMessage, nil, iwf.GetDefaultObjectEncoder()), wErr) fmt.Println(err) - expectedMsg := "workflow is not completed successfully, closedStatus: FAILED, failedErrorType(applies if failed as closedStatus):STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE, error message:activity error " + expectedMsg := "workflow is not completed successfully, closedStatus: FAILED, failedErrorType(applies if failed as closedStatus):STATE_API_FAIL_ERROR_TYPE, error message:activity error " assert.True(t, strings.HasPrefix(err.Error(), expectedMsg)) out, err2 := client.GetComplexWorkflowResults(context.Background(), wfId, "") diff --git a/iwf-idl b/iwf-idl index d1da138..8e3930e 160000 --- a/iwf-idl +++ b/iwf-idl @@ -1 +1 @@ -Subproject commit d1da1384bca0c9317b916df3d6bbd3b848dc5150 +Subproject commit 8e3930e50c793a0455d7ca0babe079ec3921dd60