...

Source file src/google.golang.org/api/workflowexecutions/v1/workflowexecutions-gen.go

Documentation: google.golang.org/api/workflowexecutions/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package workflowexecutions provides access to the Workflow Executions API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/workflows
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/workflowexecutions/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	workflowexecutionsService, err := workflowexecutions.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package workflowexecutions // import "google.golang.org/api/workflowexecutions/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "workflowexecutions:v1"
    90  const apiName = "workflowexecutions"
    91  const apiVersion = "v1"
    92  const basePath = "https://workflowexecutions.googleapis.com/"
    93  const basePathTemplate = "https://workflowexecutions.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://workflowexecutions.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Workflows = NewProjectsLocationsWorkflowsService(s)
   172  	return rs
   173  }
   174  
   175  type ProjectsLocationsService struct {
   176  	s *Service
   177  
   178  	Workflows *ProjectsLocationsWorkflowsService
   179  }
   180  
   181  func NewProjectsLocationsWorkflowsService(s *Service) *ProjectsLocationsWorkflowsService {
   182  	rs := &ProjectsLocationsWorkflowsService{s: s}
   183  	rs.Executions = NewProjectsLocationsWorkflowsExecutionsService(s)
   184  	return rs
   185  }
   186  
   187  type ProjectsLocationsWorkflowsService struct {
   188  	s *Service
   189  
   190  	Executions *ProjectsLocationsWorkflowsExecutionsService
   191  }
   192  
   193  func NewProjectsLocationsWorkflowsExecutionsService(s *Service) *ProjectsLocationsWorkflowsExecutionsService {
   194  	rs := &ProjectsLocationsWorkflowsExecutionsService{s: s}
   195  	rs.Callbacks = NewProjectsLocationsWorkflowsExecutionsCallbacksService(s)
   196  	rs.StepEntries = NewProjectsLocationsWorkflowsExecutionsStepEntriesService(s)
   197  	return rs
   198  }
   199  
   200  type ProjectsLocationsWorkflowsExecutionsService struct {
   201  	s *Service
   202  
   203  	Callbacks *ProjectsLocationsWorkflowsExecutionsCallbacksService
   204  
   205  	StepEntries *ProjectsLocationsWorkflowsExecutionsStepEntriesService
   206  }
   207  
   208  func NewProjectsLocationsWorkflowsExecutionsCallbacksService(s *Service) *ProjectsLocationsWorkflowsExecutionsCallbacksService {
   209  	rs := &ProjectsLocationsWorkflowsExecutionsCallbacksService{s: s}
   210  	return rs
   211  }
   212  
   213  type ProjectsLocationsWorkflowsExecutionsCallbacksService struct {
   214  	s *Service
   215  }
   216  
   217  func NewProjectsLocationsWorkflowsExecutionsStepEntriesService(s *Service) *ProjectsLocationsWorkflowsExecutionsStepEntriesService {
   218  	rs := &ProjectsLocationsWorkflowsExecutionsStepEntriesService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsWorkflowsExecutionsStepEntriesService struct {
   223  	s *Service
   224  }
   225  
   226  // Callback: An instance of a Callback created by an execution.
   227  type Callback struct {
   228  	// AvailablePayloads: Output only. The payloads received by the callback that
   229  	// have not been processed by a waiting execution step.
   230  	AvailablePayloads []string `json:"availablePayloads,omitempty"`
   231  	// Method: Output only. The method accepted by the callback. For example: GET,
   232  	// POST, PUT.
   233  	Method string `json:"method,omitempty"`
   234  	// Name: Output only. The resource name of the callback. Format:
   235  	// projects/{project}/locations/{location}/workflows/{workflow}/executions/{exec
   236  	// ution}/callback/{callback}
   237  	Name string `json:"name,omitempty"`
   238  	// Waiters: Output only. Number of execution steps waiting on this callback.
   239  	Waiters int64 `json:"waiters,omitempty,string"`
   240  	// ForceSendFields is a list of field names (e.g. "AvailablePayloads") to
   241  	// unconditionally include in API requests. By default, fields with empty or
   242  	// default values are omitted from API requests. See
   243  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   244  	// details.
   245  	ForceSendFields []string `json:"-"`
   246  	// NullFields is a list of field names (e.g. "AvailablePayloads") to include in
   247  	// API requests with the JSON null value. By default, fields with empty values
   248  	// are omitted from API requests. See
   249  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   250  	NullFields []string `json:"-"`
   251  }
   252  
   253  func (s *Callback) MarshalJSON() ([]byte, error) {
   254  	type NoMethod Callback
   255  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   256  }
   257  
   258  // CancelExecutionRequest: Request for the CancelExecution method.
   259  type CancelExecutionRequest struct {
   260  }
   261  
   262  // Error: Error describes why the execution was abnormally terminated.
   263  type Error struct {
   264  	// Context: Human-readable stack trace string.
   265  	Context string `json:"context,omitempty"`
   266  	// Payload: Error message and data returned represented as a JSON string.
   267  	Payload string `json:"payload,omitempty"`
   268  	// StackTrace: Stack trace with detailed information of where error was
   269  	// generated.
   270  	StackTrace *StackTrace `json:"stackTrace,omitempty"`
   271  	// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
   272  	// include in API requests. By default, fields with empty or default values are
   273  	// omitted from API requests. See
   274  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   275  	// details.
   276  	ForceSendFields []string `json:"-"`
   277  	// NullFields is a list of field names (e.g. "Context") to include in API
   278  	// requests with the JSON null value. By default, fields with empty values are
   279  	// omitted from API requests. See
   280  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   281  	NullFields []string `json:"-"`
   282  }
   283  
   284  func (s *Error) MarshalJSON() ([]byte, error) {
   285  	type NoMethod Error
   286  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   287  }
   288  
   289  // Exception: Exception describes why the step entry failed.
   290  type Exception struct {
   291  	// Payload: Error message represented as a JSON string.
   292  	Payload string `json:"payload,omitempty"`
   293  	// ForceSendFields is a list of field names (e.g. "Payload") to unconditionally
   294  	// include in API requests. By default, fields with empty or default values are
   295  	// omitted from API requests. See
   296  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   297  	// details.
   298  	ForceSendFields []string `json:"-"`
   299  	// NullFields is a list of field names (e.g. "Payload") to include in API
   300  	// requests with the JSON null value. By default, fields with empty values are
   301  	// omitted from API requests. See
   302  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   303  	NullFields []string `json:"-"`
   304  }
   305  
   306  func (s *Exception) MarshalJSON() ([]byte, error) {
   307  	type NoMethod Exception
   308  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   309  }
   310  
   311  // Execution: A running instance of a Workflow
   312  // (/workflows/docs/reference/rest/v1/projects.locations.workflows).
   313  type Execution struct {
   314  	// Argument: Input parameters of the execution represented as a JSON string.
   315  	// The size limit is 32KB. *Note*: If you are using the REST API directly to
   316  	// run your workflow, you must escape any JSON string value of `argument`.
   317  	// Example: `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'`
   318  	Argument string `json:"argument,omitempty"`
   319  	// CallLogLevel: The call logging level associated to this execution.
   320  	//
   321  	// Possible values:
   322  	//   "CALL_LOG_LEVEL_UNSPECIFIED" - No call logging level specified.
   323  	//   "LOG_ALL_CALLS" - Log all call steps within workflows, all call returns,
   324  	// and all exceptions raised.
   325  	//   "LOG_ERRORS_ONLY" - Log only exceptions that are raised from call steps
   326  	// within workflows.
   327  	//   "LOG_NONE" - Explicitly log nothing.
   328  	CallLogLevel string `json:"callLogLevel,omitempty"`
   329  	// CreateTime: Output only. Marks the creation of the execution.
   330  	CreateTime string `json:"createTime,omitempty"`
   331  	// DisableConcurrencyQuotaOverflowBuffering: Optional. If set to true, the
   332  	// execution will not be backlogged when the concurrency quota is exhausted.
   333  	// The backlog execution starts when the concurrency quota becomes available.
   334  	DisableConcurrencyQuotaOverflowBuffering bool `json:"disableConcurrencyQuotaOverflowBuffering,omitempty"`
   335  	// Duration: Output only. Measures the duration of the execution.
   336  	Duration string `json:"duration,omitempty"`
   337  	// EndTime: Output only. Marks the end of execution, successful or not.
   338  	EndTime string `json:"endTime,omitempty"`
   339  	// Error: Output only. The error which caused the execution to finish
   340  	// prematurely. The value is only present if the execution's state is `FAILED`
   341  	// or `CANCELLED`.
   342  	Error *Error `json:"error,omitempty"`
   343  	// Labels: Labels associated with this execution. Labels can contain at most 64
   344  	// entries. Keys and values can be no longer than 63 characters and can only
   345  	// contain lowercase letters, numeric characters, underscores, and dashes.
   346  	// Label keys must start with a letter. International characters are allowed.
   347  	// By default, labels are inherited from the workflow but are overridden by any
   348  	// labels associated with the execution.
   349  	Labels map[string]string `json:"labels,omitempty"`
   350  	// Name: Output only. The resource name of the execution. Format:
   351  	// projects/{project}/locations/{location}/workflows/{workflow}/executions/{exec
   352  	// ution}
   353  	Name string `json:"name,omitempty"`
   354  	// Result: Output only. Output of the execution represented as a JSON string.
   355  	// The value can only be present if the execution's state is `SUCCEEDED`.
   356  	Result string `json:"result,omitempty"`
   357  	// StartTime: Output only. Marks the beginning of execution.
   358  	StartTime string `json:"startTime,omitempty"`
   359  	// State: Output only. Current state of the execution.
   360  	//
   361  	// Possible values:
   362  	//   "STATE_UNSPECIFIED" - Invalid state.
   363  	//   "ACTIVE" - The execution is in progress.
   364  	//   "SUCCEEDED" - The execution finished successfully.
   365  	//   "FAILED" - The execution failed with an error.
   366  	//   "CANCELLED" - The execution was stopped intentionally.
   367  	//   "UNAVAILABLE" - Execution data is unavailable. See the `state_error`
   368  	// field.
   369  	//   "QUEUED" - Request has been placed in the backlog for processing at a
   370  	// later time.
   371  	State string `json:"state,omitempty"`
   372  	// StateError: Output only. Error regarding the state of the Execution
   373  	// resource. For example, this field will have error details if the execution
   374  	// data is unavailable due to revoked KMS key permissions.
   375  	StateError *StateError `json:"stateError,omitempty"`
   376  	// Status: Output only. Status tracks the current steps and progress data of
   377  	// this execution.
   378  	Status *Status `json:"status,omitempty"`
   379  	// WorkflowRevisionId: Output only. Revision of the workflow this execution is
   380  	// using.
   381  	WorkflowRevisionId string `json:"workflowRevisionId,omitempty"`
   382  
   383  	// ServerResponse contains the HTTP response code and headers from the server.
   384  	googleapi.ServerResponse `json:"-"`
   385  	// ForceSendFields is a list of field names (e.g. "Argument") to
   386  	// unconditionally include in API requests. By default, fields with empty or
   387  	// default values are omitted from API requests. See
   388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   389  	// details.
   390  	ForceSendFields []string `json:"-"`
   391  	// NullFields is a list of field names (e.g. "Argument") to include in API
   392  	// requests with the JSON null value. By default, fields with empty values are
   393  	// omitted from API requests. See
   394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   395  	NullFields []string `json:"-"`
   396  }
   397  
   398  func (s *Execution) MarshalJSON() ([]byte, error) {
   399  	type NoMethod Execution
   400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   401  }
   402  
   403  // ExportDataResponse: Response for the ExportData method.
   404  type ExportDataResponse struct {
   405  	// Data: The JSON string with customer data and metadata for an execution with
   406  	// the given name
   407  	Data string `json:"data,omitempty"`
   408  
   409  	// ServerResponse contains the HTTP response code and headers from the server.
   410  	googleapi.ServerResponse `json:"-"`
   411  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
   412  	// include in API requests. By default, fields with empty or default values are
   413  	// omitted from API requests. See
   414  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   415  	// details.
   416  	ForceSendFields []string `json:"-"`
   417  	// NullFields is a list of field names (e.g. "Data") to include in API requests
   418  	// with the JSON null value. By default, fields with empty values are omitted
   419  	// from API requests. See
   420  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   421  	NullFields []string `json:"-"`
   422  }
   423  
   424  func (s *ExportDataResponse) MarshalJSON() ([]byte, error) {
   425  	type NoMethod ExportDataResponse
   426  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   427  }
   428  
   429  // ListCallbacksResponse: RPC response object for the ListCallbacks method.
   430  type ListCallbacksResponse struct {
   431  	// Callbacks: The callbacks which match the request.
   432  	Callbacks []*Callback `json:"callbacks,omitempty"`
   433  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   434  	// next page. If this field is omitted, there are no subsequent pages.
   435  	NextPageToken string `json:"nextPageToken,omitempty"`
   436  
   437  	// ServerResponse contains the HTTP response code and headers from the server.
   438  	googleapi.ServerResponse `json:"-"`
   439  	// ForceSendFields is a list of field names (e.g. "Callbacks") to
   440  	// unconditionally include in API requests. By default, fields with empty or
   441  	// default values are omitted from API requests. See
   442  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   443  	// details.
   444  	ForceSendFields []string `json:"-"`
   445  	// NullFields is a list of field names (e.g. "Callbacks") to include in API
   446  	// requests with the JSON null value. By default, fields with empty values are
   447  	// omitted from API requests. See
   448  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   449  	NullFields []string `json:"-"`
   450  }
   451  
   452  func (s *ListCallbacksResponse) MarshalJSON() ([]byte, error) {
   453  	type NoMethod ListCallbacksResponse
   454  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   455  }
   456  
   457  // ListExecutionsResponse: Response for the ListExecutions method.
   458  type ListExecutionsResponse struct {
   459  	// Executions: The executions which match the request.
   460  	Executions []*Execution `json:"executions,omitempty"`
   461  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   462  	// next page. If this field is omitted, there are no subsequent pages.
   463  	NextPageToken string `json:"nextPageToken,omitempty"`
   464  
   465  	// ServerResponse contains the HTTP response code and headers from the server.
   466  	googleapi.ServerResponse `json:"-"`
   467  	// ForceSendFields is a list of field names (e.g. "Executions") to
   468  	// unconditionally include in API requests. By default, fields with empty or
   469  	// default values are omitted from API requests. See
   470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   471  	// details.
   472  	ForceSendFields []string `json:"-"`
   473  	// NullFields is a list of field names (e.g. "Executions") to include in API
   474  	// requests with the JSON null value. By default, fields with empty values are
   475  	// omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   477  	NullFields []string `json:"-"`
   478  }
   479  
   480  func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
   481  	type NoMethod ListExecutionsResponse
   482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   483  }
   484  
   485  // ListStepEntriesResponse: Response message for
   486  // ExecutionHistory.ListStepEntries.
   487  type ListStepEntriesResponse struct {
   488  	// NextPageToken: A token to retrieve next page of results. Pass this value in
   489  	// the ListStepEntriesRequest.page_token field in the subsequent call to
   490  	// `ListStepEntries` method to retrieve the next page of results.
   491  	NextPageToken string `json:"nextPageToken,omitempty"`
   492  	// StepEntries: The list of entries.
   493  	StepEntries []*StepEntry `json:"stepEntries,omitempty"`
   494  	// TotalSize: Indicates the total number of StepEntries that matched the
   495  	// request filter. For running executions, this number shows the number of
   496  	// StepEntries that are executed thus far.
   497  	TotalSize int64 `json:"totalSize,omitempty"`
   498  
   499  	// ServerResponse contains the HTTP response code and headers from the server.
   500  	googleapi.ServerResponse `json:"-"`
   501  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   502  	// unconditionally include in API requests. By default, fields with empty or
   503  	// default values are omitted from API requests. See
   504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   505  	// details.
   506  	ForceSendFields []string `json:"-"`
   507  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   508  	// requests with the JSON null value. By default, fields with empty values are
   509  	// omitted from API requests. See
   510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   511  	NullFields []string `json:"-"`
   512  }
   513  
   514  func (s *ListStepEntriesResponse) MarshalJSON() ([]byte, error) {
   515  	type NoMethod ListStepEntriesResponse
   516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   517  }
   518  
   519  // NavigationInfo: NavigationInfo describes what steps if any come before or
   520  // after this step, or what steps are parents or children of this step.
   521  type NavigationInfo struct {
   522  	// Children: Step entries that can be reached by "stepping into" e.g. a
   523  	// subworkflow call.
   524  	Children googleapi.Int64s `json:"children,omitempty"`
   525  	// Next: The index of the next step in the current workflow, if any.
   526  	Next int64 `json:"next,omitempty,string"`
   527  	// Parent: The step entry, if any, that can be reached by "stepping out" of the
   528  	// current workflow being executed.
   529  	Parent int64 `json:"parent,omitempty,string"`
   530  	// Previous: The index of the previous step in the current workflow, if any.
   531  	Previous int64 `json:"previous,omitempty,string"`
   532  	// ForceSendFields is a list of field names (e.g. "Children") to
   533  	// unconditionally include in API requests. By default, fields with empty or
   534  	// default values are omitted from API requests. See
   535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   536  	// details.
   537  	ForceSendFields []string `json:"-"`
   538  	// NullFields is a list of field names (e.g. "Children") to include in API
   539  	// requests with the JSON null value. By default, fields with empty values are
   540  	// omitted from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   542  	NullFields []string `json:"-"`
   543  }
   544  
   545  func (s *NavigationInfo) MarshalJSON() ([]byte, error) {
   546  	type NoMethod NavigationInfo
   547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   548  }
   549  
   550  // Position: Position contains source position information about the stack
   551  // trace element such as line number, column number and length of the code
   552  // block in bytes.
   553  type Position struct {
   554  	// Column: The source code column position (of the line) the current
   555  	// instruction was generated from.
   556  	Column int64 `json:"column,omitempty,string"`
   557  	// Length: The number of bytes of source code making up this stack trace
   558  	// element.
   559  	Length int64 `json:"length,omitempty,string"`
   560  	// Line: The source code line number the current instruction was generated
   561  	// from.
   562  	Line int64 `json:"line,omitempty,string"`
   563  	// ForceSendFields is a list of field names (e.g. "Column") to unconditionally
   564  	// include in API requests. By default, fields with empty or default values are
   565  	// omitted from API requests. See
   566  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   567  	// details.
   568  	ForceSendFields []string `json:"-"`
   569  	// NullFields is a list of field names (e.g. "Column") to include in API
   570  	// requests with the JSON null value. By default, fields with empty values are
   571  	// omitted from API requests. See
   572  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   573  	NullFields []string `json:"-"`
   574  }
   575  
   576  func (s *Position) MarshalJSON() ([]byte, error) {
   577  	type NoMethod Position
   578  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   579  }
   580  
   581  // PubsubMessage: A message that is published by publishers and consumed by
   582  // subscribers. The message must contain either a non-empty data field or at
   583  // least one attribute. Note that client libraries represent this object
   584  // differently depending on the language. See the corresponding client library
   585  // documentation (https://cloud.google.com/pubsub/docs/reference/libraries) for
   586  // more information. See [quotas and limits]
   587  // (https://cloud.google.com/pubsub/quotas) for more information about message
   588  // limits.
   589  type PubsubMessage struct {
   590  	// Attributes: Optional. Attributes for this message. If this field is empty,
   591  	// the message must contain non-empty data. This can be used to filter messages
   592  	// on the subscription.
   593  	Attributes map[string]string `json:"attributes,omitempty"`
   594  	// Data: Optional. The message data field. If this field is empty, the message
   595  	// must contain at least one attribute.
   596  	Data string `json:"data,omitempty"`
   597  	// MessageId: ID of this message, assigned by the server when the message is
   598  	// published. Guaranteed to be unique within the topic. This value may be read
   599  	// by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push
   600  	// delivery. It must not be populated by the publisher in a `Publish` call.
   601  	MessageId string `json:"messageId,omitempty"`
   602  	// OrderingKey: Optional. If non-empty, identifies related messages for which
   603  	// publish order should be respected. If a `Subscription` has
   604  	// `enable_message_ordering` set to `true`, messages published with the same
   605  	// non-empty `ordering_key` value will be delivered to subscribers in the order
   606  	// in which they are received by the Pub/Sub system. All `PubsubMessage`s
   607  	// published in a given `PublishRequest` must specify the same `ordering_key`
   608  	// value. For more information, see ordering messages
   609  	// (https://cloud.google.com/pubsub/docs/ordering).
   610  	OrderingKey string `json:"orderingKey,omitempty"`
   611  	// PublishTime: The time at which the message was published, populated by the
   612  	// server when it receives the `Publish` call. It must not be populated by the
   613  	// publisher in a `Publish` call.
   614  	PublishTime string `json:"publishTime,omitempty"`
   615  	// ForceSendFields is a list of field names (e.g. "Attributes") to
   616  	// unconditionally include in API requests. By default, fields with empty or
   617  	// default values are omitted from API requests. See
   618  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   619  	// details.
   620  	ForceSendFields []string `json:"-"`
   621  	// NullFields is a list of field names (e.g. "Attributes") to include in API
   622  	// requests with the JSON null value. By default, fields with empty values are
   623  	// omitted from API requests. See
   624  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   625  	NullFields []string `json:"-"`
   626  }
   627  
   628  func (s *PubsubMessage) MarshalJSON() ([]byte, error) {
   629  	type NoMethod PubsubMessage
   630  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   631  }
   632  
   633  // StackTrace: A collection of stack elements (frames) where an error occurred.
   634  type StackTrace struct {
   635  	// Elements: An array of stack elements.
   636  	Elements []*StackTraceElement `json:"elements,omitempty"`
   637  	// ForceSendFields is a list of field names (e.g. "Elements") to
   638  	// unconditionally include in API requests. By default, fields with empty or
   639  	// default values are omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   641  	// details.
   642  	ForceSendFields []string `json:"-"`
   643  	// NullFields is a list of field names (e.g. "Elements") to include in API
   644  	// requests with the JSON null value. By default, fields with empty values are
   645  	// omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   647  	NullFields []string `json:"-"`
   648  }
   649  
   650  func (s *StackTrace) MarshalJSON() ([]byte, error) {
   651  	type NoMethod StackTrace
   652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   653  }
   654  
   655  // StackTraceElement: A single stack element (frame) where an error occurred.
   656  type StackTraceElement struct {
   657  	// Position: The source position information of the stack trace element.
   658  	Position *Position `json:"position,omitempty"`
   659  	// Routine: The routine where the error occurred.
   660  	Routine string `json:"routine,omitempty"`
   661  	// Step: The step the error occurred at.
   662  	Step string `json:"step,omitempty"`
   663  	// ForceSendFields is a list of field names (e.g. "Position") to
   664  	// unconditionally include in API requests. By default, fields with empty or
   665  	// default values are omitted from API requests. See
   666  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   667  	// details.
   668  	ForceSendFields []string `json:"-"`
   669  	// NullFields is a list of field names (e.g. "Position") to include in API
   670  	// requests with the JSON null value. By default, fields with empty values are
   671  	// omitted from API requests. See
   672  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   673  	NullFields []string `json:"-"`
   674  }
   675  
   676  func (s *StackTraceElement) MarshalJSON() ([]byte, error) {
   677  	type NoMethod StackTraceElement
   678  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   679  }
   680  
   681  // StateError: Describes an error related to the current state of the Execution
   682  // resource.
   683  type StateError struct {
   684  	// Details: Provides specifics about the error.
   685  	Details string `json:"details,omitempty"`
   686  	// Type: The type of this state error.
   687  	//
   688  	// Possible values:
   689  	//   "TYPE_UNSPECIFIED" - No type specified.
   690  	//   "KMS_ERROR" - Caused by an issue with KMS.
   691  	Type string `json:"type,omitempty"`
   692  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
   693  	// include in API requests. By default, fields with empty or default values are
   694  	// omitted from API requests. See
   695  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   696  	// details.
   697  	ForceSendFields []string `json:"-"`
   698  	// NullFields is a list of field names (e.g. "Details") to include in API
   699  	// requests with the JSON null value. By default, fields with empty values are
   700  	// omitted from API requests. See
   701  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   702  	NullFields []string `json:"-"`
   703  }
   704  
   705  func (s *StateError) MarshalJSON() ([]byte, error) {
   706  	type NoMethod StateError
   707  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   708  }
   709  
   710  // Status: Represents the current status of this execution.
   711  type Status struct {
   712  	// CurrentSteps: A list of currently executing or last executed step names for
   713  	// the workflow execution currently running. If the workflow has succeeded or
   714  	// failed, this is the last attempted or executed step. Presently, if the
   715  	// current step is inside a subworkflow, the list only includes that step. In
   716  	// the future, the list will contain items for each step in the call stack,
   717  	// starting with the outermost step in the `main` subworkflow, and ending with
   718  	// the most deeply nested step.
   719  	CurrentSteps []*Step `json:"currentSteps,omitempty"`
   720  	// ForceSendFields is a list of field names (e.g. "CurrentSteps") to
   721  	// unconditionally include in API requests. By default, fields with empty or
   722  	// default values are omitted from API requests. See
   723  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   724  	// details.
   725  	ForceSendFields []string `json:"-"`
   726  	// NullFields is a list of field names (e.g. "CurrentSteps") to include in API
   727  	// requests with the JSON null value. By default, fields with empty values are
   728  	// omitted from API requests. See
   729  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   730  	NullFields []string `json:"-"`
   731  }
   732  
   733  func (s *Status) MarshalJSON() ([]byte, error) {
   734  	type NoMethod Status
   735  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   736  }
   737  
   738  // Step: Represents a step of the workflow this execution is running.
   739  type Step struct {
   740  	// Routine: Name of a routine within the workflow.
   741  	Routine string `json:"routine,omitempty"`
   742  	// Step: Name of a step within the routine.
   743  	Step string `json:"step,omitempty"`
   744  	// ForceSendFields is a list of field names (e.g. "Routine") to unconditionally
   745  	// include in API requests. By default, fields with empty or default values are
   746  	// omitted from API requests. See
   747  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   748  	// details.
   749  	ForceSendFields []string `json:"-"`
   750  	// NullFields is a list of field names (e.g. "Routine") to include in API
   751  	// requests with the JSON null value. By default, fields with empty values are
   752  	// omitted from API requests. See
   753  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   754  	NullFields []string `json:"-"`
   755  }
   756  
   757  func (s *Step) MarshalJSON() ([]byte, error) {
   758  	type NoMethod Step
   759  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   760  }
   761  
   762  // StepEntry: An StepEntry contains debugging information for a step transition
   763  // in a workflow execution.
   764  type StepEntry struct {
   765  	// CreateTime: Output only. The creation time of the step entry.
   766  	CreateTime string `json:"createTime,omitempty"`
   767  	// EntryId: Output only. The numeric ID of this step entry, used for
   768  	// navigation.
   769  	EntryId int64 `json:"entryId,omitempty,string"`
   770  	// Exception: Output only. The exception thrown by the step entry.
   771  	Exception *Exception `json:"exception,omitempty"`
   772  	// Name: Output only. The full resource name of the step entry. Each step entry
   773  	// has a unique entry ID, which is a monotonically increasing counter. Step
   774  	// entry names have the format:
   775  	// `projects/{project}/locations/{location}/workflows/{workflow}/executions/{exe
   776  	// cution}/stepEntries/{step_entry}`.
   777  	Name string `json:"name,omitempty"`
   778  	// NavigationInfo: Output only. The NavigationInfo associated to this step.
   779  	NavigationInfo *NavigationInfo `json:"navigationInfo,omitempty"`
   780  	// Routine: Output only. The name of the routine this step entry belongs to. A
   781  	// routine name is the subworkflow name defined in the YAML source code. The
   782  	// top level routine name is `main`.
   783  	Routine string `json:"routine,omitempty"`
   784  	// State: Output only. The state of the step entry.
   785  	//
   786  	// Possible values:
   787  	//   "STATE_UNSPECIFIED" - Invalid state.
   788  	//   "STATE_IN_PROGRESS" - The step entry is in progress.
   789  	//   "STATE_SUCCEEDED" - The step entry finished successfully.
   790  	//   "STATE_FAILED" - The step entry failed with an error.
   791  	State string `json:"state,omitempty"`
   792  	// Step: Output only. The name of the step this step entry belongs to.
   793  	Step string `json:"step,omitempty"`
   794  	// StepEntryMetadata: Output only. The StepEntryMetadata associated to this
   795  	// step.
   796  	StepEntryMetadata *StepEntryMetadata `json:"stepEntryMetadata,omitempty"`
   797  	// StepType: Output only. The type of the step this step entry belongs to.
   798  	//
   799  	// Possible values:
   800  	//   "STEP_TYPE_UNSPECIFIED" - Invalid step type.
   801  	//   "STEP_ASSIGN" - The step entry assigns new variable(s).
   802  	//   "STEP_STD_LIB_CALL" - The step entry calls a standard library routine.
   803  	//   "STEP_CONNECTOR_CALL" - The step entry calls a connector.
   804  	//   "STEP_SUBWORKFLOW_CALL" - The step entry calls a subworklfow.
   805  	//   "STEP_CALL" - The step entry calls a subworkflow/stdlib.
   806  	//   "STEP_SWITCH" - The step entry executes a switch-case block.
   807  	//   "STEP_CONDITION" - The step entry executes a condition inside a switch.
   808  	//   "STEP_FOR" - The step entry executes a for loop.
   809  	//   "STEP_FOR_ITERATION" - The step entry executes a iteration of a for loop.
   810  	//   "STEP_PARALLEL_FOR" - The step entry executes a parallel for loop.
   811  	//   "STEP_PARALLEL_BRANCH" - The step entry executes a series of parallel
   812  	// branch(es).
   813  	//   "STEP_PARALLEL_BRANCH_ENTRY" - The step entry executes a branch of a
   814  	// parallel branch.
   815  	//   "STEP_TRY_RETRY_EXCEPT" - The step entry executes a try/retry/except
   816  	// block.
   817  	//   "STEP_TRY" - The step entry executes the try part of a try/retry/except
   818  	// block.
   819  	//   "STEP_RETRY" - The step entry executes the retry part of a
   820  	// try/retry/except block.
   821  	//   "STEP_EXCEPT" - The step entry executes the except part of a
   822  	// try/retry/except block.
   823  	//   "STEP_RETURN" - The step entry returns.
   824  	//   "STEP_RAISE" - The step entry raises an error.
   825  	//   "STEP_GOTO" - The step entry jumps to another step.
   826  	StepType string `json:"stepType,omitempty"`
   827  	// UpdateTime: Output only. The most recently updated time of the step entry.
   828  	UpdateTime string `json:"updateTime,omitempty"`
   829  
   830  	// ServerResponse contains the HTTP response code and headers from the server.
   831  	googleapi.ServerResponse `json:"-"`
   832  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   833  	// unconditionally include in API requests. By default, fields with empty or
   834  	// default values are omitted from API requests. See
   835  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   836  	// details.
   837  	ForceSendFields []string `json:"-"`
   838  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   839  	// requests with the JSON null value. By default, fields with empty values are
   840  	// omitted from API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   842  	NullFields []string `json:"-"`
   843  }
   844  
   845  func (s *StepEntry) MarshalJSON() ([]byte, error) {
   846  	type NoMethod StepEntry
   847  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   848  }
   849  
   850  // StepEntryMetadata: StepEntryMetadata contains metadata information about
   851  // this step.
   852  type StepEntryMetadata struct {
   853  	// ProgressNumber: Progress number represents the current state of the current
   854  	// progress. eg: A step entry represents the 4th iteration in a progress of
   855  	// PROGRESS_TYPE_FOR.
   856  	ProgressNumber int64 `json:"progressNumber,omitempty,string"`
   857  	// ProgressType: Progress type of this step entry.
   858  	//
   859  	// Possible values:
   860  	//   "PROGRESS_TYPE_UNSPECIFIED" - Current step entry does not have any
   861  	// progress data.
   862  	//   "PROGRESS_TYPE_FOR" - Current step entry is in progress of a FOR step.
   863  	//   "PROGRESS_TYPE_SWITCH" - Current step entry is in progress of a SWITCH
   864  	// step.
   865  	//   "PROGRESS_TYPE_RETRY" - Current step entry is in progress of a RETRY step.
   866  	//   "PROGRESS_TYPE_PARALLEL_FOR" - Current step entry is in progress of a
   867  	// PARALLEL FOR step.
   868  	//   "PROGRESS_TYPE_PARALLEL_BRANCH" - Current step entry is in progress of a
   869  	// PARALLEL BRANCH step.
   870  	ProgressType string `json:"progressType,omitempty"`
   871  	// ThreadId: Child thread id that this step entry belongs to.
   872  	ThreadId string `json:"threadId,omitempty"`
   873  	// ForceSendFields is a list of field names (e.g. "ProgressNumber") to
   874  	// unconditionally include in API requests. By default, fields with empty or
   875  	// default values are omitted from API requests. See
   876  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   877  	// details.
   878  	ForceSendFields []string `json:"-"`
   879  	// NullFields is a list of field names (e.g. "ProgressNumber") to include in
   880  	// API requests with the JSON null value. By default, fields with empty values
   881  	// are omitted from API requests. See
   882  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   883  	NullFields []string `json:"-"`
   884  }
   885  
   886  func (s *StepEntryMetadata) MarshalJSON() ([]byte, error) {
   887  	type NoMethod StepEntryMetadata
   888  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   889  }
   890  
   891  // TriggerPubsubExecutionRequest: Request for the TriggerPubsubExecution
   892  // method.
   893  type TriggerPubsubExecutionRequest struct {
   894  	// GCPCloudEventsMode: Required. LINT: LEGACY_NAMES The query parameter value
   895  	// for __GCP_CloudEventsMode, set by the Eventarc service when configuring
   896  	// triggers.
   897  	GCPCloudEventsMode string `json:"GCPCloudEventsMode,omitempty"`
   898  	// DeliveryAttempt: The number of attempts that have been made to deliver this
   899  	// message. This is set by Pub/Sub for subscriptions that have the "dead
   900  	// letter" feature enabled, and hence provided here for compatibility, but is
   901  	// ignored by Workflows.
   902  	DeliveryAttempt int64 `json:"deliveryAttempt,omitempty"`
   903  	// Message: Required. The message of the Pub/Sub push notification.
   904  	Message *PubsubMessage `json:"message,omitempty"`
   905  	// Subscription: Required. The subscription of the Pub/Sub push notification.
   906  	// Format: projects/{project}/subscriptions/{sub}
   907  	Subscription string `json:"subscription,omitempty"`
   908  	// ForceSendFields is a list of field names (e.g. "GCPCloudEventsMode") to
   909  	// unconditionally include in API requests. By default, fields with empty or
   910  	// default values are omitted from API requests. See
   911  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   912  	// details.
   913  	ForceSendFields []string `json:"-"`
   914  	// NullFields is a list of field names (e.g. "GCPCloudEventsMode") to include
   915  	// in API requests with the JSON null value. By default, fields with empty
   916  	// values are omitted from API requests. See
   917  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   918  	NullFields []string `json:"-"`
   919  }
   920  
   921  func (s *TriggerPubsubExecutionRequest) MarshalJSON() ([]byte, error) {
   922  	type NoMethod TriggerPubsubExecutionRequest
   923  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   924  }
   925  
   926  type ProjectsLocationsWorkflowsTriggerPubsubExecutionCall struct {
   927  	s                             *Service
   928  	workflow                      string
   929  	triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest
   930  	urlParams_                    gensupport.URLParams
   931  	ctx_                          context.Context
   932  	header_                       http.Header
   933  }
   934  
   935  // TriggerPubsubExecution: Triggers a new execution using the latest revision
   936  // of the given workflow by a Pub/Sub push notification.
   937  //
   938  //   - workflow: Name of the workflow for which an execution should be created.
   939  //     Format: projects/{project}/locations/{location}/workflows/{workflow}.
   940  func (r *ProjectsLocationsWorkflowsService) TriggerPubsubExecution(workflow string, triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
   941  	c := &ProjectsLocationsWorkflowsTriggerPubsubExecutionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   942  	c.workflow = workflow
   943  	c.triggerpubsubexecutionrequest = triggerpubsubexecutionrequest
   944  	return c
   945  }
   946  
   947  // Fields allows partial responses to be retrieved. See
   948  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   949  // details.
   950  func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
   951  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   952  	return c
   953  }
   954  
   955  // Context sets the context to be used in this call's Do method.
   956  func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
   957  	c.ctx_ = ctx
   958  	return c
   959  }
   960  
   961  // Header returns a http.Header that can be modified by the caller to add
   962  // headers to the request.
   963  func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Header() http.Header {
   964  	if c.header_ == nil {
   965  		c.header_ = make(http.Header)
   966  	}
   967  	return c.header_
   968  }
   969  
   970  func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) doRequest(alt string) (*http.Response, error) {
   971  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
   972  	var body io.Reader = nil
   973  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggerpubsubexecutionrequest)
   974  	if err != nil {
   975  		return nil, err
   976  	}
   977  	c.urlParams_.Set("alt", alt)
   978  	c.urlParams_.Set("prettyPrint", "false")
   979  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+workflow}:triggerPubsubExecution")
   980  	urls += "?" + c.urlParams_.Encode()
   981  	req, err := http.NewRequest("POST", urls, body)
   982  	if err != nil {
   983  		return nil, err
   984  	}
   985  	req.Header = reqHeaders
   986  	googleapi.Expand(req.URL, map[string]string{
   987  		"workflow": c.workflow,
   988  	})
   989  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   990  }
   991  
   992  // Do executes the "workflowexecutions.projects.locations.workflows.triggerPubsubExecution" call.
   993  // Any non-2xx status code is an error. Response headers are in either
   994  // *Execution.ServerResponse.Header or (if a response was returned at all) in
   995  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   996  // whether the returned error was because http.StatusNotModified was returned.
   997  func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
   998  	gensupport.SetOptions(c.urlParams_, opts...)
   999  	res, err := c.doRequest("json")
  1000  	if res != nil && res.StatusCode == http.StatusNotModified {
  1001  		if res.Body != nil {
  1002  			res.Body.Close()
  1003  		}
  1004  		return nil, gensupport.WrapError(&googleapi.Error{
  1005  			Code:   res.StatusCode,
  1006  			Header: res.Header,
  1007  		})
  1008  	}
  1009  	if err != nil {
  1010  		return nil, err
  1011  	}
  1012  	defer googleapi.CloseBody(res)
  1013  	if err := googleapi.CheckResponse(res); err != nil {
  1014  		return nil, gensupport.WrapError(err)
  1015  	}
  1016  	ret := &Execution{
  1017  		ServerResponse: googleapi.ServerResponse{
  1018  			Header:         res.Header,
  1019  			HTTPStatusCode: res.StatusCode,
  1020  		},
  1021  	}
  1022  	target := &ret
  1023  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1024  		return nil, err
  1025  	}
  1026  	return ret, nil
  1027  }
  1028  
  1029  type ProjectsLocationsWorkflowsExecutionsCancelCall struct {
  1030  	s                      *Service
  1031  	name                   string
  1032  	cancelexecutionrequest *CancelExecutionRequest
  1033  	urlParams_             gensupport.URLParams
  1034  	ctx_                   context.Context
  1035  	header_                http.Header
  1036  }
  1037  
  1038  // Cancel: Cancels an execution of the given name.
  1039  //
  1040  //   - name: Name of the execution to be cancelled. Format:
  1041  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1042  //     ecution}.
  1043  func (r *ProjectsLocationsWorkflowsExecutionsService) Cancel(name string, cancelexecutionrequest *CancelExecutionRequest) *ProjectsLocationsWorkflowsExecutionsCancelCall {
  1044  	c := &ProjectsLocationsWorkflowsExecutionsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1045  	c.name = name
  1046  	c.cancelexecutionrequest = cancelexecutionrequest
  1047  	return c
  1048  }
  1049  
  1050  // Fields allows partial responses to be retrieved. See
  1051  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1052  // details.
  1053  func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCancelCall {
  1054  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1055  	return c
  1056  }
  1057  
  1058  // Context sets the context to be used in this call's Do method.
  1059  func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCancelCall {
  1060  	c.ctx_ = ctx
  1061  	return c
  1062  }
  1063  
  1064  // Header returns a http.Header that can be modified by the caller to add
  1065  // headers to the request.
  1066  func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Header() http.Header {
  1067  	if c.header_ == nil {
  1068  		c.header_ = make(http.Header)
  1069  	}
  1070  	return c.header_
  1071  }
  1072  
  1073  func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) doRequest(alt string) (*http.Response, error) {
  1074  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1075  	var body io.Reader = nil
  1076  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelexecutionrequest)
  1077  	if err != nil {
  1078  		return nil, err
  1079  	}
  1080  	c.urlParams_.Set("alt", alt)
  1081  	c.urlParams_.Set("prettyPrint", "false")
  1082  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  1083  	urls += "?" + c.urlParams_.Encode()
  1084  	req, err := http.NewRequest("POST", urls, body)
  1085  	if err != nil {
  1086  		return nil, err
  1087  	}
  1088  	req.Header = reqHeaders
  1089  	googleapi.Expand(req.URL, map[string]string{
  1090  		"name": c.name,
  1091  	})
  1092  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1093  }
  1094  
  1095  // Do executes the "workflowexecutions.projects.locations.workflows.executions.cancel" call.
  1096  // Any non-2xx status code is an error. Response headers are in either
  1097  // *Execution.ServerResponse.Header or (if a response was returned at all) in
  1098  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1099  // whether the returned error was because http.StatusNotModified was returned.
  1100  func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  1101  	gensupport.SetOptions(c.urlParams_, opts...)
  1102  	res, err := c.doRequest("json")
  1103  	if res != nil && res.StatusCode == http.StatusNotModified {
  1104  		if res.Body != nil {
  1105  			res.Body.Close()
  1106  		}
  1107  		return nil, gensupport.WrapError(&googleapi.Error{
  1108  			Code:   res.StatusCode,
  1109  			Header: res.Header,
  1110  		})
  1111  	}
  1112  	if err != nil {
  1113  		return nil, err
  1114  	}
  1115  	defer googleapi.CloseBody(res)
  1116  	if err := googleapi.CheckResponse(res); err != nil {
  1117  		return nil, gensupport.WrapError(err)
  1118  	}
  1119  	ret := &Execution{
  1120  		ServerResponse: googleapi.ServerResponse{
  1121  			Header:         res.Header,
  1122  			HTTPStatusCode: res.StatusCode,
  1123  		},
  1124  	}
  1125  	target := &ret
  1126  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1127  		return nil, err
  1128  	}
  1129  	return ret, nil
  1130  }
  1131  
  1132  type ProjectsLocationsWorkflowsExecutionsCreateCall struct {
  1133  	s          *Service
  1134  	parent     string
  1135  	execution  *Execution
  1136  	urlParams_ gensupport.URLParams
  1137  	ctx_       context.Context
  1138  	header_    http.Header
  1139  }
  1140  
  1141  // Create: Creates a new execution using the latest revision of the given
  1142  // workflow. For more information, see Execute a workflow.
  1143  //
  1144  //   - parent: Name of the workflow for which an execution should be created.
  1145  //     Format: projects/{project}/locations/{location}/workflows/{workflow} The
  1146  //     latest revision of the workflow will be used.
  1147  func (r *ProjectsLocationsWorkflowsExecutionsService) Create(parent string, execution *Execution) *ProjectsLocationsWorkflowsExecutionsCreateCall {
  1148  	c := &ProjectsLocationsWorkflowsExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1149  	c.parent = parent
  1150  	c.execution = execution
  1151  	return c
  1152  }
  1153  
  1154  // Fields allows partial responses to be retrieved. See
  1155  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1156  // details.
  1157  func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCreateCall {
  1158  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1159  	return c
  1160  }
  1161  
  1162  // Context sets the context to be used in this call's Do method.
  1163  func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCreateCall {
  1164  	c.ctx_ = ctx
  1165  	return c
  1166  }
  1167  
  1168  // Header returns a http.Header that can be modified by the caller to add
  1169  // headers to the request.
  1170  func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Header() http.Header {
  1171  	if c.header_ == nil {
  1172  		c.header_ = make(http.Header)
  1173  	}
  1174  	return c.header_
  1175  }
  1176  
  1177  func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) doRequest(alt string) (*http.Response, error) {
  1178  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1179  	var body io.Reader = nil
  1180  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
  1181  	if err != nil {
  1182  		return nil, err
  1183  	}
  1184  	c.urlParams_.Set("alt", alt)
  1185  	c.urlParams_.Set("prettyPrint", "false")
  1186  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
  1187  	urls += "?" + c.urlParams_.Encode()
  1188  	req, err := http.NewRequest("POST", urls, body)
  1189  	if err != nil {
  1190  		return nil, err
  1191  	}
  1192  	req.Header = reqHeaders
  1193  	googleapi.Expand(req.URL, map[string]string{
  1194  		"parent": c.parent,
  1195  	})
  1196  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1197  }
  1198  
  1199  // Do executes the "workflowexecutions.projects.locations.workflows.executions.create" call.
  1200  // Any non-2xx status code is an error. Response headers are in either
  1201  // *Execution.ServerResponse.Header or (if a response was returned at all) in
  1202  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1203  // whether the returned error was because http.StatusNotModified was returned.
  1204  func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  1205  	gensupport.SetOptions(c.urlParams_, opts...)
  1206  	res, err := c.doRequest("json")
  1207  	if res != nil && res.StatusCode == http.StatusNotModified {
  1208  		if res.Body != nil {
  1209  			res.Body.Close()
  1210  		}
  1211  		return nil, gensupport.WrapError(&googleapi.Error{
  1212  			Code:   res.StatusCode,
  1213  			Header: res.Header,
  1214  		})
  1215  	}
  1216  	if err != nil {
  1217  		return nil, err
  1218  	}
  1219  	defer googleapi.CloseBody(res)
  1220  	if err := googleapi.CheckResponse(res); err != nil {
  1221  		return nil, gensupport.WrapError(err)
  1222  	}
  1223  	ret := &Execution{
  1224  		ServerResponse: googleapi.ServerResponse{
  1225  			Header:         res.Header,
  1226  			HTTPStatusCode: res.StatusCode,
  1227  		},
  1228  	}
  1229  	target := &ret
  1230  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1231  		return nil, err
  1232  	}
  1233  	return ret, nil
  1234  }
  1235  
  1236  type ProjectsLocationsWorkflowsExecutionsExportDataCall struct {
  1237  	s            *Service
  1238  	name         string
  1239  	urlParams_   gensupport.URLParams
  1240  	ifNoneMatch_ string
  1241  	ctx_         context.Context
  1242  	header_      http.Header
  1243  }
  1244  
  1245  // ExportData: Returns all metadata stored about an execution, excluding most
  1246  // data that is already accessible using other API methods.
  1247  //
  1248  //   - name: Name of the execution for which data is to be exported. Format:
  1249  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1250  //     ecution}.
  1251  func (r *ProjectsLocationsWorkflowsExecutionsService) ExportData(name string) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
  1252  	c := &ProjectsLocationsWorkflowsExecutionsExportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1253  	c.name = name
  1254  	return c
  1255  }
  1256  
  1257  // Fields allows partial responses to be retrieved. See
  1258  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1259  // details.
  1260  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
  1261  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1262  	return c
  1263  }
  1264  
  1265  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1266  // object's ETag matches the given value. This is useful for getting updates
  1267  // only after the object has changed since the last request.
  1268  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
  1269  	c.ifNoneMatch_ = entityTag
  1270  	return c
  1271  }
  1272  
  1273  // Context sets the context to be used in this call's Do method.
  1274  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
  1275  	c.ctx_ = ctx
  1276  	return c
  1277  }
  1278  
  1279  // Header returns a http.Header that can be modified by the caller to add
  1280  // headers to the request.
  1281  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Header() http.Header {
  1282  	if c.header_ == nil {
  1283  		c.header_ = make(http.Header)
  1284  	}
  1285  	return c.header_
  1286  }
  1287  
  1288  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) doRequest(alt string) (*http.Response, error) {
  1289  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1290  	if c.ifNoneMatch_ != "" {
  1291  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1292  	}
  1293  	var body io.Reader = nil
  1294  	c.urlParams_.Set("alt", alt)
  1295  	c.urlParams_.Set("prettyPrint", "false")
  1296  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportData")
  1297  	urls += "?" + c.urlParams_.Encode()
  1298  	req, err := http.NewRequest("GET", urls, body)
  1299  	if err != nil {
  1300  		return nil, err
  1301  	}
  1302  	req.Header = reqHeaders
  1303  	googleapi.Expand(req.URL, map[string]string{
  1304  		"name": c.name,
  1305  	})
  1306  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1307  }
  1308  
  1309  // Do executes the "workflowexecutions.projects.locations.workflows.executions.exportData" call.
  1310  // Any non-2xx status code is an error. Response headers are in either
  1311  // *ExportDataResponse.ServerResponse.Header or (if a response was returned at
  1312  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1313  // check whether the returned error was because http.StatusNotModified was
  1314  // returned.
  1315  func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Do(opts ...googleapi.CallOption) (*ExportDataResponse, error) {
  1316  	gensupport.SetOptions(c.urlParams_, opts...)
  1317  	res, err := c.doRequest("json")
  1318  	if res != nil && res.StatusCode == http.StatusNotModified {
  1319  		if res.Body != nil {
  1320  			res.Body.Close()
  1321  		}
  1322  		return nil, gensupport.WrapError(&googleapi.Error{
  1323  			Code:   res.StatusCode,
  1324  			Header: res.Header,
  1325  		})
  1326  	}
  1327  	if err != nil {
  1328  		return nil, err
  1329  	}
  1330  	defer googleapi.CloseBody(res)
  1331  	if err := googleapi.CheckResponse(res); err != nil {
  1332  		return nil, gensupport.WrapError(err)
  1333  	}
  1334  	ret := &ExportDataResponse{
  1335  		ServerResponse: googleapi.ServerResponse{
  1336  			Header:         res.Header,
  1337  			HTTPStatusCode: res.StatusCode,
  1338  		},
  1339  	}
  1340  	target := &ret
  1341  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1342  		return nil, err
  1343  	}
  1344  	return ret, nil
  1345  }
  1346  
  1347  type ProjectsLocationsWorkflowsExecutionsGetCall struct {
  1348  	s            *Service
  1349  	name         string
  1350  	urlParams_   gensupport.URLParams
  1351  	ifNoneMatch_ string
  1352  	ctx_         context.Context
  1353  	header_      http.Header
  1354  }
  1355  
  1356  // Get: Returns an execution of the given name.
  1357  //
  1358  //   - name: Name of the execution to be retrieved. Format:
  1359  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1360  //     ecution}.
  1361  func (r *ProjectsLocationsWorkflowsExecutionsService) Get(name string) *ProjectsLocationsWorkflowsExecutionsGetCall {
  1362  	c := &ProjectsLocationsWorkflowsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1363  	c.name = name
  1364  	return c
  1365  }
  1366  
  1367  // View sets the optional parameter "view": A view defining which fields should
  1368  // be filled in the returned execution. The API will default to the FULL view.
  1369  //
  1370  // Possible values:
  1371  //
  1372  //	"EXECUTION_VIEW_UNSPECIFIED" - The default / unset value.
  1373  //	"BASIC" - Includes only basic metadata about the execution. The following
  1374  //
  1375  // fields are returned: name, start_time, end_time, duration, state, and
  1376  // workflow_revision_id.
  1377  //
  1378  //	"FULL" - Includes all data.
  1379  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsGetCall {
  1380  	c.urlParams_.Set("view", view)
  1381  	return c
  1382  }
  1383  
  1384  // Fields allows partial responses to be retrieved. See
  1385  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1386  // details.
  1387  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsGetCall {
  1388  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1389  	return c
  1390  }
  1391  
  1392  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1393  // object's ETag matches the given value. This is useful for getting updates
  1394  // only after the object has changed since the last request.
  1395  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsGetCall {
  1396  	c.ifNoneMatch_ = entityTag
  1397  	return c
  1398  }
  1399  
  1400  // Context sets the context to be used in this call's Do method.
  1401  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsGetCall {
  1402  	c.ctx_ = ctx
  1403  	return c
  1404  }
  1405  
  1406  // Header returns a http.Header that can be modified by the caller to add
  1407  // headers to the request.
  1408  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Header() http.Header {
  1409  	if c.header_ == nil {
  1410  		c.header_ = make(http.Header)
  1411  	}
  1412  	return c.header_
  1413  }
  1414  
  1415  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
  1416  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1417  	if c.ifNoneMatch_ != "" {
  1418  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1419  	}
  1420  	var body io.Reader = nil
  1421  	c.urlParams_.Set("alt", alt)
  1422  	c.urlParams_.Set("prettyPrint", "false")
  1423  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1424  	urls += "?" + c.urlParams_.Encode()
  1425  	req, err := http.NewRequest("GET", urls, body)
  1426  	if err != nil {
  1427  		return nil, err
  1428  	}
  1429  	req.Header = reqHeaders
  1430  	googleapi.Expand(req.URL, map[string]string{
  1431  		"name": c.name,
  1432  	})
  1433  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1434  }
  1435  
  1436  // Do executes the "workflowexecutions.projects.locations.workflows.executions.get" call.
  1437  // Any non-2xx status code is an error. Response headers are in either
  1438  // *Execution.ServerResponse.Header or (if a response was returned at all) in
  1439  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1440  // whether the returned error was because http.StatusNotModified was returned.
  1441  func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  1442  	gensupport.SetOptions(c.urlParams_, opts...)
  1443  	res, err := c.doRequest("json")
  1444  	if res != nil && res.StatusCode == http.StatusNotModified {
  1445  		if res.Body != nil {
  1446  			res.Body.Close()
  1447  		}
  1448  		return nil, gensupport.WrapError(&googleapi.Error{
  1449  			Code:   res.StatusCode,
  1450  			Header: res.Header,
  1451  		})
  1452  	}
  1453  	if err != nil {
  1454  		return nil, err
  1455  	}
  1456  	defer googleapi.CloseBody(res)
  1457  	if err := googleapi.CheckResponse(res); err != nil {
  1458  		return nil, gensupport.WrapError(err)
  1459  	}
  1460  	ret := &Execution{
  1461  		ServerResponse: googleapi.ServerResponse{
  1462  			Header:         res.Header,
  1463  			HTTPStatusCode: res.StatusCode,
  1464  		},
  1465  	}
  1466  	target := &ret
  1467  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1468  		return nil, err
  1469  	}
  1470  	return ret, nil
  1471  }
  1472  
  1473  type ProjectsLocationsWorkflowsExecutionsListCall struct {
  1474  	s            *Service
  1475  	parent       string
  1476  	urlParams_   gensupport.URLParams
  1477  	ifNoneMatch_ string
  1478  	ctx_         context.Context
  1479  	header_      http.Header
  1480  }
  1481  
  1482  // List: Returns a list of executions which belong to the workflow with the
  1483  // given name. The method returns executions of all workflow revisions.
  1484  // Returned executions are ordered by their start time (newest first).
  1485  //
  1486  //   - parent: Name of the workflow for which the executions should be listed.
  1487  //     Format: projects/{project}/locations/{location}/workflows/{workflow}.
  1488  func (r *ProjectsLocationsWorkflowsExecutionsService) List(parent string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1489  	c := &ProjectsLocationsWorkflowsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1490  	c.parent = parent
  1491  	return c
  1492  }
  1493  
  1494  // Filter sets the optional parameter "filter": Filters applied to the
  1495  // `[Executions.ListExecutions]` results. The following fields are supported
  1496  // for filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`,
  1497  // `duration`, `workflowRevisionId`, `stepName`, and `label`. For details, see
  1498  // AIP-160. For example, if you are using the Google APIs Explorer:
  1499  // `state="SUCCEEDED" or `startTime>"2023-08-01" AND state="FAILED"
  1500  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1501  	c.urlParams_.Set("filter", filter)
  1502  	return c
  1503  }
  1504  
  1505  // OrderBy sets the optional parameter "orderBy": Comma-separated list of
  1506  // fields that specify the ordering applied to the
  1507  // `[Executions.ListExecutions]` results. By default the ordering is based on
  1508  // descending `createTime`. The following fields are supported for ordering:
  1509  // `executionId`, `state`, `createTime`, `startTime`, `endTime`, `duration`,
  1510  // and `workflowRevisionId`. For details, see AIP-132.
  1511  func (c *ProjectsLocationsWorkflowsExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1512  	c.urlParams_.Set("orderBy", orderBy)
  1513  	return c
  1514  }
  1515  
  1516  // PageSize sets the optional parameter "pageSize": Maximum number of
  1517  // executions to return per call. Max supported value depends on the selected
  1518  // Execution view: it's 1000 for BASIC and 100 for FULL. The default value used
  1519  // if the field is not specified is 100, regardless of the selected view.
  1520  // Values greater than the max value will be coerced down to it.
  1521  func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsListCall {
  1522  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1523  	return c
  1524  }
  1525  
  1526  // PageToken sets the optional parameter "pageToken": A page token, received
  1527  // from a previous `ListExecutions` call. Provide this to retrieve the
  1528  // subsequent page. When paginating, all other parameters provided to
  1529  // `ListExecutions` must match the call that provided the page token. Note that
  1530  // pagination is applied to dynamic data. The list of executions returned can
  1531  // change between page requests.
  1532  func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1533  	c.urlParams_.Set("pageToken", pageToken)
  1534  	return c
  1535  }
  1536  
  1537  // View sets the optional parameter "view": A view defining which fields should
  1538  // be filled in the returned executions. The API will default to the BASIC
  1539  // view.
  1540  //
  1541  // Possible values:
  1542  //
  1543  //	"EXECUTION_VIEW_UNSPECIFIED" - The default / unset value.
  1544  //	"BASIC" - Includes only basic metadata about the execution. The following
  1545  //
  1546  // fields are returned: name, start_time, end_time, duration, state, and
  1547  // workflow_revision_id.
  1548  //
  1549  //	"FULL" - Includes all data.
  1550  func (c *ProjectsLocationsWorkflowsExecutionsListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1551  	c.urlParams_.Set("view", view)
  1552  	return c
  1553  }
  1554  
  1555  // Fields allows partial responses to be retrieved. See
  1556  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1557  // details.
  1558  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsListCall {
  1559  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1560  	return c
  1561  }
  1562  
  1563  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1564  // object's ETag matches the given value. This is useful for getting updates
  1565  // only after the object has changed since the last request.
  1566  func (c *ProjectsLocationsWorkflowsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsListCall {
  1567  	c.ifNoneMatch_ = entityTag
  1568  	return c
  1569  }
  1570  
  1571  // Context sets the context to be used in this call's Do method.
  1572  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsListCall {
  1573  	c.ctx_ = ctx
  1574  	return c
  1575  }
  1576  
  1577  // Header returns a http.Header that can be modified by the caller to add
  1578  // headers to the request.
  1579  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Header() http.Header {
  1580  	if c.header_ == nil {
  1581  		c.header_ = make(http.Header)
  1582  	}
  1583  	return c.header_
  1584  }
  1585  
  1586  func (c *ProjectsLocationsWorkflowsExecutionsListCall) doRequest(alt string) (*http.Response, error) {
  1587  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1588  	if c.ifNoneMatch_ != "" {
  1589  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1590  	}
  1591  	var body io.Reader = nil
  1592  	c.urlParams_.Set("alt", alt)
  1593  	c.urlParams_.Set("prettyPrint", "false")
  1594  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
  1595  	urls += "?" + c.urlParams_.Encode()
  1596  	req, err := http.NewRequest("GET", urls, body)
  1597  	if err != nil {
  1598  		return nil, err
  1599  	}
  1600  	req.Header = reqHeaders
  1601  	googleapi.Expand(req.URL, map[string]string{
  1602  		"parent": c.parent,
  1603  	})
  1604  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1605  }
  1606  
  1607  // Do executes the "workflowexecutions.projects.locations.workflows.executions.list" call.
  1608  // Any non-2xx status code is an error. Response headers are in either
  1609  // *ListExecutionsResponse.ServerResponse.Header or (if a response was returned
  1610  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1611  // check whether the returned error was because http.StatusNotModified was
  1612  // returned.
  1613  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
  1614  	gensupport.SetOptions(c.urlParams_, opts...)
  1615  	res, err := c.doRequest("json")
  1616  	if res != nil && res.StatusCode == http.StatusNotModified {
  1617  		if res.Body != nil {
  1618  			res.Body.Close()
  1619  		}
  1620  		return nil, gensupport.WrapError(&googleapi.Error{
  1621  			Code:   res.StatusCode,
  1622  			Header: res.Header,
  1623  		})
  1624  	}
  1625  	if err != nil {
  1626  		return nil, err
  1627  	}
  1628  	defer googleapi.CloseBody(res)
  1629  	if err := googleapi.CheckResponse(res); err != nil {
  1630  		return nil, gensupport.WrapError(err)
  1631  	}
  1632  	ret := &ListExecutionsResponse{
  1633  		ServerResponse: googleapi.ServerResponse{
  1634  			Header:         res.Header,
  1635  			HTTPStatusCode: res.StatusCode,
  1636  		},
  1637  	}
  1638  	target := &ret
  1639  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1640  		return nil, err
  1641  	}
  1642  	return ret, nil
  1643  }
  1644  
  1645  // Pages invokes f for each page of results.
  1646  // A non-nil error returned from f will halt the iteration.
  1647  // The provided context supersedes any context provided to the Context method.
  1648  func (c *ProjectsLocationsWorkflowsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
  1649  	c.ctx_ = ctx
  1650  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1651  	for {
  1652  		x, err := c.Do()
  1653  		if err != nil {
  1654  			return err
  1655  		}
  1656  		if err := f(x); err != nil {
  1657  			return err
  1658  		}
  1659  		if x.NextPageToken == "" {
  1660  			return nil
  1661  		}
  1662  		c.PageToken(x.NextPageToken)
  1663  	}
  1664  }
  1665  
  1666  type ProjectsLocationsWorkflowsExecutionsCallbacksListCall struct {
  1667  	s            *Service
  1668  	parent       string
  1669  	urlParams_   gensupport.URLParams
  1670  	ifNoneMatch_ string
  1671  	ctx_         context.Context
  1672  	header_      http.Header
  1673  }
  1674  
  1675  // List: Returns a list of active callbacks that belong to the execution with
  1676  // the given name. The returned callbacks are ordered by callback ID.
  1677  //
  1678  //   - parent: Name of the execution for which the callbacks should be listed.
  1679  //     Format:
  1680  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1681  //     ecution}.
  1682  func (r *ProjectsLocationsWorkflowsExecutionsCallbacksService) List(parent string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1683  	c := &ProjectsLocationsWorkflowsExecutionsCallbacksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1684  	c.parent = parent
  1685  	return c
  1686  }
  1687  
  1688  // PageSize sets the optional parameter "pageSize": Maximum number of callbacks
  1689  // to return per call. The default value is 100 and is also the maximum value.
  1690  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1691  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1692  	return c
  1693  }
  1694  
  1695  // PageToken sets the optional parameter "pageToken": A page token, received
  1696  // from a previous `ListCallbacks` call. Provide this to retrieve the
  1697  // subsequent page. Note that pagination is applied to dynamic data. The list
  1698  // of callbacks returned can change between page requests if callbacks are
  1699  // created or deleted.
  1700  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1701  	c.urlParams_.Set("pageToken", pageToken)
  1702  	return c
  1703  }
  1704  
  1705  // Fields allows partial responses to be retrieved. See
  1706  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1707  // details.
  1708  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1709  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1710  	return c
  1711  }
  1712  
  1713  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1714  // object's ETag matches the given value. This is useful for getting updates
  1715  // only after the object has changed since the last request.
  1716  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1717  	c.ifNoneMatch_ = entityTag
  1718  	return c
  1719  }
  1720  
  1721  // Context sets the context to be used in this call's Do method.
  1722  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
  1723  	c.ctx_ = ctx
  1724  	return c
  1725  }
  1726  
  1727  // Header returns a http.Header that can be modified by the caller to add
  1728  // headers to the request.
  1729  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Header() http.Header {
  1730  	if c.header_ == nil {
  1731  		c.header_ = make(http.Header)
  1732  	}
  1733  	return c.header_
  1734  }
  1735  
  1736  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) doRequest(alt string) (*http.Response, error) {
  1737  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1738  	if c.ifNoneMatch_ != "" {
  1739  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1740  	}
  1741  	var body io.Reader = nil
  1742  	c.urlParams_.Set("alt", alt)
  1743  	c.urlParams_.Set("prettyPrint", "false")
  1744  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/callbacks")
  1745  	urls += "?" + c.urlParams_.Encode()
  1746  	req, err := http.NewRequest("GET", urls, body)
  1747  	if err != nil {
  1748  		return nil, err
  1749  	}
  1750  	req.Header = reqHeaders
  1751  	googleapi.Expand(req.URL, map[string]string{
  1752  		"parent": c.parent,
  1753  	})
  1754  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1755  }
  1756  
  1757  // Do executes the "workflowexecutions.projects.locations.workflows.executions.callbacks.list" call.
  1758  // Any non-2xx status code is an error. Response headers are in either
  1759  // *ListCallbacksResponse.ServerResponse.Header or (if a response was returned
  1760  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1761  // check whether the returned error was because http.StatusNotModified was
  1762  // returned.
  1763  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Do(opts ...googleapi.CallOption) (*ListCallbacksResponse, error) {
  1764  	gensupport.SetOptions(c.urlParams_, opts...)
  1765  	res, err := c.doRequest("json")
  1766  	if res != nil && res.StatusCode == http.StatusNotModified {
  1767  		if res.Body != nil {
  1768  			res.Body.Close()
  1769  		}
  1770  		return nil, gensupport.WrapError(&googleapi.Error{
  1771  			Code:   res.StatusCode,
  1772  			Header: res.Header,
  1773  		})
  1774  	}
  1775  	if err != nil {
  1776  		return nil, err
  1777  	}
  1778  	defer googleapi.CloseBody(res)
  1779  	if err := googleapi.CheckResponse(res); err != nil {
  1780  		return nil, gensupport.WrapError(err)
  1781  	}
  1782  	ret := &ListCallbacksResponse{
  1783  		ServerResponse: googleapi.ServerResponse{
  1784  			Header:         res.Header,
  1785  			HTTPStatusCode: res.StatusCode,
  1786  		},
  1787  	}
  1788  	target := &ret
  1789  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1790  		return nil, err
  1791  	}
  1792  	return ret, nil
  1793  }
  1794  
  1795  // Pages invokes f for each page of results.
  1796  // A non-nil error returned from f will halt the iteration.
  1797  // The provided context supersedes any context provided to the Context method.
  1798  func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Pages(ctx context.Context, f func(*ListCallbacksResponse) error) error {
  1799  	c.ctx_ = ctx
  1800  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1801  	for {
  1802  		x, err := c.Do()
  1803  		if err != nil {
  1804  			return err
  1805  		}
  1806  		if err := f(x); err != nil {
  1807  			return err
  1808  		}
  1809  		if x.NextPageToken == "" {
  1810  			return nil
  1811  		}
  1812  		c.PageToken(x.NextPageToken)
  1813  	}
  1814  }
  1815  
  1816  type ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall struct {
  1817  	s            *Service
  1818  	name         string
  1819  	urlParams_   gensupport.URLParams
  1820  	ifNoneMatch_ string
  1821  	ctx_         context.Context
  1822  	header_      http.Header
  1823  }
  1824  
  1825  // Get: Gets a step entry.
  1826  //
  1827  //   - name: The name of the step entry to retrieve. Format:
  1828  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1829  //     ecution}/stepEntries/{step_entry}.
  1830  func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) Get(name string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
  1831  	c := &ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1832  	c.name = name
  1833  	return c
  1834  }
  1835  
  1836  // Fields allows partial responses to be retrieved. See
  1837  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1838  // details.
  1839  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
  1840  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1841  	return c
  1842  }
  1843  
  1844  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1845  // object's ETag matches the given value. This is useful for getting updates
  1846  // only after the object has changed since the last request.
  1847  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
  1848  	c.ifNoneMatch_ = entityTag
  1849  	return c
  1850  }
  1851  
  1852  // Context sets the context to be used in this call's Do method.
  1853  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
  1854  	c.ctx_ = ctx
  1855  	return c
  1856  }
  1857  
  1858  // Header returns a http.Header that can be modified by the caller to add
  1859  // headers to the request.
  1860  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Header() http.Header {
  1861  	if c.header_ == nil {
  1862  		c.header_ = make(http.Header)
  1863  	}
  1864  	return c.header_
  1865  }
  1866  
  1867  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) doRequest(alt string) (*http.Response, error) {
  1868  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1869  	if c.ifNoneMatch_ != "" {
  1870  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1871  	}
  1872  	var body io.Reader = nil
  1873  	c.urlParams_.Set("alt", alt)
  1874  	c.urlParams_.Set("prettyPrint", "false")
  1875  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1876  	urls += "?" + c.urlParams_.Encode()
  1877  	req, err := http.NewRequest("GET", urls, body)
  1878  	if err != nil {
  1879  		return nil, err
  1880  	}
  1881  	req.Header = reqHeaders
  1882  	googleapi.Expand(req.URL, map[string]string{
  1883  		"name": c.name,
  1884  	})
  1885  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1886  }
  1887  
  1888  // Do executes the "workflowexecutions.projects.locations.workflows.executions.stepEntries.get" call.
  1889  // Any non-2xx status code is an error. Response headers are in either
  1890  // *StepEntry.ServerResponse.Header or (if a response was returned at all) in
  1891  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1892  // whether the returned error was because http.StatusNotModified was returned.
  1893  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Do(opts ...googleapi.CallOption) (*StepEntry, error) {
  1894  	gensupport.SetOptions(c.urlParams_, opts...)
  1895  	res, err := c.doRequest("json")
  1896  	if res != nil && res.StatusCode == http.StatusNotModified {
  1897  		if res.Body != nil {
  1898  			res.Body.Close()
  1899  		}
  1900  		return nil, gensupport.WrapError(&googleapi.Error{
  1901  			Code:   res.StatusCode,
  1902  			Header: res.Header,
  1903  		})
  1904  	}
  1905  	if err != nil {
  1906  		return nil, err
  1907  	}
  1908  	defer googleapi.CloseBody(res)
  1909  	if err := googleapi.CheckResponse(res); err != nil {
  1910  		return nil, gensupport.WrapError(err)
  1911  	}
  1912  	ret := &StepEntry{
  1913  		ServerResponse: googleapi.ServerResponse{
  1914  			Header:         res.Header,
  1915  			HTTPStatusCode: res.StatusCode,
  1916  		},
  1917  	}
  1918  	target := &ret
  1919  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1920  		return nil, err
  1921  	}
  1922  	return ret, nil
  1923  }
  1924  
  1925  type ProjectsLocationsWorkflowsExecutionsStepEntriesListCall struct {
  1926  	s            *Service
  1927  	parent       string
  1928  	urlParams_   gensupport.URLParams
  1929  	ifNoneMatch_ string
  1930  	ctx_         context.Context
  1931  	header_      http.Header
  1932  }
  1933  
  1934  // List: Lists step entries for the corresponding workflow execution. Returned
  1935  // entries are ordered by their create_time.
  1936  //
  1937  //   - parent: Name of the workflow execution to list entries for. Format:
  1938  //     projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex
  1939  //     ecution}/stepEntries/.
  1940  func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1941  	c := &ProjectsLocationsWorkflowsExecutionsStepEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1942  	c.parent = parent
  1943  	return c
  1944  }
  1945  
  1946  // Filter sets the optional parameter "filter": Filters applied to the
  1947  // `[StepEntries.ListStepEntries]` results. The following fields are supported
  1948  // for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`,
  1949  // `stepType`, `state`. For details, see AIP-160. For example, if you are using
  1950  // the Google APIs Explorer: `state="SUCCEEDED" or `createTime>"2023-08-01"
  1951  // AND state="FAILED"
  1952  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1953  	c.urlParams_.Set("filter", filter)
  1954  	return c
  1955  }
  1956  
  1957  // OrderBy sets the optional parameter "orderBy": Comma-separated list of
  1958  // fields that specify the ordering applied to the
  1959  // `[StepEntries.ListStepEntries]` results. By default the ordering is based on
  1960  // ascending `entryId`. The following fields are supported for ordering:
  1961  // `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`,
  1962  // `state`. For details, see AIP-132.
  1963  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) OrderBy(orderBy string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1964  	c.urlParams_.Set("orderBy", orderBy)
  1965  	return c
  1966  }
  1967  
  1968  // PageSize sets the optional parameter "pageSize": Number of step entries to
  1969  // return per call. The default max is 1000.
  1970  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1971  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1972  	return c
  1973  }
  1974  
  1975  // PageToken sets the optional parameter "pageToken": A page token, received
  1976  // from a previous `ListStepEntries` call. Provide this to retrieve the
  1977  // subsequent page. When paginating, all other parameters provided to
  1978  // `ListStepEntries` must match the call that provided the page token.
  1979  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1980  	c.urlParams_.Set("pageToken", pageToken)
  1981  	return c
  1982  }
  1983  
  1984  // Skip sets the optional parameter "skip": The number of step entries to skip.
  1985  // It can be used with or without a pageToken. If used with a pageToken, then
  1986  // it indicates the number of step entries to skip starting from the requested
  1987  // page.
  1988  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Skip(skip int64) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1989  	c.urlParams_.Set("skip", fmt.Sprint(skip))
  1990  	return c
  1991  }
  1992  
  1993  // Fields allows partial responses to be retrieved. See
  1994  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1995  // details.
  1996  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  1997  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1998  	return c
  1999  }
  2000  
  2001  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2002  // object's ETag matches the given value. This is useful for getting updates
  2003  // only after the object has changed since the last request.
  2004  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  2005  	c.ifNoneMatch_ = entityTag
  2006  	return c
  2007  }
  2008  
  2009  // Context sets the context to be used in this call's Do method.
  2010  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
  2011  	c.ctx_ = ctx
  2012  	return c
  2013  }
  2014  
  2015  // Header returns a http.Header that can be modified by the caller to add
  2016  // headers to the request.
  2017  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Header() http.Header {
  2018  	if c.header_ == nil {
  2019  		c.header_ = make(http.Header)
  2020  	}
  2021  	return c.header_
  2022  }
  2023  
  2024  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) doRequest(alt string) (*http.Response, error) {
  2025  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2026  	if c.ifNoneMatch_ != "" {
  2027  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2028  	}
  2029  	var body io.Reader = nil
  2030  	c.urlParams_.Set("alt", alt)
  2031  	c.urlParams_.Set("prettyPrint", "false")
  2032  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/stepEntries")
  2033  	urls += "?" + c.urlParams_.Encode()
  2034  	req, err := http.NewRequest("GET", urls, body)
  2035  	if err != nil {
  2036  		return nil, err
  2037  	}
  2038  	req.Header = reqHeaders
  2039  	googleapi.Expand(req.URL, map[string]string{
  2040  		"parent": c.parent,
  2041  	})
  2042  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2043  }
  2044  
  2045  // Do executes the "workflowexecutions.projects.locations.workflows.executions.stepEntries.list" call.
  2046  // Any non-2xx status code is an error. Response headers are in either
  2047  // *ListStepEntriesResponse.ServerResponse.Header or (if a response was
  2048  // returned at all) in error.(*googleapi.Error).Header. Use
  2049  // googleapi.IsNotModified to check whether the returned error was because
  2050  // http.StatusNotModified was returned.
  2051  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Do(opts ...googleapi.CallOption) (*ListStepEntriesResponse, error) {
  2052  	gensupport.SetOptions(c.urlParams_, opts...)
  2053  	res, err := c.doRequest("json")
  2054  	if res != nil && res.StatusCode == http.StatusNotModified {
  2055  		if res.Body != nil {
  2056  			res.Body.Close()
  2057  		}
  2058  		return nil, gensupport.WrapError(&googleapi.Error{
  2059  			Code:   res.StatusCode,
  2060  			Header: res.Header,
  2061  		})
  2062  	}
  2063  	if err != nil {
  2064  		return nil, err
  2065  	}
  2066  	defer googleapi.CloseBody(res)
  2067  	if err := googleapi.CheckResponse(res); err != nil {
  2068  		return nil, gensupport.WrapError(err)
  2069  	}
  2070  	ret := &ListStepEntriesResponse{
  2071  		ServerResponse: googleapi.ServerResponse{
  2072  			Header:         res.Header,
  2073  			HTTPStatusCode: res.StatusCode,
  2074  		},
  2075  	}
  2076  	target := &ret
  2077  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2078  		return nil, err
  2079  	}
  2080  	return ret, nil
  2081  }
  2082  
  2083  // Pages invokes f for each page of results.
  2084  // A non-nil error returned from f will halt the iteration.
  2085  // The provided context supersedes any context provided to the Context method.
  2086  func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Pages(ctx context.Context, f func(*ListStepEntriesResponse) error) error {
  2087  	c.ctx_ = ctx
  2088  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2089  	for {
  2090  		x, err := c.Do()
  2091  		if err != nil {
  2092  			return err
  2093  		}
  2094  		if err := f(x); err != nil {
  2095  			return err
  2096  		}
  2097  		if x.NextPageToken == "" {
  2098  			return nil
  2099  		}
  2100  		c.PageToken(x.NextPageToken)
  2101  	}
  2102  }
  2103  

View as plain text