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 lifesciences provides access to the Cloud Life Sciences API. 8 // 9 // For product documentation, see: https://cloud.google.com/life-sciences 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/lifesciences/v2beta" 27 // ... 28 // ctx := context.Background() 29 // lifesciencesService, err := lifesciences.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 // lifesciencesService, err := lifesciences.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 // lifesciencesService, err := lifesciences.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package lifesciences // import "google.golang.org/api/lifesciences/v2beta" 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 = "lifesciences:v2beta" 90 const apiName = "lifesciences" 91 const apiVersion = "v2beta" 92 const basePath = "https://lifesciences.googleapis.com/" 93 const basePathTemplate = "https://lifesciences.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://lifesciences.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.Operations = NewProjectsLocationsOperationsService(s) 172 rs.Pipelines = NewProjectsLocationsPipelinesService(s) 173 return rs 174 } 175 176 type ProjectsLocationsService struct { 177 s *Service 178 179 Operations *ProjectsLocationsOperationsService 180 181 Pipelines *ProjectsLocationsPipelinesService 182 } 183 184 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 185 rs := &ProjectsLocationsOperationsService{s: s} 186 return rs 187 } 188 189 type ProjectsLocationsOperationsService struct { 190 s *Service 191 } 192 193 func NewProjectsLocationsPipelinesService(s *Service) *ProjectsLocationsPipelinesService { 194 rs := &ProjectsLocationsPipelinesService{s: s} 195 return rs 196 } 197 198 type ProjectsLocationsPipelinesService struct { 199 s *Service 200 } 201 202 // Accelerator: Carries information about an accelerator that can be attached 203 // to a VM. 204 type Accelerator struct { 205 // Count: How many accelerators of this type to attach. 206 Count int64 `json:"count,omitempty,string"` 207 // Type: The accelerator type string (for example, "nvidia-tesla-t4"). Only 208 // NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is 209 // attached, the required runtime libraries will be made available to all 210 // containers under `/usr/local/nvidia`. The driver version to install must be 211 // specified using the NVIDIA driver version parameter on the virtual machine 212 // specification. Note that attaching a GPU increases the worker VM startup 213 // time by a few minutes. 214 Type string `json:"type,omitempty"` 215 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally 216 // include in API requests. By default, fields with empty or default values are 217 // omitted from API requests. See 218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 219 // details. 220 ForceSendFields []string `json:"-"` 221 // NullFields is a list of field names (e.g. "Count") to include in API 222 // requests with the JSON null value. By default, fields with empty values are 223 // omitted from API requests. See 224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 225 NullFields []string `json:"-"` 226 } 227 228 func (s *Accelerator) MarshalJSON() ([]byte, error) { 229 type NoMethod Accelerator 230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 231 } 232 233 // Action: Specifies a single action that runs a Docker container. 234 type Action struct { 235 // AlwaysRun: By default, after an action fails, no further actions are run. 236 // This flag indicates that this action must be run even if the pipeline has 237 // already failed. This is useful for actions that copy output files off of the 238 // VM or for debugging. Note that no actions will be run if image prefetching 239 // fails. 240 AlwaysRun bool `json:"alwaysRun,omitempty"` 241 // BlockExternalNetwork: Prevents the container from accessing the external 242 // network. 243 BlockExternalNetwork bool `json:"blockExternalNetwork,omitempty"` 244 // Commands: If specified, overrides the `CMD` specified in the container. If 245 // the container also has an `ENTRYPOINT` the values are used as entrypoint 246 // arguments. Otherwise, they are used as a command and arguments to run inside 247 // the container. 248 Commands []string `json:"commands,omitempty"` 249 // ContainerName: An optional name for the container. The container hostname 250 // will be set to this name, making it useful for inter-container 251 // communication. The name must contain only upper and lowercase alphanumeric 252 // characters and hyphens and cannot start with a hyphen. 253 ContainerName string `json:"containerName,omitempty"` 254 // Credentials: If the specified image is hosted on a private registry other 255 // than Google Container Registry, the credentials required to pull the image 256 // must be specified here as an encrypted secret. The secret must decrypt to a 257 // JSON-encoded dictionary containing both `username` and `password` keys. 258 Credentials *Secret `json:"credentials,omitempty"` 259 // DisableImagePrefetch: All container images are typically downloaded before 260 // any actions are executed. This helps prevent typos in URIs or issues like 261 // lack of disk space from wasting large amounts of compute resources. If set, 262 // this flag prevents the worker from downloading the image until just before 263 // the action is executed. 264 DisableImagePrefetch bool `json:"disableImagePrefetch,omitempty"` 265 // DisableStandardErrorCapture: A small portion of the container's standard 266 // error stream is typically captured and returned inside the 267 // `ContainerStoppedEvent`. Setting this flag disables this functionality. 268 DisableStandardErrorCapture bool `json:"disableStandardErrorCapture,omitempty"` 269 // EnableFuse: Enable access to the FUSE device for this action. Filesystems 270 // can then be mounted into disks shared with other actions. The other actions 271 // do not need the `enable_fuse` flag to access the mounted filesystem. This 272 // has the effect of causing the container to be executed with `CAP_SYS_ADMIN` 273 // and exposes `/dev/fuse` to the container, so use it only for containers you 274 // trust. 275 EnableFuse bool `json:"enableFuse,omitempty"` 276 // EncryptedEnvironment: The encrypted environment to pass into the container. 277 // This environment is merged with values specified in the 278 // google.cloud.lifesciences.v2beta.Pipeline message, overwriting any duplicate 279 // values. The secret must decrypt to a JSON-encoded dictionary where key-value 280 // pairs serve as environment variable names and their values. The decoded 281 // environment variables can overwrite the values specified by the 282 // `environment` field. 283 EncryptedEnvironment *Secret `json:"encryptedEnvironment,omitempty"` 284 // Entrypoint: If specified, overrides the `ENTRYPOINT` specified in the 285 // container. 286 Entrypoint string `json:"entrypoint,omitempty"` 287 // Environment: The environment to pass into the container. This environment is 288 // merged with values specified in the 289 // google.cloud.lifesciences.v2beta.Pipeline message, overwriting any duplicate 290 // values. In addition to the values passed here, a few other values are 291 // automatically injected into the environment. These cannot be hidden or 292 // overwritten. `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline 293 // failed because an action has exited with a non-zero status (and did not have 294 // the `IGNORE_EXIT_STATUS` flag set). This can be used to determine if 295 // additional debug or logging actions should execute. 296 // `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last 297 // non-background action that executed. This can be used by workflow engine 298 // authors to determine whether an individual action has succeeded or failed. 299 Environment map[string]string `json:"environment,omitempty"` 300 // IgnoreExitStatus: Normally, a non-zero exit status causes the pipeline to 301 // fail. This flag allows execution of other actions to continue instead. 302 IgnoreExitStatus bool `json:"ignoreExitStatus,omitempty"` 303 // ImageUri: Required. The URI to pull the container image from. Note that all 304 // images referenced by actions in the pipeline are pulled before the first 305 // action runs. If multiple actions reference the same image, it is only pulled 306 // once, ensuring that the same image is used for all actions in a single 307 // pipeline. The image URI can be either a complete host and image 308 // specification (e.g., quay.io/biocontainers/samtools), a library and image 309 // name (e.g., google/cloud-sdk) or a bare image name ('bash') to pull from the 310 // default library. No schema is required in any of these cases. If the 311 // specified image is not public, the service account specified for the Virtual 312 // Machine must have access to pull the images from GCR, or appropriate 313 // credentials must be specified in the 314 // google.cloud.lifesciences.v2beta.Action.credentials field. 315 ImageUri string `json:"imageUri,omitempty"` 316 // Labels: Labels to associate with the action. This field is provided to 317 // assist workflow engine authors in identifying actions (for example, to 318 // indicate what sort of action they perform, such as localization or 319 // debugging). They are returned in the operation metadata, but are otherwise 320 // ignored. 321 Labels map[string]string `json:"labels,omitempty"` 322 // Mounts: A list of mounts to make available to the action. In addition to the 323 // values specified here, every action has a special virtual disk mounted under 324 // `/google` that contains log files and other operational components. - 325 // /google/logs All logs written during the pipeline execution. - 326 // /google/logs/output The combined standard output and standard error of all 327 // actions run as part of the pipeline execution. - 328 // /google/logs/action/*/stdout The complete contents of each individual 329 // action's standard output. - /google/logs/action/*/stderr The complete 330 // contents of each individual action's standard error output. 331 Mounts []*Mount `json:"mounts,omitempty"` 332 // PidNamespace: An optional identifier for a PID namespace to run the action 333 // inside. Multiple actions should use the same string to share a namespace. If 334 // unspecified, a separate isolated namespace is used. 335 PidNamespace string `json:"pidNamespace,omitempty"` 336 // PortMappings: A map of containers to host port mappings for this container. 337 // If the container already specifies exposed ports, use the 338 // `PUBLISH_EXPOSED_PORTS` flag instead. The host port number must be less than 339 // 65536. If it is zero, an unused random port is assigned. To determine the 340 // resulting port number, consult the `ContainerStartedEvent` in the operation 341 // metadata. 342 PortMappings map[string]int64 `json:"portMappings,omitempty"` 343 // PublishExposedPorts: Exposes all ports specified by `EXPOSE` statements in 344 // the container. To discover the host side port numbers, consult the 345 // `ACTION_STARTED` event in the operation metadata. 346 PublishExposedPorts bool `json:"publishExposedPorts,omitempty"` 347 // RunInBackground: This flag allows an action to continue running in the 348 // background while executing subsequent actions. This is useful to provide 349 // services to other actions (or to provide debugging support tools like SSH 350 // servers). 351 RunInBackground bool `json:"runInBackground,omitempty"` 352 // Timeout: The maximum amount of time to give the action to complete. If the 353 // action fails to complete before the timeout, it will be terminated and the 354 // exit status will be non-zero. The pipeline will continue or terminate based 355 // on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. 356 Timeout string `json:"timeout,omitempty"` 357 // ForceSendFields is a list of field names (e.g. "AlwaysRun") to 358 // unconditionally include in API requests. By default, fields with empty or 359 // default values are omitted from API requests. See 360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 361 // details. 362 ForceSendFields []string `json:"-"` 363 // NullFields is a list of field names (e.g. "AlwaysRun") to include in API 364 // requests with the JSON null value. By default, fields with empty values are 365 // omitted from API requests. See 366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 367 NullFields []string `json:"-"` 368 } 369 370 func (s *Action) MarshalJSON() ([]byte, error) { 371 type NoMethod Action 372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 373 } 374 375 // CancelOperationRequest: The request message for Operations.CancelOperation. 376 type CancelOperationRequest struct { 377 } 378 379 // ContainerKilledEvent: An event generated when a container is forcibly 380 // terminated by the worker. Currently, this only occurs when the container 381 // outlives the timeout specified by the user. 382 type ContainerKilledEvent struct { 383 // ActionId: The numeric ID of the action that started the container. 384 ActionId int64 `json:"actionId,omitempty"` 385 // ForceSendFields is a list of field names (e.g. "ActionId") 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. "ActionId") 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 *ContainerKilledEvent) MarshalJSON() ([]byte, error) { 399 type NoMethod ContainerKilledEvent 400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 401 } 402 403 // ContainerStartedEvent: An event generated when a container starts. 404 type ContainerStartedEvent struct { 405 // ActionId: The numeric ID of the action that started this container. 406 ActionId int64 `json:"actionId,omitempty"` 407 // IpAddress: The public IP address that can be used to connect to the 408 // container. This field is only populated when at least one port mapping is 409 // present. If the instance was created with a private address, this field will 410 // be empty even if port mappings exist. 411 IpAddress string `json:"ipAddress,omitempty"` 412 // PortMappings: The container-to-host port mappings installed for this 413 // container. This set will contain any ports exposed using the 414 // `PUBLISH_EXPOSED_PORTS` flag as well as any specified in the `Action` 415 // definition. 416 PortMappings map[string]int64 `json:"portMappings,omitempty"` 417 // ForceSendFields is a list of field names (e.g. "ActionId") to 418 // unconditionally include in API requests. By default, fields with empty or 419 // default values are omitted from API requests. See 420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 421 // details. 422 ForceSendFields []string `json:"-"` 423 // NullFields is a list of field names (e.g. "ActionId") to include in API 424 // requests with the JSON null value. By default, fields with empty values are 425 // omitted from API requests. See 426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 427 NullFields []string `json:"-"` 428 } 429 430 func (s *ContainerStartedEvent) MarshalJSON() ([]byte, error) { 431 type NoMethod ContainerStartedEvent 432 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 433 } 434 435 // ContainerStoppedEvent: An event generated when a container exits. 436 type ContainerStoppedEvent struct { 437 // ActionId: The numeric ID of the action that started this container. 438 ActionId int64 `json:"actionId,omitempty"` 439 // ExitStatus: The exit status of the container. 440 ExitStatus int64 `json:"exitStatus,omitempty"` 441 // Stderr: The tail end of any content written to standard error by the 442 // container. If the content emits large amounts of debugging noise or contains 443 // sensitive information, you can prevent the content from being printed by 444 // setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. Note that only a small 445 // amount of the end of the stream is captured here. The entire stream is 446 // stored in the `/google/logs` directory mounted into each action, and can be 447 // copied off the machine as described elsewhere. 448 Stderr string `json:"stderr,omitempty"` 449 // ForceSendFields is a list of field names (e.g. "ActionId") to 450 // unconditionally include in API requests. By default, fields with empty or 451 // default values are omitted from API requests. See 452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 453 // details. 454 ForceSendFields []string `json:"-"` 455 // NullFields is a list of field names (e.g. "ActionId") to include in API 456 // requests with the JSON null value. By default, fields with empty values are 457 // omitted from API requests. See 458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 459 NullFields []string `json:"-"` 460 } 461 462 func (s *ContainerStoppedEvent) MarshalJSON() ([]byte, error) { 463 type NoMethod ContainerStoppedEvent 464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 465 } 466 467 // DelayedEvent: An event generated whenever a resource limitation or transient 468 // error delays execution of a pipeline that was otherwise ready to run. 469 type DelayedEvent struct { 470 // Cause: A textual description of the cause of the delay. The string can 471 // change without notice because it is often generated by another service (such 472 // as Compute Engine). 473 Cause string `json:"cause,omitempty"` 474 // Metrics: If the delay was caused by a resource shortage, this field lists 475 // the Compute Engine metrics that are preventing this operation from running 476 // (for example, `CPUS` or `INSTANCES`). If the particular metric is not known, 477 // a single `UNKNOWN` metric will be present. 478 Metrics []string `json:"metrics,omitempty"` 479 // ForceSendFields is a list of field names (e.g. "Cause") to unconditionally 480 // include in API requests. By default, fields with empty or default values are 481 // omitted from API requests. See 482 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 483 // details. 484 ForceSendFields []string `json:"-"` 485 // NullFields is a list of field names (e.g. "Cause") to include in API 486 // requests with the JSON null value. By default, fields with empty values are 487 // omitted from API requests. See 488 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 489 NullFields []string `json:"-"` 490 } 491 492 func (s *DelayedEvent) MarshalJSON() ([]byte, error) { 493 type NoMethod DelayedEvent 494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 495 } 496 497 // Disk: Carries information about a disk that can be attached to a VM. See 498 // https://cloud.google.com/compute/docs/disks/performance for more information 499 // about disk type, size, and performance considerations. Specify either 500 // `Volume` or `Disk`, but not both. 501 type Disk struct { 502 // Name: A user-supplied name for the disk. Used when mounting the disk into 503 // actions. The name must contain only upper and lowercase alphanumeric 504 // characters and hyphens and cannot start with a hyphen. 505 Name string `json:"name,omitempty"` 506 // SizeGb: The size, in GB, of the disk to attach. If the size is not 507 // specified, a default is chosen to ensure reasonable I/O performance. If the 508 // disk type is specified as `local-ssd`, multiple local drives are 509 // automatically combined to provide the requested size. Note, however, that 510 // each physical SSD is 375GB in size, and no more than 8 drives can be 511 // attached to a single instance. 512 SizeGb int64 `json:"sizeGb,omitempty"` 513 // SourceImage: An optional image to put on the disk before attaching it to the 514 // VM. 515 SourceImage string `json:"sourceImage,omitempty"` 516 // Type: The Compute Engine disk type. If unspecified, `pd-standard` is used. 517 Type string `json:"type,omitempty"` 518 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 519 // include in API requests. By default, fields with empty or default values are 520 // omitted from API requests. See 521 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 522 // details. 523 ForceSendFields []string `json:"-"` 524 // NullFields is a list of field names (e.g. "Name") to include in API requests 525 // with the JSON null value. By default, fields with empty values are omitted 526 // from API requests. See 527 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 528 NullFields []string `json:"-"` 529 } 530 531 func (s *Disk) MarshalJSON() ([]byte, error) { 532 type NoMethod Disk 533 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 534 } 535 536 // Empty: A generic empty message that you can re-use to avoid defining 537 // duplicated empty messages in your APIs. A typical example is to use it as 538 // the request or the response type of an API method. For instance: service Foo 539 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 540 type Empty struct { 541 // ServerResponse contains the HTTP response code and headers from the server. 542 googleapi.ServerResponse `json:"-"` 543 } 544 545 // Event: Carries information about events that occur during pipeline 546 // execution. 547 type Event struct { 548 // ContainerKilled: See google.cloud.lifesciences.v2beta.ContainerKilledEvent. 549 ContainerKilled *ContainerKilledEvent `json:"containerKilled,omitempty"` 550 // ContainerStarted: See 551 // google.cloud.lifesciences.v2beta.ContainerStartedEvent. 552 ContainerStarted *ContainerStartedEvent `json:"containerStarted,omitempty"` 553 // ContainerStopped: See 554 // google.cloud.lifesciences.v2beta.ContainerStoppedEvent. 555 ContainerStopped *ContainerStoppedEvent `json:"containerStopped,omitempty"` 556 // Delayed: See google.cloud.lifesciences.v2beta.DelayedEvent. 557 Delayed *DelayedEvent `json:"delayed,omitempty"` 558 // Description: A human-readable description of the event. Note that these 559 // strings can change at any time without notice. Any application logic must 560 // use the information in the `details` field. 561 Description string `json:"description,omitempty"` 562 // Failed: See google.cloud.lifesciences.v2beta.FailedEvent. 563 Failed *FailedEvent `json:"failed,omitempty"` 564 // PullStarted: See google.cloud.lifesciences.v2beta.PullStartedEvent. 565 PullStarted *PullStartedEvent `json:"pullStarted,omitempty"` 566 // PullStopped: See google.cloud.lifesciences.v2beta.PullStoppedEvent. 567 PullStopped *PullStoppedEvent `json:"pullStopped,omitempty"` 568 // Timestamp: The time at which the event occurred. 569 Timestamp string `json:"timestamp,omitempty"` 570 // UnexpectedExitStatus: See 571 // google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent. 572 UnexpectedExitStatus *UnexpectedExitStatusEvent `json:"unexpectedExitStatus,omitempty"` 573 // WorkerAssigned: See google.cloud.lifesciences.v2beta.WorkerAssignedEvent. 574 WorkerAssigned *WorkerAssignedEvent `json:"workerAssigned,omitempty"` 575 // WorkerReleased: See google.cloud.lifesciences.v2beta.WorkerReleasedEvent. 576 WorkerReleased *WorkerReleasedEvent `json:"workerReleased,omitempty"` 577 // ForceSendFields is a list of field names (e.g. "ContainerKilled") to 578 // unconditionally include in API requests. By default, fields with empty or 579 // default values are omitted from API requests. See 580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 581 // details. 582 ForceSendFields []string `json:"-"` 583 // NullFields is a list of field names (e.g. "ContainerKilled") to include in 584 // API requests with the JSON null value. By default, fields with empty values 585 // are omitted from API requests. See 586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 587 NullFields []string `json:"-"` 588 } 589 590 func (s *Event) MarshalJSON() ([]byte, error) { 591 type NoMethod Event 592 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 593 } 594 595 // ExistingDisk: Configuration for an existing disk to be attached to the VM. 596 type ExistingDisk struct { 597 // Disk: If `disk` contains slashes, the Cloud Life Sciences API assumes that 598 // it is a complete URL for the disk. If `disk` does not contain slashes, the 599 // Cloud Life Sciences API assumes that the disk is a zonal disk and a URL will 600 // be generated of the form `zones//disks/`, where `` is the zone in which the 601 // instance is allocated. The disk must be ext4 formatted. If all `Mount` 602 // references to this disk have the `read_only` flag set to true, the disk will 603 // be attached in `read-only` mode and can be shared with other instances. 604 // Otherwise, the disk will be available for writing but cannot be shared. 605 Disk string `json:"disk,omitempty"` 606 // ForceSendFields is a list of field names (e.g. "Disk") to unconditionally 607 // include in API requests. By default, fields with empty or default values are 608 // omitted from API requests. See 609 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 610 // details. 611 ForceSendFields []string `json:"-"` 612 // NullFields is a list of field names (e.g. "Disk") to include in API requests 613 // with the JSON null value. By default, fields with empty values are omitted 614 // from API requests. See 615 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 616 NullFields []string `json:"-"` 617 } 618 619 func (s *ExistingDisk) MarshalJSON() ([]byte, error) { 620 type NoMethod ExistingDisk 621 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 622 } 623 624 // FailedEvent: An event generated when the execution of a pipeline has failed. 625 // Note that other events can continue to occur after this event. 626 type FailedEvent struct { 627 // Cause: The human-readable description of the cause of the failure. 628 Cause string `json:"cause,omitempty"` 629 // Code: The Google standard error code that best describes this failure. 630 // 631 // Possible values: 632 // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK 633 // "CANCELLED" - The operation was cancelled, typically by the caller. HTTP 634 // Mapping: 499 Client Closed Request 635 // "UNKNOWN" - Unknown error. For example, this error may be returned when a 636 // `Status` value received from another address space belongs to an error space 637 // that is not known in this address space. Also errors raised by APIs that do 638 // not return enough error information may be converted to this error. HTTP 639 // Mapping: 500 Internal Server Error 640 // "INVALID_ARGUMENT" - The client specified an invalid argument. Note that 641 // this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates 642 // arguments that are problematic regardless of the state of the system (e.g., 643 // a malformed file name). HTTP Mapping: 400 Bad Request 644 // "DEADLINE_EXCEEDED" - The deadline expired before the operation could 645 // complete. For operations that change the state of the system, this error may 646 // be returned even if the operation has completed successfully. For example, a 647 // successful response from a server could have been delayed long enough for 648 // the deadline to expire. HTTP Mapping: 504 Gateway Timeout 649 // "NOT_FOUND" - Some requested entity (e.g., file or directory) was not 650 // found. Note to server developers: if a request is denied for an entire class 651 // of users, such as gradual feature rollout or undocumented allowlist, 652 // `NOT_FOUND` may be used. If a request is denied for some users within a 653 // class of users, such as user-based access control, `PERMISSION_DENIED` must 654 // be used. HTTP Mapping: 404 Not Found 655 // "ALREADY_EXISTS" - The entity that a client attempted to create (e.g., 656 // file or directory) already exists. HTTP Mapping: 409 Conflict 657 // "PERMISSION_DENIED" - The caller does not have permission to execute the 658 // specified operation. `PERMISSION_DENIED` must not be used for rejections 659 // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for 660 // those errors). `PERMISSION_DENIED` must not be used if the caller can not be 661 // identified (use `UNAUTHENTICATED` instead for those errors). This error code 662 // does not imply the request is valid or the requested entity exists or 663 // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden 664 // "UNAUTHENTICATED" - The request does not have valid authentication 665 // credentials for the operation. HTTP Mapping: 401 Unauthorized 666 // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a 667 // per-user quota, or perhaps the entire file system is out of space. HTTP 668 // Mapping: 429 Too Many Requests 669 // "FAILED_PRECONDITION" - The operation was rejected because the system is 670 // not in a state required for the operation's execution. For example, the 671 // directory to be deleted is non-empty, an rmdir operation is applied to a 672 // non-directory, etc. Service implementors can use the following guidelines to 673 // decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use 674 // `UNAVAILABLE` if the client can retry just the failing call. (b) Use 675 // `ABORTED` if the client should retry at a higher level. For example, when a 676 // client-specified test-and-set fails, indicating the client should restart a 677 // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client 678 // should not retry until the system state has been explicitly fixed. For 679 // example, if an "rmdir" fails because the directory is non-empty, 680 // `FAILED_PRECONDITION` should be returned since the client should not retry 681 // unless the files are deleted from the directory. HTTP Mapping: 400 Bad 682 // Request 683 // "ABORTED" - The operation was aborted, typically due to a concurrency 684 // issue such as a sequencer check failure or transaction abort. See the 685 // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and 686 // `UNAVAILABLE`. HTTP Mapping: 409 Conflict 687 // "OUT_OF_RANGE" - The operation was attempted past the valid range. E.g., 688 // seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error 689 // indicates a problem that may be fixed if the system state changes. For 690 // example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to 691 // read at an offset that is not in the range [0,2^32-1], but it will generate 692 // `OUT_OF_RANGE` if asked to read from an offset past the current file size. 693 // There is a fair bit of overlap between `FAILED_PRECONDITION` and 694 // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) 695 // when it applies so that callers who are iterating through a space can easily 696 // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 697 // 400 Bad Request 698 // "UNIMPLEMENTED" - The operation is not implemented or is not 699 // supported/enabled in this service. HTTP Mapping: 501 Not Implemented 700 // "INTERNAL" - Internal errors. This means that some invariants expected by 701 // the underlying system have been broken. This error code is reserved for 702 // serious errors. HTTP Mapping: 500 Internal Server Error 703 // "UNAVAILABLE" - The service is currently unavailable. This is most likely 704 // a transient condition, which can be corrected by retrying with a backoff. 705 // Note that it is not always safe to retry non-idempotent operations. See the 706 // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and 707 // `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable 708 // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: 500 709 // Internal Server Error 710 Code string `json:"code,omitempty"` 711 // ForceSendFields is a list of field names (e.g. "Cause") to unconditionally 712 // include in API requests. By default, fields with empty or default values are 713 // omitted from API requests. See 714 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 715 // details. 716 ForceSendFields []string `json:"-"` 717 // NullFields is a list of field names (e.g. "Cause") to include in API 718 // requests with the JSON null value. By default, fields with empty values are 719 // omitted from API requests. See 720 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 721 NullFields []string `json:"-"` 722 } 723 724 func (s *FailedEvent) MarshalJSON() ([]byte, error) { 725 type NoMethod FailedEvent 726 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 727 } 728 729 // ListLocationsResponse: The response message for Locations.ListLocations. 730 type ListLocationsResponse struct { 731 // Locations: A list of locations that matches the specified filter in the 732 // request. 733 Locations []*Location `json:"locations,omitempty"` 734 // NextPageToken: The standard List next-page token. 735 NextPageToken string `json:"nextPageToken,omitempty"` 736 737 // ServerResponse contains the HTTP response code and headers from the server. 738 googleapi.ServerResponse `json:"-"` 739 // ForceSendFields is a list of field names (e.g. "Locations") to 740 // unconditionally include in API requests. By default, fields with empty or 741 // default values are omitted from API requests. See 742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 743 // details. 744 ForceSendFields []string `json:"-"` 745 // NullFields is a list of field names (e.g. "Locations") to include in API 746 // requests with the JSON null value. By default, fields with empty values are 747 // omitted from API requests. See 748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 749 NullFields []string `json:"-"` 750 } 751 752 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 753 type NoMethod ListLocationsResponse 754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 755 } 756 757 // ListOperationsResponse: The response message for Operations.ListOperations. 758 type ListOperationsResponse struct { 759 // NextPageToken: The standard List next-page token. 760 NextPageToken string `json:"nextPageToken,omitempty"` 761 // Operations: A list of operations that matches the specified filter in the 762 // request. 763 Operations []*Operation `json:"operations,omitempty"` 764 765 // ServerResponse contains the HTTP response code and headers from the server. 766 googleapi.ServerResponse `json:"-"` 767 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 768 // unconditionally include in API requests. By default, fields with empty or 769 // default values are omitted from API requests. See 770 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 771 // details. 772 ForceSendFields []string `json:"-"` 773 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 774 // requests with the JSON null value. By default, fields with empty values are 775 // omitted from API requests. See 776 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 777 NullFields []string `json:"-"` 778 } 779 780 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 781 type NoMethod ListOperationsResponse 782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 783 } 784 785 // Location: A resource that represents a Google Cloud location. 786 type Location struct { 787 // DisplayName: The friendly name for this location, typically a nearby city 788 // name. For example, "Tokyo". 789 DisplayName string `json:"displayName,omitempty"` 790 // Labels: Cross-service attributes for the location. For example 791 // {"cloud.googleapis.com/region": "us-east1"} 792 Labels map[string]string `json:"labels,omitempty"` 793 // LocationId: The canonical id for this location. For example: "us-east1". 794 LocationId string `json:"locationId,omitempty"` 795 // Metadata: Service-specific metadata. For example the available capacity at 796 // the given location. 797 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 798 // Name: Resource name for the location, which may vary between 799 // implementations. For example: 800 // "projects/example-project/locations/us-east1" 801 Name string `json:"name,omitempty"` 802 803 // ServerResponse contains the HTTP response code and headers from the server. 804 googleapi.ServerResponse `json:"-"` 805 // ForceSendFields is a list of field names (e.g. "DisplayName") to 806 // unconditionally include in API requests. By default, fields with empty or 807 // default values are omitted from API requests. See 808 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 809 // details. 810 ForceSendFields []string `json:"-"` 811 // NullFields is a list of field names (e.g. "DisplayName") to include in API 812 // requests with the JSON null value. By default, fields with empty values are 813 // omitted from API requests. See 814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 815 NullFields []string `json:"-"` 816 } 817 818 func (s *Location) MarshalJSON() ([]byte, error) { 819 type NoMethod Location 820 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 821 } 822 823 // Metadata: Carries information about the pipeline execution that is returned 824 // in the long running operation's metadata field. 825 type Metadata struct { 826 // CreateTime: The time at which the operation was created by the API. 827 CreateTime string `json:"createTime,omitempty"` 828 // EndTime: The time at which execution was completed and resources were 829 // cleaned up. 830 EndTime string `json:"endTime,omitempty"` 831 // Events: The list of events that have happened so far during the execution of 832 // this operation. 833 Events []*Event `json:"events,omitempty"` 834 // Labels: The user-defined labels associated with this operation. 835 Labels map[string]string `json:"labels,omitempty"` 836 // Pipeline: The pipeline this operation represents. 837 Pipeline *Pipeline `json:"pipeline,omitempty"` 838 // PubSubTopic: The name of the Cloud Pub/Sub topic where notifications of 839 // operation status changes are sent. 840 PubSubTopic string `json:"pubSubTopic,omitempty"` 841 // StartTime: The first time at which resources were allocated to execute the 842 // pipeline. 843 StartTime string `json:"startTime,omitempty"` 844 // ForceSendFields is a list of field names (e.g. "CreateTime") to 845 // unconditionally include in API requests. By default, fields with empty or 846 // default values are omitted from API requests. See 847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 848 // details. 849 ForceSendFields []string `json:"-"` 850 // NullFields is a list of field names (e.g. "CreateTime") to include in API 851 // requests with the JSON null value. By default, fields with empty values are 852 // omitted from API requests. See 853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 854 NullFields []string `json:"-"` 855 } 856 857 func (s *Metadata) MarshalJSON() ([]byte, error) { 858 type NoMethod Metadata 859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 860 } 861 862 // Mount: Carries information about a particular disk mount inside a container. 863 type Mount struct { 864 // Disk: The name of the disk to mount, as specified in the resources section. 865 Disk string `json:"disk,omitempty"` 866 // Path: The path to mount the disk inside the container. 867 Path string `json:"path,omitempty"` 868 // ReadOnly: If true, the disk is mounted read-only inside the container. 869 ReadOnly bool `json:"readOnly,omitempty"` 870 // ForceSendFields is a list of field names (e.g. "Disk") to unconditionally 871 // include in API requests. By default, fields with empty or default values are 872 // omitted from API requests. See 873 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 874 // details. 875 ForceSendFields []string `json:"-"` 876 // NullFields is a list of field names (e.g. "Disk") to include in API requests 877 // with the JSON null value. By default, fields with empty values are omitted 878 // from API requests. See 879 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 880 NullFields []string `json:"-"` 881 } 882 883 func (s *Mount) MarshalJSON() ([]byte, error) { 884 type NoMethod Mount 885 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 886 } 887 888 // NFSMount: Configuration for an `NFSMount` to be attached to the VM. 889 type NFSMount struct { 890 // Target: A target NFS mount. The target must be specified as 891 // `address:/mount". 892 Target string `json:"target,omitempty"` 893 // ForceSendFields is a list of field names (e.g. "Target") to unconditionally 894 // include in API requests. By default, fields with empty or default values are 895 // omitted from API requests. See 896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 897 // details. 898 ForceSendFields []string `json:"-"` 899 // NullFields is a list of field names (e.g. "Target") to include in API 900 // requests with the JSON null value. By default, fields with empty values are 901 // omitted from API requests. See 902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 903 NullFields []string `json:"-"` 904 } 905 906 func (s *NFSMount) MarshalJSON() ([]byte, error) { 907 type NoMethod NFSMount 908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 909 } 910 911 // Network: VM networking options. 912 type Network struct { 913 // Network: The network name to attach the VM's network interface to. The value 914 // will be prefixed with `global/networks/` unless it contains a `/`, in which 915 // case it is assumed to be a fully specified network resource URL. If 916 // unspecified, the global default network is used. 917 Network string `json:"network,omitempty"` 918 // Subnetwork: If the specified network is configured for custom subnet 919 // creation, the name of the subnetwork to attach the instance to must be 920 // specified here. The value is prefixed with `regions/*/subnetworks/` unless 921 // it contains a `/`, in which case it is assumed to be a fully specified 922 // subnetwork resource URL. If the `*` character appears in the value, it is 923 // replaced with the region that the virtual machine has been allocated in. 924 Subnetwork string `json:"subnetwork,omitempty"` 925 // UsePrivateAddress: If set to true, do not attach a public IP address to the 926 // VM. Note that without a public IP address, additional configuration is 927 // required to allow the VM to access Google services. See 928 // https://cloud.google.com/vpc/docs/configure-private-google-access for more 929 // information. 930 UsePrivateAddress bool `json:"usePrivateAddress,omitempty"` 931 // ForceSendFields is a list of field names (e.g. "Network") to unconditionally 932 // include in API requests. By default, fields with empty or default values are 933 // omitted from API requests. See 934 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 935 // details. 936 ForceSendFields []string `json:"-"` 937 // NullFields is a list of field names (e.g. "Network") to include in API 938 // requests with the JSON null value. By default, fields with empty values are 939 // omitted from API requests. See 940 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 941 NullFields []string `json:"-"` 942 } 943 944 func (s *Network) MarshalJSON() ([]byte, error) { 945 type NoMethod Network 946 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 947 } 948 949 // Operation: This resource represents a long-running operation that is the 950 // result of a network API call. 951 type Operation struct { 952 // Done: If the value is `false`, it means the operation is still in progress. 953 // If `true`, the operation is completed, and either `error` or `response` is 954 // available. 955 Done bool `json:"done,omitempty"` 956 // Error: The error result of the operation in case of failure or cancellation. 957 Error *Status `json:"error,omitempty"` 958 // Metadata: An Metadata object. This will always be returned with the 959 // Operation. 960 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 961 // Name: The server-assigned name for the operation. This may be passed to the 962 // other operation methods to retrieve information about the operation's 963 // status. 964 Name string `json:"name,omitempty"` 965 // Response: An Empty object. 966 Response googleapi.RawMessage `json:"response,omitempty"` 967 968 // ServerResponse contains the HTTP response code and headers from the server. 969 googleapi.ServerResponse `json:"-"` 970 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 971 // include in API requests. By default, fields with empty or default values are 972 // omitted from API requests. See 973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 974 // details. 975 ForceSendFields []string `json:"-"` 976 // NullFields is a list of field names (e.g. "Done") to include in API requests 977 // with the JSON null value. By default, fields with empty values are omitted 978 // from API requests. See 979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 980 NullFields []string `json:"-"` 981 } 982 983 func (s *Operation) MarshalJSON() ([]byte, error) { 984 type NoMethod Operation 985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 986 } 987 988 // PersistentDisk: Configuration for a persistent disk to be attached to the 989 // VM. See https://cloud.google.com/compute/docs/disks/performance for more 990 // information about disk type, size, and performance considerations. 991 type PersistentDisk struct { 992 // SizeGb: The size, in GB, of the disk to attach. If the size is not 993 // specified, a default is chosen to ensure reasonable I/O performance. If the 994 // disk type is specified as `local-ssd`, multiple local drives are 995 // automatically combined to provide the requested size. Note, however, that 996 // each physical SSD is 375GB in size, and no more than 8 drives can be 997 // attached to a single instance. 998 SizeGb int64 `json:"sizeGb,omitempty"` 999 // SourceImage: An image to put on the disk before attaching it to the VM. 1000 SourceImage string `json:"sourceImage,omitempty"` 1001 // Type: The Compute Engine disk type. If unspecified, `pd-standard` is used. 1002 Type string `json:"type,omitempty"` 1003 // ForceSendFields is a list of field names (e.g. "SizeGb") to unconditionally 1004 // include in API requests. By default, fields with empty or default values are 1005 // omitted from API requests. See 1006 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1007 // details. 1008 ForceSendFields []string `json:"-"` 1009 // NullFields is a list of field names (e.g. "SizeGb") to include in API 1010 // requests with the JSON null value. By default, fields with empty values are 1011 // omitted from API requests. See 1012 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1013 NullFields []string `json:"-"` 1014 } 1015 1016 func (s *PersistentDisk) MarshalJSON() ([]byte, error) { 1017 type NoMethod PersistentDisk 1018 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1019 } 1020 1021 // Pipeline: Specifies a series of actions to execute, expressed as Docker 1022 // containers. 1023 type Pipeline struct { 1024 // Actions: The list of actions to execute, in the order they are specified. 1025 Actions []*Action `json:"actions,omitempty"` 1026 // EncryptedEnvironment: The encrypted environment to pass into every action. 1027 // Each action can also specify its own encrypted environment. The secret must 1028 // decrypt to a JSON-encoded dictionary where key-value pairs serve as 1029 // environment variable names and their values. The decoded environment 1030 // variables can overwrite the values specified by the `environment` field. 1031 EncryptedEnvironment *Secret `json:"encryptedEnvironment,omitempty"` 1032 // Environment: The environment to pass into every action. Each action can also 1033 // specify additional environment variables but cannot delete an entry from 1034 // this map (though they can overwrite it with a different value). 1035 Environment map[string]string `json:"environment,omitempty"` 1036 // Resources: The resources required for execution. 1037 Resources *Resources `json:"resources,omitempty"` 1038 // Timeout: The maximum amount of time to give the pipeline to complete. This 1039 // includes the time spent waiting for a worker to be allocated. If the 1040 // pipeline fails to complete before the timeout, it will be cancelled and the 1041 // error code will be set to DEADLINE_EXCEEDED. If unspecified, it will default 1042 // to 7 days. 1043 Timeout string `json:"timeout,omitempty"` 1044 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally 1045 // include in API requests. By default, fields with empty or default values are 1046 // omitted from API requests. See 1047 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1048 // details. 1049 ForceSendFields []string `json:"-"` 1050 // NullFields is a list of field names (e.g. "Actions") to include in API 1051 // requests with the JSON null value. By default, fields with empty values are 1052 // omitted from API requests. See 1053 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1054 NullFields []string `json:"-"` 1055 } 1056 1057 func (s *Pipeline) MarshalJSON() ([]byte, error) { 1058 type NoMethod Pipeline 1059 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1060 } 1061 1062 // PullStartedEvent: An event generated when the worker starts pulling an 1063 // image. 1064 type PullStartedEvent struct { 1065 // ImageUri: The URI of the image that was pulled. 1066 ImageUri string `json:"imageUri,omitempty"` 1067 // ForceSendFields is a list of field names (e.g. "ImageUri") to 1068 // unconditionally include in API requests. By default, fields with empty or 1069 // default values are omitted from API requests. See 1070 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1071 // details. 1072 ForceSendFields []string `json:"-"` 1073 // NullFields is a list of field names (e.g. "ImageUri") to include in API 1074 // requests with the JSON null value. By default, fields with empty values are 1075 // omitted from API requests. See 1076 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1077 NullFields []string `json:"-"` 1078 } 1079 1080 func (s *PullStartedEvent) MarshalJSON() ([]byte, error) { 1081 type NoMethod PullStartedEvent 1082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1083 } 1084 1085 // PullStoppedEvent: An event generated when the worker stops pulling an image. 1086 type PullStoppedEvent struct { 1087 // ImageUri: The URI of the image that was pulled. 1088 ImageUri string `json:"imageUri,omitempty"` 1089 // ForceSendFields is a list of field names (e.g. "ImageUri") to 1090 // unconditionally include in API requests. By default, fields with empty or 1091 // default values are omitted from API requests. See 1092 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1093 // details. 1094 ForceSendFields []string `json:"-"` 1095 // NullFields is a list of field names (e.g. "ImageUri") to include in API 1096 // requests with the JSON null value. By default, fields with empty values are 1097 // omitted from API requests. See 1098 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1099 NullFields []string `json:"-"` 1100 } 1101 1102 func (s *PullStoppedEvent) MarshalJSON() ([]byte, error) { 1103 type NoMethod PullStoppedEvent 1104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1105 } 1106 1107 // Resources: The system resources for the pipeline run. At least one zone or 1108 // region must be specified or the pipeline run will fail. 1109 type Resources struct { 1110 // Regions: The list of regions allowed for VM allocation. If set, the `zones` 1111 // field must not be set. 1112 Regions []string `json:"regions,omitempty"` 1113 // VirtualMachine: The virtual machine specification. 1114 VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"` 1115 // Zones: The list of zones allowed for VM allocation. If set, the `regions` 1116 // field must not be set. 1117 Zones []string `json:"zones,omitempty"` 1118 // ForceSendFields is a list of field names (e.g. "Regions") to unconditionally 1119 // include in API requests. By default, fields with empty or default values are 1120 // omitted from API requests. See 1121 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1122 // details. 1123 ForceSendFields []string `json:"-"` 1124 // NullFields is a list of field names (e.g. "Regions") to include in API 1125 // requests with the JSON null value. By default, fields with empty values are 1126 // omitted from API requests. See 1127 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1128 NullFields []string `json:"-"` 1129 } 1130 1131 func (s *Resources) MarshalJSON() ([]byte, error) { 1132 type NoMethod Resources 1133 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1134 } 1135 1136 // RunPipelineRequest: The arguments to the `RunPipeline` method. The 1137 // requesting user must have the `iam.serviceAccounts.actAs` permission for the 1138 // Cloud Life Sciences service account or the request will fail. 1139 type RunPipelineRequest struct { 1140 // Labels: User-defined labels to associate with the returned operation. These 1141 // labels are not propagated to any Google Cloud Platform resources used by the 1142 // operation, and can be modified at any time. To associate labels with 1143 // resources created while executing the operation, see the appropriate 1144 // resource message (for example, `VirtualMachine`). 1145 Labels map[string]string `json:"labels,omitempty"` 1146 // Pipeline: Required. The description of the pipeline to run. 1147 Pipeline *Pipeline `json:"pipeline,omitempty"` 1148 // PubSubTopic: The name of an existing Pub/Sub topic. The server will publish 1149 // messages to this topic whenever the status of the operation changes. The 1150 // Life Sciences Service Agent account must have publisher permissions to the 1151 // specified topic or notifications will not be sent. 1152 PubSubTopic string `json:"pubSubTopic,omitempty"` 1153 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally 1154 // include in API requests. By default, fields with empty or default values are 1155 // omitted from API requests. See 1156 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1157 // details. 1158 ForceSendFields []string `json:"-"` 1159 // NullFields is a list of field names (e.g. "Labels") to include in API 1160 // requests with the JSON null value. By default, fields with empty values are 1161 // omitted from API requests. See 1162 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1163 NullFields []string `json:"-"` 1164 } 1165 1166 func (s *RunPipelineRequest) MarshalJSON() ([]byte, error) { 1167 type NoMethod RunPipelineRequest 1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1169 } 1170 1171 // RunPipelineResponse: The response to the RunPipeline method, returned in the 1172 // operation's result field on success. 1173 type RunPipelineResponse struct { 1174 } 1175 1176 // Secret: Holds encrypted information that is only decrypted and stored in RAM 1177 // by the worker VM when running the pipeline. 1178 type Secret struct { 1179 // CipherText: The value of the cipherText response from the `encrypt` method. 1180 // This field is intentionally unaudited. 1181 CipherText string `json:"cipherText,omitempty"` 1182 // KeyName: The name of the Cloud KMS key that will be used to decrypt the 1183 // secret value. The VM service account must have the required permissions and 1184 // authentication scopes to invoke the `decrypt` method on the specified key. 1185 KeyName string `json:"keyName,omitempty"` 1186 // ForceSendFields is a list of field names (e.g. "CipherText") to 1187 // unconditionally include in API requests. By default, fields with empty or 1188 // default values are omitted from API requests. See 1189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1190 // details. 1191 ForceSendFields []string `json:"-"` 1192 // NullFields is a list of field names (e.g. "CipherText") to include in API 1193 // requests with the JSON null value. By default, fields with empty values are 1194 // omitted from API requests. See 1195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1196 NullFields []string `json:"-"` 1197 } 1198 1199 func (s *Secret) MarshalJSON() ([]byte, error) { 1200 type NoMethod Secret 1201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1202 } 1203 1204 // ServiceAccount: Carries information about a Google Cloud service account. 1205 type ServiceAccount struct { 1206 // Email: Email address of the service account. If not specified, the default 1207 // Compute Engine service account for the project will be used. 1208 Email string `json:"email,omitempty"` 1209 // Scopes: List of scopes to be enabled for this service account on the VM, in 1210 // addition to the cloud-platform API scope that will be added by default. 1211 Scopes []string `json:"scopes,omitempty"` 1212 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 1213 // include in API requests. By default, fields with empty or default values are 1214 // omitted from API requests. See 1215 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1216 // details. 1217 ForceSendFields []string `json:"-"` 1218 // NullFields is a list of field names (e.g. "Email") to include in API 1219 // requests with the JSON null value. By default, fields with empty values are 1220 // omitted from API requests. See 1221 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1222 NullFields []string `json:"-"` 1223 } 1224 1225 func (s *ServiceAccount) MarshalJSON() ([]byte, error) { 1226 type NoMethod ServiceAccount 1227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1228 } 1229 1230 // Status: The `Status` type defines a logical error model that is suitable for 1231 // different programming environments, including REST APIs and RPC APIs. It is 1232 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 1233 // pieces of data: error code, error message, and error details. You can find 1234 // out more about this error model and how to work with it in the API Design 1235 // Guide (https://cloud.google.com/apis/design/errors). 1236 type Status struct { 1237 // Code: The status code, which should be an enum value of google.rpc.Code. 1238 Code int64 `json:"code,omitempty"` 1239 // Details: A list of messages that carry the error details. There is a common 1240 // set of message types for APIs to use. 1241 Details []googleapi.RawMessage `json:"details,omitempty"` 1242 // Message: A developer-facing error message, which should be in English. Any 1243 // user-facing error message should be localized and sent in the 1244 // google.rpc.Status.details field, or localized by the client. 1245 Message string `json:"message,omitempty"` 1246 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 1247 // include in API requests. By default, fields with empty or default values are 1248 // omitted from API requests. See 1249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1250 // details. 1251 ForceSendFields []string `json:"-"` 1252 // NullFields is a list of field names (e.g. "Code") to include in API requests 1253 // with the JSON null value. By default, fields with empty values are omitted 1254 // from API requests. See 1255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1256 NullFields []string `json:"-"` 1257 } 1258 1259 func (s *Status) MarshalJSON() ([]byte, error) { 1260 type NoMethod Status 1261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1262 } 1263 1264 // UnexpectedExitStatusEvent: An event generated when the execution of a 1265 // container results in a non-zero exit status that was not otherwise ignored. 1266 // Execution will continue, but only actions that are flagged as `ALWAYS_RUN` 1267 // will be executed. Other actions will be skipped. 1268 type UnexpectedExitStatusEvent struct { 1269 // ActionId: The numeric ID of the action that started the container. 1270 ActionId int64 `json:"actionId,omitempty"` 1271 // ExitStatus: The exit status of the container. 1272 ExitStatus int64 `json:"exitStatus,omitempty"` 1273 // ForceSendFields is a list of field names (e.g. "ActionId") to 1274 // unconditionally include in API requests. By default, fields with empty or 1275 // default values are omitted from API requests. See 1276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1277 // details. 1278 ForceSendFields []string `json:"-"` 1279 // NullFields is a list of field names (e.g. "ActionId") to include in API 1280 // requests with the JSON null value. By default, fields with empty values are 1281 // omitted from API requests. See 1282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1283 NullFields []string `json:"-"` 1284 } 1285 1286 func (s *UnexpectedExitStatusEvent) MarshalJSON() ([]byte, error) { 1287 type NoMethod UnexpectedExitStatusEvent 1288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1289 } 1290 1291 // VirtualMachine: Carries information about a Compute Engine VM resource. 1292 type VirtualMachine struct { 1293 // Accelerators: The list of accelerators to attach to the VM. 1294 Accelerators []*Accelerator `json:"accelerators,omitempty"` 1295 // BootDiskSizeGb: The size of the boot disk, in GB. The boot disk must be 1296 // large enough to accommodate all of the Docker images from each action in the 1297 // pipeline at the same time. If not specified, a small but reasonable default 1298 // value is used. 1299 BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` 1300 // BootImage: The host operating system image to use. Currently, only 1301 // Container-Optimized OS images can be used. The default value is 1302 // `projects/cos-cloud/global/images/family/cos-stable`, which selects the 1303 // latest stable release of Container-Optimized OS. This option is provided to 1304 // allow testing against the beta release of the operating system to ensure 1305 // that the new version does not interact negatively with production pipelines. 1306 // To test a pipeline against the beta release of Container-Optimized OS, use 1307 // the value `projects/cos-cloud/global/images/family/cos-beta`. 1308 BootImage string `json:"bootImage,omitempty"` 1309 // CpuPlatform: The CPU platform to request. An instance based on a newer 1310 // platform can be allocated, but never one with fewer capabilities. The value 1311 // of this parameter must be a valid Compute Engine CPU platform name (such as 1312 // "Intel Skylake"). This parameter is only useful for carefully optimized work 1313 // loads where the CPU platform has a significant impact. For more information 1314 // about the effect of this parameter, see 1315 // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. 1316 CpuPlatform string `json:"cpuPlatform,omitempty"` 1317 // Disks: The list of disks to create and attach to the VM. Specify either the 1318 // `volumes[]` field or the `disks[]` field, but not both. 1319 Disks []*Disk `json:"disks,omitempty"` 1320 // DockerCacheImages: The Compute Engine Disk Images to use as a Docker cache. 1321 // The disks will be mounted into the Docker folder in a way that the images 1322 // present in the cache will not need to be pulled. The digests of the cached 1323 // images must match those of the tags used or the latest version will still be 1324 // pulled. The root directory of the ext4 image must contain `image` and 1325 // `overlay2` directories copied from the Docker directory of a VM where the 1326 // desired Docker images have already been pulled. Any images pulled that are 1327 // not cached will be stored on the first cache disk instead of the boot disk. 1328 // Only a single image is supported. 1329 DockerCacheImages []string `json:"dockerCacheImages,omitempty"` 1330 // EnableStackdriverMonitoring: Whether Stackdriver monitoring should be 1331 // enabled on the VM. 1332 EnableStackdriverMonitoring bool `json:"enableStackdriverMonitoring,omitempty"` 1333 // Labels: Optional set of labels to apply to the VM and any attached disk 1334 // resources. These labels must adhere to the name and value restrictions 1335 // (https://cloud.google.com/compute/docs/labeling-resources) on VM labels 1336 // imposed by Compute Engine. Labels keys with the prefix 'google-' are 1337 // reserved for use by Google. Labels applied at creation time to the VM. 1338 // Applied on a best-effort basis to attached disk resources shortly after VM 1339 // creation. 1340 Labels map[string]string `json:"labels,omitempty"` 1341 // MachineType: Required. The machine type of the virtual machine to create. 1342 // Must be the short name of a standard machine type (such as "n1-standard-1") 1343 // or a custom machine type (such as "custom-1-4096", where "1" indicates the 1344 // number of vCPUs and "4096" indicates the memory in MB). See Creating an 1345 // instance with a custom machine type 1346 // (https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) 1347 // for more specifications on creating a custom machine type. 1348 MachineType string `json:"machineType,omitempty"` 1349 // Network: The VM network configuration. 1350 Network *Network `json:"network,omitempty"` 1351 // NvidiaDriverVersion: The NVIDIA driver version to use when attaching an 1352 // NVIDIA GPU accelerator. The version specified here must be compatible with 1353 // the GPU libraries contained in the container being executed, and must be one 1354 // of the drivers hosted in the `nvidia-drivers-us-public` bucket on Google 1355 // Cloud Storage. 1356 NvidiaDriverVersion string `json:"nvidiaDriverVersion,omitempty"` 1357 // Preemptible: If true, allocate a preemptible VM. 1358 Preemptible bool `json:"preemptible,omitempty"` 1359 // Reservation: If specified, the VM will only be allocated inside the matching 1360 // reservation. It will fail if the VM parameters don't match the reservation. 1361 Reservation string `json:"reservation,omitempty"` 1362 // ServiceAccount: The service account to install on the VM. This account does 1363 // not need any permissions other than those required by the pipeline. 1364 ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` 1365 // Volumes: The list of disks and other storage to create or attach to the VM. 1366 // Specify either the `volumes[]` field or the `disks[]` field, but not both. 1367 Volumes []*Volume `json:"volumes,omitempty"` 1368 // ForceSendFields is a list of field names (e.g. "Accelerators") to 1369 // unconditionally include in API requests. By default, fields with empty or 1370 // default values are omitted from API requests. See 1371 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1372 // details. 1373 ForceSendFields []string `json:"-"` 1374 // NullFields is a list of field names (e.g. "Accelerators") to include in API 1375 // requests with the JSON null value. By default, fields with empty values are 1376 // omitted from API requests. See 1377 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1378 NullFields []string `json:"-"` 1379 } 1380 1381 func (s *VirtualMachine) MarshalJSON() ([]byte, error) { 1382 type NoMethod VirtualMachine 1383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1384 } 1385 1386 // Volume: Carries information about storage that can be attached to a VM. 1387 // Specify either `Volume` or `Disk`, but not both. 1388 type Volume struct { 1389 // ExistingDisk: Configuration for a existing disk. 1390 ExistingDisk *ExistingDisk `json:"existingDisk,omitempty"` 1391 // NfsMount: Configuration for an NFS mount. 1392 NfsMount *NFSMount `json:"nfsMount,omitempty"` 1393 // PersistentDisk: Configuration for a persistent disk. 1394 PersistentDisk *PersistentDisk `json:"persistentDisk,omitempty"` 1395 // Volume: A user-supplied name for the volume. Used when mounting the volume 1396 // into `Actions`. The name must contain only upper and lowercase alphanumeric 1397 // characters and hyphens and cannot start with a hyphen. 1398 Volume string `json:"volume,omitempty"` 1399 // ForceSendFields is a list of field names (e.g. "ExistingDisk") to 1400 // unconditionally include in API requests. By default, fields with empty or 1401 // default values are omitted from API requests. See 1402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1403 // details. 1404 ForceSendFields []string `json:"-"` 1405 // NullFields is a list of field names (e.g. "ExistingDisk") to include in API 1406 // requests with the JSON null value. By default, fields with empty values are 1407 // omitted from API requests. See 1408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1409 NullFields []string `json:"-"` 1410 } 1411 1412 func (s *Volume) MarshalJSON() ([]byte, error) { 1413 type NoMethod Volume 1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1415 } 1416 1417 // WorkerAssignedEvent: An event generated after a worker VM has been assigned 1418 // to run the pipeline. 1419 type WorkerAssignedEvent struct { 1420 // Instance: The worker's instance name. 1421 Instance string `json:"instance,omitempty"` 1422 // MachineType: The machine type that was assigned for the worker. 1423 MachineType string `json:"machineType,omitempty"` 1424 // Zone: The zone the worker is running in. 1425 Zone string `json:"zone,omitempty"` 1426 // ForceSendFields is a list of field names (e.g. "Instance") to 1427 // unconditionally include in API requests. By default, fields with empty or 1428 // default values are omitted from API requests. See 1429 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1430 // details. 1431 ForceSendFields []string `json:"-"` 1432 // NullFields is a list of field names (e.g. "Instance") to include in API 1433 // requests with the JSON null value. By default, fields with empty values are 1434 // omitted from API requests. See 1435 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1436 NullFields []string `json:"-"` 1437 } 1438 1439 func (s *WorkerAssignedEvent) MarshalJSON() ([]byte, error) { 1440 type NoMethod WorkerAssignedEvent 1441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1442 } 1443 1444 // WorkerReleasedEvent: An event generated when the worker VM that was assigned 1445 // to the pipeline has been released (deleted). 1446 type WorkerReleasedEvent struct { 1447 // Instance: The worker's instance name. 1448 Instance string `json:"instance,omitempty"` 1449 // Zone: The zone the worker was running in. 1450 Zone string `json:"zone,omitempty"` 1451 // ForceSendFields is a list of field names (e.g. "Instance") to 1452 // unconditionally include in API requests. By default, fields with empty or 1453 // default values are omitted from API requests. See 1454 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1455 // details. 1456 ForceSendFields []string `json:"-"` 1457 // NullFields is a list of field names (e.g. "Instance") to include in API 1458 // requests with the JSON null value. By default, fields with empty values are 1459 // omitted from API requests. See 1460 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1461 NullFields []string `json:"-"` 1462 } 1463 1464 func (s *WorkerReleasedEvent) MarshalJSON() ([]byte, error) { 1465 type NoMethod WorkerReleasedEvent 1466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1467 } 1468 1469 type ProjectsLocationsGetCall struct { 1470 s *Service 1471 name string 1472 urlParams_ gensupport.URLParams 1473 ifNoneMatch_ string 1474 ctx_ context.Context 1475 header_ http.Header 1476 } 1477 1478 // Get: Gets information about a location. 1479 // 1480 // - name: Resource name for the location. 1481 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 1482 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1483 c.name = name 1484 return c 1485 } 1486 1487 // Fields allows partial responses to be retrieved. See 1488 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1489 // details. 1490 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 1491 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1492 return c 1493 } 1494 1495 // IfNoneMatch sets an optional parameter which makes the operation fail if the 1496 // object's ETag matches the given value. This is useful for getting updates 1497 // only after the object has changed since the last request. 1498 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 1499 c.ifNoneMatch_ = entityTag 1500 return c 1501 } 1502 1503 // Context sets the context to be used in this call's Do method. 1504 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 1505 c.ctx_ = ctx 1506 return c 1507 } 1508 1509 // Header returns a http.Header that can be modified by the caller to add 1510 // headers to the request. 1511 func (c *ProjectsLocationsGetCall) Header() http.Header { 1512 if c.header_ == nil { 1513 c.header_ = make(http.Header) 1514 } 1515 return c.header_ 1516 } 1517 1518 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 1519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 1520 if c.ifNoneMatch_ != "" { 1521 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1522 } 1523 var body io.Reader = nil 1524 c.urlParams_.Set("alt", alt) 1525 c.urlParams_.Set("prettyPrint", "false") 1526 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") 1527 urls += "?" + c.urlParams_.Encode() 1528 req, err := http.NewRequest("GET", urls, body) 1529 if err != nil { 1530 return nil, err 1531 } 1532 req.Header = reqHeaders 1533 googleapi.Expand(req.URL, map[string]string{ 1534 "name": c.name, 1535 }) 1536 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1537 } 1538 1539 // Do executes the "lifesciences.projects.locations.get" call. 1540 // Any non-2xx status code is an error. Response headers are in either 1541 // *Location.ServerResponse.Header or (if a response was returned at all) in 1542 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1543 // whether the returned error was because http.StatusNotModified was returned. 1544 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 1545 gensupport.SetOptions(c.urlParams_, opts...) 1546 res, err := c.doRequest("json") 1547 if res != nil && res.StatusCode == http.StatusNotModified { 1548 if res.Body != nil { 1549 res.Body.Close() 1550 } 1551 return nil, gensupport.WrapError(&googleapi.Error{ 1552 Code: res.StatusCode, 1553 Header: res.Header, 1554 }) 1555 } 1556 if err != nil { 1557 return nil, err 1558 } 1559 defer googleapi.CloseBody(res) 1560 if err := googleapi.CheckResponse(res); err != nil { 1561 return nil, gensupport.WrapError(err) 1562 } 1563 ret := &Location{ 1564 ServerResponse: googleapi.ServerResponse{ 1565 Header: res.Header, 1566 HTTPStatusCode: res.StatusCode, 1567 }, 1568 } 1569 target := &ret 1570 if err := gensupport.DecodeResponse(target, res); err != nil { 1571 return nil, err 1572 } 1573 return ret, nil 1574 } 1575 1576 type ProjectsLocationsListCall struct { 1577 s *Service 1578 name string 1579 urlParams_ gensupport.URLParams 1580 ifNoneMatch_ string 1581 ctx_ context.Context 1582 header_ http.Header 1583 } 1584 1585 // List: Lists information about the supported locations for this service. 1586 // 1587 // - name: The resource that owns the locations collection, if applicable. 1588 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 1589 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1590 c.name = name 1591 return c 1592 } 1593 1594 // Filter sets the optional parameter "filter": A filter to narrow down results 1595 // to a preferred subset. The filtering language accepts strings like 1596 // "displayName=tokyo", and is documented in more detail in AIP-160 1597 // (https://google.aip.dev/160). 1598 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 1599 c.urlParams_.Set("filter", filter) 1600 return c 1601 } 1602 1603 // PageSize sets the optional parameter "pageSize": The maximum number of 1604 // results to return. If not set, the service selects a default. 1605 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 1606 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 1607 return c 1608 } 1609 1610 // PageToken sets the optional parameter "pageToken": A page token received 1611 // from the `next_page_token` field in the response. Send that page token to 1612 // receive the subsequent page. 1613 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 1614 c.urlParams_.Set("pageToken", pageToken) 1615 return c 1616 } 1617 1618 // Fields allows partial responses to be retrieved. See 1619 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1620 // details. 1621 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 1622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1623 return c 1624 } 1625 1626 // IfNoneMatch sets an optional parameter which makes the operation fail if the 1627 // object's ETag matches the given value. This is useful for getting updates 1628 // only after the object has changed since the last request. 1629 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 1630 c.ifNoneMatch_ = entityTag 1631 return c 1632 } 1633 1634 // Context sets the context to be used in this call's Do method. 1635 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 1636 c.ctx_ = ctx 1637 return c 1638 } 1639 1640 // Header returns a http.Header that can be modified by the caller to add 1641 // headers to the request. 1642 func (c *ProjectsLocationsListCall) Header() http.Header { 1643 if c.header_ == nil { 1644 c.header_ = make(http.Header) 1645 } 1646 return c.header_ 1647 } 1648 1649 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 1650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 1651 if c.ifNoneMatch_ != "" { 1652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1653 } 1654 var body io.Reader = nil 1655 c.urlParams_.Set("alt", alt) 1656 c.urlParams_.Set("prettyPrint", "false") 1657 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/locations") 1658 urls += "?" + c.urlParams_.Encode() 1659 req, err := http.NewRequest("GET", urls, body) 1660 if err != nil { 1661 return nil, err 1662 } 1663 req.Header = reqHeaders 1664 googleapi.Expand(req.URL, map[string]string{ 1665 "name": c.name, 1666 }) 1667 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1668 } 1669 1670 // Do executes the "lifesciences.projects.locations.list" call. 1671 // Any non-2xx status code is an error. Response headers are in either 1672 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 1673 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 1674 // check whether the returned error was because http.StatusNotModified was 1675 // returned. 1676 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 1677 gensupport.SetOptions(c.urlParams_, opts...) 1678 res, err := c.doRequest("json") 1679 if res != nil && res.StatusCode == http.StatusNotModified { 1680 if res.Body != nil { 1681 res.Body.Close() 1682 } 1683 return nil, gensupport.WrapError(&googleapi.Error{ 1684 Code: res.StatusCode, 1685 Header: res.Header, 1686 }) 1687 } 1688 if err != nil { 1689 return nil, err 1690 } 1691 defer googleapi.CloseBody(res) 1692 if err := googleapi.CheckResponse(res); err != nil { 1693 return nil, gensupport.WrapError(err) 1694 } 1695 ret := &ListLocationsResponse{ 1696 ServerResponse: googleapi.ServerResponse{ 1697 Header: res.Header, 1698 HTTPStatusCode: res.StatusCode, 1699 }, 1700 } 1701 target := &ret 1702 if err := gensupport.DecodeResponse(target, res); err != nil { 1703 return nil, err 1704 } 1705 return ret, nil 1706 } 1707 1708 // Pages invokes f for each page of results. 1709 // A non-nil error returned from f will halt the iteration. 1710 // The provided context supersedes any context provided to the Context method. 1711 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 1712 c.ctx_ = ctx 1713 defer c.PageToken(c.urlParams_.Get("pageToken")) 1714 for { 1715 x, err := c.Do() 1716 if err != nil { 1717 return err 1718 } 1719 if err := f(x); err != nil { 1720 return err 1721 } 1722 if x.NextPageToken == "" { 1723 return nil 1724 } 1725 c.PageToken(x.NextPageToken) 1726 } 1727 } 1728 1729 type ProjectsLocationsOperationsCancelCall struct { 1730 s *Service 1731 name string 1732 canceloperationrequest *CancelOperationRequest 1733 urlParams_ gensupport.URLParams 1734 ctx_ context.Context 1735 header_ http.Header 1736 } 1737 1738 // Cancel: Starts asynchronous cancellation on a long-running operation. The 1739 // server makes a best effort to cancel the operation, but success is not 1740 // guaranteed. Clients may use Operations.GetOperation or 1741 // Operations.ListOperations to check whether the cancellation succeeded or the 1742 // operation completed despite cancellation. Authorization requires the 1743 // following Google IAM (https://cloud.google.com/iam) permission: * 1744 // `lifesciences.operations.cancel` 1745 // 1746 // - name: The name of the operation resource to be cancelled. 1747 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 1748 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1749 c.name = name 1750 c.canceloperationrequest = canceloperationrequest 1751 return c 1752 } 1753 1754 // Fields allows partial responses to be retrieved. See 1755 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1756 // details. 1757 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 1758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1759 return c 1760 } 1761 1762 // Context sets the context to be used in this call's Do method. 1763 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 1764 c.ctx_ = ctx 1765 return c 1766 } 1767 1768 // Header returns a http.Header that can be modified by the caller to add 1769 // headers to the request. 1770 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 1771 if c.header_ == nil { 1772 c.header_ = make(http.Header) 1773 } 1774 return c.header_ 1775 } 1776 1777 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 1778 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 1779 var body io.Reader = nil 1780 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 1781 if err != nil { 1782 return nil, err 1783 } 1784 c.urlParams_.Set("alt", alt) 1785 c.urlParams_.Set("prettyPrint", "false") 1786 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:cancel") 1787 urls += "?" + c.urlParams_.Encode() 1788 req, err := http.NewRequest("POST", urls, body) 1789 if err != nil { 1790 return nil, err 1791 } 1792 req.Header = reqHeaders 1793 googleapi.Expand(req.URL, map[string]string{ 1794 "name": c.name, 1795 }) 1796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1797 } 1798 1799 // Do executes the "lifesciences.projects.locations.operations.cancel" call. 1800 // Any non-2xx status code is an error. Response headers are in either 1801 // *Empty.ServerResponse.Header or (if a response was returned at all) in 1802 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1803 // whether the returned error was because http.StatusNotModified was returned. 1804 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 1805 gensupport.SetOptions(c.urlParams_, opts...) 1806 res, err := c.doRequest("json") 1807 if res != nil && res.StatusCode == http.StatusNotModified { 1808 if res.Body != nil { 1809 res.Body.Close() 1810 } 1811 return nil, gensupport.WrapError(&googleapi.Error{ 1812 Code: res.StatusCode, 1813 Header: res.Header, 1814 }) 1815 } 1816 if err != nil { 1817 return nil, err 1818 } 1819 defer googleapi.CloseBody(res) 1820 if err := googleapi.CheckResponse(res); err != nil { 1821 return nil, gensupport.WrapError(err) 1822 } 1823 ret := &Empty{ 1824 ServerResponse: googleapi.ServerResponse{ 1825 Header: res.Header, 1826 HTTPStatusCode: res.StatusCode, 1827 }, 1828 } 1829 target := &ret 1830 if err := gensupport.DecodeResponse(target, res); err != nil { 1831 return nil, err 1832 } 1833 return ret, nil 1834 } 1835 1836 type ProjectsLocationsOperationsGetCall struct { 1837 s *Service 1838 name string 1839 urlParams_ gensupport.URLParams 1840 ifNoneMatch_ string 1841 ctx_ context.Context 1842 header_ http.Header 1843 } 1844 1845 // Get: Gets the latest state of a long-running operation. Clients can use this 1846 // method to poll the operation result at intervals as recommended by the API 1847 // service. Authorization requires the following Google IAM 1848 // (https://cloud.google.com/iam) permission: * `lifesciences.operations.get` 1849 // 1850 // - name: The name of the operation resource. 1851 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 1852 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1853 c.name = name 1854 return c 1855 } 1856 1857 // Fields allows partial responses to be retrieved. See 1858 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1859 // details. 1860 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 1861 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1862 return c 1863 } 1864 1865 // IfNoneMatch sets an optional parameter which makes the operation fail if the 1866 // object's ETag matches the given value. This is useful for getting updates 1867 // only after the object has changed since the last request. 1868 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 1869 c.ifNoneMatch_ = entityTag 1870 return c 1871 } 1872 1873 // Context sets the context to be used in this call's Do method. 1874 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 1875 c.ctx_ = ctx 1876 return c 1877 } 1878 1879 // Header returns a http.Header that can be modified by the caller to add 1880 // headers to the request. 1881 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 1882 if c.header_ == nil { 1883 c.header_ = make(http.Header) 1884 } 1885 return c.header_ 1886 } 1887 1888 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 1889 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 1890 if c.ifNoneMatch_ != "" { 1891 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1892 } 1893 var body io.Reader = nil 1894 c.urlParams_.Set("alt", alt) 1895 c.urlParams_.Set("prettyPrint", "false") 1896 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") 1897 urls += "?" + c.urlParams_.Encode() 1898 req, err := http.NewRequest("GET", urls, body) 1899 if err != nil { 1900 return nil, err 1901 } 1902 req.Header = reqHeaders 1903 googleapi.Expand(req.URL, map[string]string{ 1904 "name": c.name, 1905 }) 1906 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1907 } 1908 1909 // Do executes the "lifesciences.projects.locations.operations.get" call. 1910 // Any non-2xx status code is an error. Response headers are in either 1911 // *Operation.ServerResponse.Header or (if a response was returned at all) in 1912 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1913 // whether the returned error was because http.StatusNotModified was returned. 1914 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 1915 gensupport.SetOptions(c.urlParams_, opts...) 1916 res, err := c.doRequest("json") 1917 if res != nil && res.StatusCode == http.StatusNotModified { 1918 if res.Body != nil { 1919 res.Body.Close() 1920 } 1921 return nil, gensupport.WrapError(&googleapi.Error{ 1922 Code: res.StatusCode, 1923 Header: res.Header, 1924 }) 1925 } 1926 if err != nil { 1927 return nil, err 1928 } 1929 defer googleapi.CloseBody(res) 1930 if err := googleapi.CheckResponse(res); err != nil { 1931 return nil, gensupport.WrapError(err) 1932 } 1933 ret := &Operation{ 1934 ServerResponse: googleapi.ServerResponse{ 1935 Header: res.Header, 1936 HTTPStatusCode: res.StatusCode, 1937 }, 1938 } 1939 target := &ret 1940 if err := gensupport.DecodeResponse(target, res); err != nil { 1941 return nil, err 1942 } 1943 return ret, nil 1944 } 1945 1946 type ProjectsLocationsOperationsListCall struct { 1947 s *Service 1948 name string 1949 urlParams_ gensupport.URLParams 1950 ifNoneMatch_ string 1951 ctx_ context.Context 1952 header_ http.Header 1953 } 1954 1955 // List: Lists operations that match the specified filter in the request. 1956 // Authorization requires the following Google IAM 1957 // (https://cloud.google.com/iam) permission: * `lifesciences.operations.list` 1958 // 1959 // - name: The name of the operation's parent resource. 1960 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 1961 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1962 c.name = name 1963 return c 1964 } 1965 1966 // Filter sets the optional parameter "filter": A string for filtering 1967 // Operations. The following filter fields are supported: * createTime: The 1968 // time this job was created * events: The set of event (names) that have 1969 // occurred while running the pipeline. The : operator can be used to determine 1970 // if a particular event has occurred. * error: If the pipeline is running, 1971 // this value is NULL. Once the pipeline finishes, the value is the standard 1972 // Google error code. * labels.key or labels."key with space" where key is a 1973 // label key. * done: If the pipeline is running, this value is false. Once the 1974 // pipeline finishes, the value is true. 1975 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 1976 c.urlParams_.Set("filter", filter) 1977 return c 1978 } 1979 1980 // PageSize sets the optional parameter "pageSize": The maximum number of 1981 // results to return. The maximum value is 256. 1982 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 1983 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 1984 return c 1985 } 1986 1987 // PageToken sets the optional parameter "pageToken": The standard list page 1988 // token. 1989 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 1990 c.urlParams_.Set("pageToken", pageToken) 1991 return c 1992 } 1993 1994 // Fields allows partial responses to be retrieved. See 1995 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1996 // details. 1997 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 1998 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1999 return c 2000 } 2001 2002 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2003 // object's ETag matches the given value. This is useful for getting updates 2004 // only after the object has changed since the last request. 2005 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 2006 c.ifNoneMatch_ = entityTag 2007 return c 2008 } 2009 2010 // Context sets the context to be used in this call's Do method. 2011 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 2012 c.ctx_ = ctx 2013 return c 2014 } 2015 2016 // Header returns a http.Header that can be modified by the caller to add 2017 // headers to the request. 2018 func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 2019 if c.header_ == nil { 2020 c.header_ = make(http.Header) 2021 } 2022 return c.header_ 2023 } 2024 2025 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 2026 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2027 if c.ifNoneMatch_ != "" { 2028 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2029 } 2030 var body io.Reader = nil 2031 c.urlParams_.Set("alt", alt) 2032 c.urlParams_.Set("prettyPrint", "false") 2033 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/operations") 2034 urls += "?" + c.urlParams_.Encode() 2035 req, err := http.NewRequest("GET", urls, body) 2036 if err != nil { 2037 return nil, err 2038 } 2039 req.Header = reqHeaders 2040 googleapi.Expand(req.URL, map[string]string{ 2041 "name": c.name, 2042 }) 2043 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2044 } 2045 2046 // Do executes the "lifesciences.projects.locations.operations.list" call. 2047 // Any non-2xx status code is an error. Response headers are in either 2048 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 2049 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2050 // check whether the returned error was because http.StatusNotModified was 2051 // returned. 2052 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 2053 gensupport.SetOptions(c.urlParams_, opts...) 2054 res, err := c.doRequest("json") 2055 if res != nil && res.StatusCode == http.StatusNotModified { 2056 if res.Body != nil { 2057 res.Body.Close() 2058 } 2059 return nil, gensupport.WrapError(&googleapi.Error{ 2060 Code: res.StatusCode, 2061 Header: res.Header, 2062 }) 2063 } 2064 if err != nil { 2065 return nil, err 2066 } 2067 defer googleapi.CloseBody(res) 2068 if err := googleapi.CheckResponse(res); err != nil { 2069 return nil, gensupport.WrapError(err) 2070 } 2071 ret := &ListOperationsResponse{ 2072 ServerResponse: googleapi.ServerResponse{ 2073 Header: res.Header, 2074 HTTPStatusCode: res.StatusCode, 2075 }, 2076 } 2077 target := &ret 2078 if err := gensupport.DecodeResponse(target, res); err != nil { 2079 return nil, err 2080 } 2081 return ret, nil 2082 } 2083 2084 // Pages invokes f for each page of results. 2085 // A non-nil error returned from f will halt the iteration. 2086 // The provided context supersedes any context provided to the Context method. 2087 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 2088 c.ctx_ = ctx 2089 defer c.PageToken(c.urlParams_.Get("pageToken")) 2090 for { 2091 x, err := c.Do() 2092 if err != nil { 2093 return err 2094 } 2095 if err := f(x); err != nil { 2096 return err 2097 } 2098 if x.NextPageToken == "" { 2099 return nil 2100 } 2101 c.PageToken(x.NextPageToken) 2102 } 2103 } 2104 2105 type ProjectsLocationsPipelinesRunCall struct { 2106 s *Service 2107 parent string 2108 runpipelinerequest *RunPipelineRequest 2109 urlParams_ gensupport.URLParams 2110 ctx_ context.Context 2111 header_ http.Header 2112 } 2113 2114 // Run: Runs a pipeline. The returned Operation's metadata field will contain a 2115 // google.cloud.lifesciences.v2beta.Metadata object describing the status of 2116 // the pipeline execution. The response field will contain a 2117 // google.cloud.lifesciences.v2beta.RunPipelineResponse object if the pipeline 2118 // completes successfully. **Note:** Before you can use this method, the *Life 2119 // Sciences Service Agent* must have access to your project. This is done 2120 // automatically when the Cloud Life Sciences API is first enabled, but if you 2121 // delete this permission you must disable and re-enable the API to grant the 2122 // Life Sciences Service Agent the required permissions. Authorization requires 2123 // the following Google IAM (https://cloud.google.com/iam/) permission: * 2124 // `lifesciences.workflows.run` 2125 // 2126 // - parent: The project and location that this request should be executed 2127 // against. 2128 func (r *ProjectsLocationsPipelinesService) Run(parent string, runpipelinerequest *RunPipelineRequest) *ProjectsLocationsPipelinesRunCall { 2129 c := &ProjectsLocationsPipelinesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2130 c.parent = parent 2131 c.runpipelinerequest = runpipelinerequest 2132 return c 2133 } 2134 2135 // Fields allows partial responses to be retrieved. See 2136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2137 // details. 2138 func (c *ProjectsLocationsPipelinesRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesRunCall { 2139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2140 return c 2141 } 2142 2143 // Context sets the context to be used in this call's Do method. 2144 func (c *ProjectsLocationsPipelinesRunCall) Context(ctx context.Context) *ProjectsLocationsPipelinesRunCall { 2145 c.ctx_ = ctx 2146 return c 2147 } 2148 2149 // Header returns a http.Header that can be modified by the caller to add 2150 // headers to the request. 2151 func (c *ProjectsLocationsPipelinesRunCall) Header() http.Header { 2152 if c.header_ == nil { 2153 c.header_ = make(http.Header) 2154 } 2155 return c.header_ 2156 } 2157 2158 func (c *ProjectsLocationsPipelinesRunCall) doRequest(alt string) (*http.Response, error) { 2159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2160 var body io.Reader = nil 2161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runpipelinerequest) 2162 if err != nil { 2163 return nil, err 2164 } 2165 c.urlParams_.Set("alt", alt) 2166 c.urlParams_.Set("prettyPrint", "false") 2167 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/pipelines:run") 2168 urls += "?" + c.urlParams_.Encode() 2169 req, err := http.NewRequest("POST", urls, body) 2170 if err != nil { 2171 return nil, err 2172 } 2173 req.Header = reqHeaders 2174 googleapi.Expand(req.URL, map[string]string{ 2175 "parent": c.parent, 2176 }) 2177 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2178 } 2179 2180 // Do executes the "lifesciences.projects.locations.pipelines.run" call. 2181 // Any non-2xx status code is an error. Response headers are in either 2182 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2183 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2184 // whether the returned error was because http.StatusNotModified was returned. 2185 func (c *ProjectsLocationsPipelinesRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2186 gensupport.SetOptions(c.urlParams_, opts...) 2187 res, err := c.doRequest("json") 2188 if res != nil && res.StatusCode == http.StatusNotModified { 2189 if res.Body != nil { 2190 res.Body.Close() 2191 } 2192 return nil, gensupport.WrapError(&googleapi.Error{ 2193 Code: res.StatusCode, 2194 Header: res.Header, 2195 }) 2196 } 2197 if err != nil { 2198 return nil, err 2199 } 2200 defer googleapi.CloseBody(res) 2201 if err := googleapi.CheckResponse(res); err != nil { 2202 return nil, gensupport.WrapError(err) 2203 } 2204 ret := &Operation{ 2205 ServerResponse: googleapi.ServerResponse{ 2206 Header: res.Header, 2207 HTTPStatusCode: res.StatusCode, 2208 }, 2209 } 2210 target := &ret 2211 if err := gensupport.DecodeResponse(target, res); err != nil { 2212 return nil, err 2213 } 2214 return ret, nil 2215 } 2216