...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package batch provides access to the Batch API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/batch/
    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/batch/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	batchService, err := batch.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  //	batchService, err := batch.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  //	batchService, err := batch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package batch // import "google.golang.org/api/batch/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "batch:v1"
    90  const apiName = "batch"
    91  const apiVersion = "v1"
    92  const basePath = "https://batch.googleapis.com/"
    93  const basePathTemplate = "https://batch.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://batch.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.Jobs = NewProjectsLocationsJobsService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	rs.State = NewProjectsLocationsStateService(s)
   174  	return rs
   175  }
   176  
   177  type ProjectsLocationsService struct {
   178  	s *Service
   179  
   180  	Jobs *ProjectsLocationsJobsService
   181  
   182  	Operations *ProjectsLocationsOperationsService
   183  
   184  	State *ProjectsLocationsStateService
   185  }
   186  
   187  func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService {
   188  	rs := &ProjectsLocationsJobsService{s: s}
   189  	rs.TaskGroups = NewProjectsLocationsJobsTaskGroupsService(s)
   190  	return rs
   191  }
   192  
   193  type ProjectsLocationsJobsService struct {
   194  	s *Service
   195  
   196  	TaskGroups *ProjectsLocationsJobsTaskGroupsService
   197  }
   198  
   199  func NewProjectsLocationsJobsTaskGroupsService(s *Service) *ProjectsLocationsJobsTaskGroupsService {
   200  	rs := &ProjectsLocationsJobsTaskGroupsService{s: s}
   201  	rs.Tasks = NewProjectsLocationsJobsTaskGroupsTasksService(s)
   202  	return rs
   203  }
   204  
   205  type ProjectsLocationsJobsTaskGroupsService struct {
   206  	s *Service
   207  
   208  	Tasks *ProjectsLocationsJobsTaskGroupsTasksService
   209  }
   210  
   211  func NewProjectsLocationsJobsTaskGroupsTasksService(s *Service) *ProjectsLocationsJobsTaskGroupsTasksService {
   212  	rs := &ProjectsLocationsJobsTaskGroupsTasksService{s: s}
   213  	return rs
   214  }
   215  
   216  type ProjectsLocationsJobsTaskGroupsTasksService struct {
   217  	s *Service
   218  }
   219  
   220  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   221  	rs := &ProjectsLocationsOperationsService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsOperationsService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsLocationsStateService(s *Service) *ProjectsLocationsStateService {
   230  	rs := &ProjectsLocationsStateService{s: s}
   231  	return rs
   232  }
   233  
   234  type ProjectsLocationsStateService struct {
   235  	s *Service
   236  }
   237  
   238  // Accelerator: Accelerator describes Compute Engine accelerators to be
   239  // attached to the VM.
   240  type Accelerator struct {
   241  	// Count: The number of accelerators of this type.
   242  	Count int64 `json:"count,omitempty,string"`
   243  	// DriverVersion: Optional. The NVIDIA GPU driver version that should be
   244  	// installed for this type. You can define the specific driver version such as
   245  	// "470.103.01", following the driver version requirements in
   246  	// https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver.
   247  	// Batch will install the specific accelerator driver if qualified.
   248  	DriverVersion string `json:"driverVersion,omitempty"`
   249  	// InstallGpuDrivers: Deprecated: please use instances[0].install_gpu_drivers
   250  	// instead.
   251  	InstallGpuDrivers bool `json:"installGpuDrivers,omitempty"`
   252  	// Type: The accelerator type. For example, "nvidia-tesla-t4". See `gcloud
   253  	// compute accelerator-types list`.
   254  	Type string `json:"type,omitempty"`
   255  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
   256  	// include in API requests. By default, fields with empty or default values are
   257  	// omitted from API requests. See
   258  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   259  	// details.
   260  	ForceSendFields []string `json:"-"`
   261  	// NullFields is a list of field names (e.g. "Count") to include in API
   262  	// requests with the JSON null value. By default, fields with empty values are
   263  	// omitted from API requests. See
   264  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   265  	NullFields []string `json:"-"`
   266  }
   267  
   268  func (s *Accelerator) MarshalJSON() ([]byte, error) {
   269  	type NoMethod Accelerator
   270  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   271  }
   272  
   273  // ActionCondition: Conditions for actions to deal with task failures.
   274  type ActionCondition struct {
   275  	// ExitCodes: Exit codes of a task execution. If there are more than 1 exit
   276  	// codes, when task executes with any of the exit code in the list, the
   277  	// condition is met and the action will be executed.
   278  	ExitCodes []int64 `json:"exitCodes,omitempty"`
   279  	// ForceSendFields is a list of field names (e.g. "ExitCodes") to
   280  	// unconditionally include in API requests. By default, fields with empty or
   281  	// default values are omitted from API requests. See
   282  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   283  	// details.
   284  	ForceSendFields []string `json:"-"`
   285  	// NullFields is a list of field names (e.g. "ExitCodes") to include in API
   286  	// requests with the JSON null value. By default, fields with empty values are
   287  	// omitted from API requests. See
   288  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   289  	NullFields []string `json:"-"`
   290  }
   291  
   292  func (s *ActionCondition) MarshalJSON() ([]byte, error) {
   293  	type NoMethod ActionCondition
   294  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   295  }
   296  
   297  // AgentContainer: Container runnable representation on the agent side.
   298  type AgentContainer struct {
   299  	// Commands: Overrides the `CMD` specified in the container. If there is an
   300  	// ENTRYPOINT (either in the container image or with the entrypoint field
   301  	// below) then commands are appended as arguments to the ENTRYPOINT.
   302  	Commands []string `json:"commands,omitempty"`
   303  	// Entrypoint: Overrides the `ENTRYPOINT` specified in the container.
   304  	Entrypoint string `json:"entrypoint,omitempty"`
   305  	// ImageUri: The URI to pull the container image from.
   306  	ImageUri string `json:"imageUri,omitempty"`
   307  	// Options: Arbitrary additional options to include in the "docker run" command
   308  	// when running this container, e.g. "--network host".
   309  	Options string `json:"options,omitempty"`
   310  	// Volumes: Volumes to mount (bind mount) from the host machine files or
   311  	// directories into the container, formatted to match docker run's --volume
   312  	// option, e.g. /foo:/bar, or /foo:/bar:ro
   313  	Volumes []string `json:"volumes,omitempty"`
   314  	// ForceSendFields is a list of field names (e.g. "Commands") to
   315  	// unconditionally include in API requests. By default, fields with empty or
   316  	// default values are omitted from API requests. See
   317  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   318  	// details.
   319  	ForceSendFields []string `json:"-"`
   320  	// NullFields is a list of field names (e.g. "Commands") to include in API
   321  	// requests with the JSON null value. By default, fields with empty values are
   322  	// omitted from API requests. See
   323  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   324  	NullFields []string `json:"-"`
   325  }
   326  
   327  func (s *AgentContainer) MarshalJSON() ([]byte, error) {
   328  	type NoMethod AgentContainer
   329  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   330  }
   331  
   332  // AgentEnvironment: AgentEnvironment is the Environment representation between
   333  // Agent and CLH communication. The environment is used in both task level and
   334  // agent level.
   335  type AgentEnvironment struct {
   336  	// EncryptedVariables: An encrypted JSON dictionary where the key/value pairs
   337  	// correspond to environment variable names and their values.
   338  	EncryptedVariables *AgentKMSEnvMap `json:"encryptedVariables,omitempty"`
   339  	// SecretVariables: A map of environment variable names to Secret Manager
   340  	// secret names. The VM will access the named secrets to set the value of each
   341  	// environment variable.
   342  	SecretVariables map[string]string `json:"secretVariables,omitempty"`
   343  	// Variables: A map of environment variable names to values.
   344  	Variables map[string]string `json:"variables,omitempty"`
   345  	// ForceSendFields is a list of field names (e.g. "EncryptedVariables") to
   346  	// unconditionally include in API requests. By default, fields with empty or
   347  	// default values are omitted from API requests. See
   348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   349  	// details.
   350  	ForceSendFields []string `json:"-"`
   351  	// NullFields is a list of field names (e.g. "EncryptedVariables") to include
   352  	// in API requests with the JSON null value. By default, fields with empty
   353  	// values are omitted from API requests. See
   354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   355  	NullFields []string `json:"-"`
   356  }
   357  
   358  func (s *AgentEnvironment) MarshalJSON() ([]byte, error) {
   359  	type NoMethod AgentEnvironment
   360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   361  }
   362  
   363  // AgentInfo: VM Agent Info.
   364  type AgentInfo struct {
   365  	// JobId: Optional. The assigned Job ID
   366  	JobId string `json:"jobId,omitempty"`
   367  	// ReportTime: When the AgentInfo is generated.
   368  	ReportTime string `json:"reportTime,omitempty"`
   369  	// State: Agent state.
   370  	//
   371  	// Possible values:
   372  	//   "AGENT_STATE_UNSPECIFIED" - Unspecified state.
   373  	//   "AGENT_STARTING" - The agent is starting on the VM instance.
   374  	//   "AGENT_RUNNING" - The agent is running. The agent in the RUNNING state can
   375  	// never go back to the STARTING state.
   376  	//   "AGENT_STOPPED" - The agent has stopped, either on request or due to a
   377  	// failure.
   378  	State string `json:"state,omitempty"`
   379  	// TaskGroupId: The assigned task group ID.
   380  	TaskGroupId string `json:"taskGroupId,omitempty"`
   381  	// Tasks: Task Info.
   382  	Tasks []*AgentTaskInfo `json:"tasks,omitempty"`
   383  	// ForceSendFields is a list of field names (e.g. "JobId") to unconditionally
   384  	// include in API requests. By default, fields with empty or default values are
   385  	// omitted from API requests. See
   386  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   387  	// details.
   388  	ForceSendFields []string `json:"-"`
   389  	// NullFields is a list of field names (e.g. "JobId") to include in API
   390  	// requests with the JSON null value. By default, fields with empty values are
   391  	// omitted from API requests. See
   392  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   393  	NullFields []string `json:"-"`
   394  }
   395  
   396  func (s *AgentInfo) MarshalJSON() ([]byte, error) {
   397  	type NoMethod AgentInfo
   398  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   399  }
   400  
   401  // AgentKMSEnvMap: AgentKMSEnvMap contains the encrypted key/value pair to be
   402  // used in the environment on the Agent side.
   403  type AgentKMSEnvMap struct {
   404  	// CipherText: The value of the cipherText response from the `encrypt` method.
   405  	CipherText string `json:"cipherText,omitempty"`
   406  	// KeyName: The name of the KMS key that will be used to decrypt the cipher
   407  	// text.
   408  	KeyName string `json:"keyName,omitempty"`
   409  	// ForceSendFields is a list of field names (e.g. "CipherText") to
   410  	// unconditionally include in API requests. By default, fields with empty or
   411  	// default values are omitted from API requests. See
   412  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   413  	// details.
   414  	ForceSendFields []string `json:"-"`
   415  	// NullFields is a list of field names (e.g. "CipherText") to include in API
   416  	// requests with the JSON null value. By default, fields with empty values are
   417  	// omitted from API requests. See
   418  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   419  	NullFields []string `json:"-"`
   420  }
   421  
   422  func (s *AgentKMSEnvMap) MarshalJSON() ([]byte, error) {
   423  	type NoMethod AgentKMSEnvMap
   424  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   425  }
   426  
   427  // AgentMetadata: VM Agent Metadata.
   428  type AgentMetadata struct {
   429  	// CreationTime: When the VM agent started. Use agent_startup_time instead.
   430  	CreationTime string `json:"creationTime,omitempty"`
   431  	// Creator: Full name of the entity that created this vm. For MIG, this path
   432  	// is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The
   433  	// value is retrieved from the vm metadata key of "created-by".
   434  	Creator string `json:"creator,omitempty"`
   435  	// ImageVersion: image version for the VM that this agent is installed on.
   436  	ImageVersion string `json:"imageVersion,omitempty"`
   437  	// Instance: GCP instance name (go/instance-name).
   438  	Instance string `json:"instance,omitempty"`
   439  	// InstanceId: GCP instance ID (go/instance-id).
   440  	InstanceId uint64 `json:"instanceId,omitempty,string"`
   441  	// InstancePreemptionNoticeReceived: If the GCP instance has received
   442  	// preemption notice.
   443  	InstancePreemptionNoticeReceived bool `json:"instancePreemptionNoticeReceived,omitempty"`
   444  	// OsRelease: parsed contents of /etc/os-release
   445  	OsRelease map[string]string `json:"osRelease,omitempty"`
   446  	// Version: agent binary version running on VM
   447  	Version string `json:"version,omitempty"`
   448  	// Zone: Agent zone.
   449  	Zone string `json:"zone,omitempty"`
   450  	// ForceSendFields is a list of field names (e.g. "CreationTime") to
   451  	// unconditionally include in API requests. By default, fields with empty or
   452  	// default values are omitted from API requests. See
   453  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   454  	// details.
   455  	ForceSendFields []string `json:"-"`
   456  	// NullFields is a list of field names (e.g. "CreationTime") to include in API
   457  	// requests with the JSON null value. By default, fields with empty values are
   458  	// omitted from API requests. See
   459  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   460  	NullFields []string `json:"-"`
   461  }
   462  
   463  func (s *AgentMetadata) MarshalJSON() ([]byte, error) {
   464  	type NoMethod AgentMetadata
   465  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   466  }
   467  
   468  // AgentScript: Script runnable representation on the agent side.
   469  type AgentScript struct {
   470  	// Path: Script file path on the host VM. To specify an interpreter, please add
   471  	// a `#!`(also known as shebang line
   472  	// (https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the
   473  	// file.(For example, to execute the script using bash, `#!/bin/bash` should be
   474  	// the first line of the file. To execute the script using`Python3`,
   475  	// `#!/usr/bin/env python3` should be the first line of the file.) Otherwise,
   476  	// the file will by default be executed by `/bin/sh`.
   477  	Path string `json:"path,omitempty"`
   478  	// Text: Shell script text. To specify an interpreter, please add a `#!\n` at
   479  	// the beginning of the text.(For example, to execute the script using bash,
   480  	// `#!/bin/bash\n` should be added. To execute the script using`Python3`,
   481  	// `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by
   482  	// default be executed by `/bin/sh`.
   483  	Text string `json:"text,omitempty"`
   484  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
   485  	// include in API requests. By default, fields with empty or default values are
   486  	// omitted from API requests. See
   487  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   488  	// details.
   489  	ForceSendFields []string `json:"-"`
   490  	// NullFields is a list of field names (e.g. "Path") to include in API requests
   491  	// with the JSON null value. By default, fields with empty values are omitted
   492  	// from API requests. See
   493  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   494  	NullFields []string `json:"-"`
   495  }
   496  
   497  func (s *AgentScript) MarshalJSON() ([]byte, error) {
   498  	type NoMethod AgentScript
   499  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   500  }
   501  
   502  // AgentTask: TODO(b/182501497) The message needs to be redefined when the
   503  // Agent API server updates data in storage per the backend design.
   504  type AgentTask struct {
   505  	// AgentTaskSpec: AgentTaskSpec is the taskSpec representation between Agent
   506  	// and CLH communication. This field will replace the TaskSpec field above in
   507  	// future to have a better separation between user-facaing API and internal
   508  	// API.
   509  	AgentTaskSpec *AgentTaskSpec `json:"agentTaskSpec,omitempty"`
   510  	// IntendedState: The intended state of the task.
   511  	//
   512  	// Possible values:
   513  	//   "INTENDED_STATE_UNSPECIFIED" - Unspecified state.
   514  	//   "ASSIGNED" - Assigned state (includes running and finished).
   515  	//   "CANCELLED" - The agent should cancel the execution of this task.
   516  	//   "DELETED" - Delete task from agent storage, stop reporting its state.
   517  	IntendedState string `json:"intendedState,omitempty"`
   518  	// ReachedBarrier: The highest barrier reached by all tasks in the task's
   519  	// TaskGroup.
   520  	ReachedBarrier int64 `json:"reachedBarrier,omitempty,string"`
   521  	// Spec: Task Spec. This field will be replaced by agent_task_spec below in
   522  	// future.
   523  	Spec *TaskSpec `json:"spec,omitempty"`
   524  	// Status: Task status.
   525  	Status *TaskStatus `json:"status,omitempty"`
   526  	// Task: Task name.
   527  	Task string `json:"task,omitempty"`
   528  	// TaskSource: TaskSource represents the source of the task.
   529  	//
   530  	// Possible values:
   531  	//   "TASK_SOURCE_UNSPECIFIED" - Unspecified task source.
   532  	//   "BATCH_INTERNAL" - The AgentTask from this source is generated by Batch
   533  	// server. E.g. all the VMActions are from this source. When Batch Agent
   534  	// execute AgentTask from BATCH_INTERNAL, it will log stdout/err with
   535  	// "batch_agent_logs" log name.
   536  	//   "USER" - The AgentTask from this source is provided by Batch users. When
   537  	// Batch Agent execute AgentTask from USER, it will log stdout/err with
   538  	// "batch_task_logs" log name.
   539  	TaskSource string `json:"taskSource,omitempty"`
   540  	// ForceSendFields is a list of field names (e.g. "AgentTaskSpec") to
   541  	// unconditionally include in API requests. By default, fields with empty or
   542  	// default values are omitted from API requests. See
   543  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   544  	// details.
   545  	ForceSendFields []string `json:"-"`
   546  	// NullFields is a list of field names (e.g. "AgentTaskSpec") to include in API
   547  	// requests with the JSON null value. By default, fields with empty values are
   548  	// omitted from API requests. See
   549  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   550  	NullFields []string `json:"-"`
   551  }
   552  
   553  func (s *AgentTask) MarshalJSON() ([]byte, error) {
   554  	type NoMethod AgentTask
   555  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   556  }
   557  
   558  // AgentTaskInfo: Task Info
   559  type AgentTaskInfo struct {
   560  	// Runnable: The highest index of a runnable started by the agent for this
   561  	// task. The runnables are indexed from 1. Value 0 is undefined.
   562  	Runnable int64 `json:"runnable,omitempty,string"`
   563  	// TaskId: ID of the Task
   564  	TaskId string `json:"taskId,omitempty"`
   565  	// TaskStatus: The status of the Task. If we need agent specific fields we
   566  	// should fork the public TaskStatus into an agent specific one. Or add them
   567  	// below.
   568  	TaskStatus *TaskStatus `json:"taskStatus,omitempty"`
   569  	// ForceSendFields is a list of field names (e.g. "Runnable") to
   570  	// unconditionally include in API requests. By default, fields with empty or
   571  	// default values are omitted from API requests. See
   572  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   573  	// details.
   574  	ForceSendFields []string `json:"-"`
   575  	// NullFields is a list of field names (e.g. "Runnable") to include in API
   576  	// requests with the JSON null value. By default, fields with empty values are
   577  	// omitted from API requests. See
   578  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   579  	NullFields []string `json:"-"`
   580  }
   581  
   582  func (s *AgentTaskInfo) MarshalJSON() ([]byte, error) {
   583  	type NoMethod AgentTaskInfo
   584  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   585  }
   586  
   587  // AgentTaskRunnable: AgentTaskRunnable is the Runnable representation between
   588  // Agent and CLH communication.
   589  type AgentTaskRunnable struct {
   590  	// AlwaysRun: By default, after a Runnable fails, no further Runnable are
   591  	// executed. This flag indicates that this Runnable must be run even if the
   592  	// Task has already failed. This is useful for Runnables that copy output files
   593  	// off of the VM or for debugging. The always_run flag does not override the
   594  	// Task's overall max_run_duration. If the max_run_duration has expired then no
   595  	// further Runnables will execute, not even always_run Runnables.
   596  	AlwaysRun bool `json:"alwaysRun,omitempty"`
   597  	// Background: This flag allows a Runnable to continue running in the
   598  	// background while the Task executes subsequent Runnables. This is useful to
   599  	// provide services to other Runnables (or to provide debugging support tools
   600  	// like SSH servers).
   601  	Background bool `json:"background,omitempty"`
   602  	// Container: Container runnable.
   603  	Container *AgentContainer `json:"container,omitempty"`
   604  	// Environment: Environment variables for this Runnable (overrides variables
   605  	// set for the whole Task or TaskGroup).
   606  	Environment *AgentEnvironment `json:"environment,omitempty"`
   607  	// IgnoreExitStatus: Normally, a non-zero exit status causes the Task to fail.
   608  	// This flag allows execution of other Runnables to continue instead.
   609  	IgnoreExitStatus bool `json:"ignoreExitStatus,omitempty"`
   610  	// Script: Script runnable.
   611  	Script *AgentScript `json:"script,omitempty"`
   612  	// Timeout: Timeout for this Runnable.
   613  	Timeout string `json:"timeout,omitempty"`
   614  	// ForceSendFields is a list of field names (e.g. "AlwaysRun") to
   615  	// unconditionally include in API requests. By default, fields with empty or
   616  	// default values are omitted from API requests. See
   617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   618  	// details.
   619  	ForceSendFields []string `json:"-"`
   620  	// NullFields is a list of field names (e.g. "AlwaysRun") to include in API
   621  	// requests with the JSON null value. By default, fields with empty values are
   622  	// omitted from API requests. See
   623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   624  	NullFields []string `json:"-"`
   625  }
   626  
   627  func (s *AgentTaskRunnable) MarshalJSON() ([]byte, error) {
   628  	type NoMethod AgentTaskRunnable
   629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   630  }
   631  
   632  // AgentTaskSpec: AgentTaskSpec is the user's TaskSpec representation between
   633  // Agent and CLH communication.
   634  type AgentTaskSpec struct {
   635  	// Environment: Environment variables to set before running the Task.
   636  	Environment *AgentEnvironment `json:"environment,omitempty"`
   637  	// MaxRunDuration: Maximum duration the task should run. The task will be
   638  	// killed and marked as FAILED if over this limit. The valid value range for
   639  	// max_run_duration in seconds is [0, 315576000000.999999999],
   640  	MaxRunDuration string `json:"maxRunDuration,omitempty"`
   641  	// Runnables: AgentTaskRunnable is runanbles that will be executed on the
   642  	// agent.
   643  	Runnables []*AgentTaskRunnable `json:"runnables,omitempty"`
   644  	// UserAccount: User account on the VM to run the runnables in the
   645  	// agentTaskSpec. If not set, the runnable will be run under root user.
   646  	UserAccount *AgentTaskUserAccount `json:"userAccount,omitempty"`
   647  	// ForceSendFields is a list of field names (e.g. "Environment") to
   648  	// unconditionally include in API requests. By default, fields with empty or
   649  	// default values are omitted from API requests. See
   650  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   651  	// details.
   652  	ForceSendFields []string `json:"-"`
   653  	// NullFields is a list of field names (e.g. "Environment") to include in API
   654  	// requests with the JSON null value. By default, fields with empty values are
   655  	// omitted from API requests. See
   656  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   657  	NullFields []string `json:"-"`
   658  }
   659  
   660  func (s *AgentTaskSpec) MarshalJSON() ([]byte, error) {
   661  	type NoMethod AgentTaskSpec
   662  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   663  }
   664  
   665  // AgentTaskUserAccount: AgentTaskUserAccount contains the information of a
   666  // POSIX account on the guest os which is used to execute the runnables.
   667  type AgentTaskUserAccount struct {
   668  	// Gid: gid id an unique identifier of the POSIX account group corresponding to
   669  	// the user account.
   670  	Gid int64 `json:"gid,omitempty,string"`
   671  	// Uid: uid is an unique identifier of the POSIX account corresponding to the
   672  	// user account.
   673  	Uid int64 `json:"uid,omitempty,string"`
   674  	// ForceSendFields is a list of field names (e.g. "Gid") to unconditionally
   675  	// include in API requests. By default, fields with empty or default values are
   676  	// omitted from API requests. See
   677  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   678  	// details.
   679  	ForceSendFields []string `json:"-"`
   680  	// NullFields is a list of field names (e.g. "Gid") to include in API requests
   681  	// with the JSON null value. By default, fields with empty values are omitted
   682  	// from API requests. See
   683  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   684  	NullFields []string `json:"-"`
   685  }
   686  
   687  func (s *AgentTaskUserAccount) MarshalJSON() ([]byte, error) {
   688  	type NoMethod AgentTaskUserAccount
   689  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   690  }
   691  
   692  // AgentTimingInfo: VM timing information
   693  type AgentTimingInfo struct {
   694  	// AgentStartupTime: Agent startup time
   695  	AgentStartupTime string `json:"agentStartupTime,omitempty"`
   696  	// BootTime: Boot timestamp of the VM OS
   697  	BootTime string `json:"bootTime,omitempty"`
   698  	// ScriptStartupTime: Startup time of the Batch VM script.
   699  	ScriptStartupTime string `json:"scriptStartupTime,omitempty"`
   700  	// ForceSendFields is a list of field names (e.g. "AgentStartupTime") to
   701  	// unconditionally include in API requests. By default, fields with empty or
   702  	// default values are omitted from API requests. See
   703  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   704  	// details.
   705  	ForceSendFields []string `json:"-"`
   706  	// NullFields is a list of field names (e.g. "AgentStartupTime") to include in
   707  	// API requests with the JSON null value. By default, fields with empty values
   708  	// are omitted from API requests. See
   709  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   710  	NullFields []string `json:"-"`
   711  }
   712  
   713  func (s *AgentTimingInfo) MarshalJSON() ([]byte, error) {
   714  	type NoMethod AgentTimingInfo
   715  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   716  }
   717  
   718  // AllocationPolicy: A Job's resource allocation policy describes when, where,
   719  // and how compute resources should be allocated for the Job.
   720  type AllocationPolicy struct {
   721  	// Instances: Describe instances that can be created by this AllocationPolicy.
   722  	// Only instances[0] is supported now.
   723  	Instances []*InstancePolicyOrTemplate `json:"instances,omitempty"`
   724  	// Labels: Labels applied to all VM instances and other resources created by
   725  	// AllocationPolicy. Labels could be user provided or system generated. You can
   726  	// assign up to 64 labels. Google Compute Engine label restrictions
   727  	// (https://cloud.google.com/compute/docs/labeling-resources#restrictions)
   728  	// apply. Label names that start with "goog-" or "google-" are reserved.
   729  	Labels map[string]string `json:"labels,omitempty"`
   730  	// Location: Location where compute resources should be allocated for the Job.
   731  	Location *LocationPolicy `json:"location,omitempty"`
   732  	// Network: The network policy. If you define an instance template in the
   733  	// `InstancePolicyOrTemplate` field, Batch will use the network settings in the
   734  	// instance template instead of this field.
   735  	Network *NetworkPolicy `json:"network,omitempty"`
   736  	// Placement: The placement policy.
   737  	Placement *PlacementPolicy `json:"placement,omitempty"`
   738  	// ServiceAccount: Defines the service account for Batch-created VMs. If
   739  	// omitted, the default Compute Engine service account
   740  	// (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
   741  	// is used. Must match the service account specified in any used instance
   742  	// template configured in the Batch job. Includes the following fields: *
   743  	// email: The service account's email address. If not set, the default Compute
   744  	// Engine service account is used. * scopes: Additional OAuth scopes to grant
   745  	// the service account, beyond the default cloud-platform scope. (list of
   746  	// strings)
   747  	ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
   748  	// Tags: Optional. Tags applied to the VM instances. The tags identify valid
   749  	// sources or targets for network firewalls. Each tag must be 1-63 characters
   750  	// long, and comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
   751  	Tags []string `json:"tags,omitempty"`
   752  	// ForceSendFields is a list of field names (e.g. "Instances") to
   753  	// unconditionally include in API requests. By default, fields with empty or
   754  	// default values are omitted from API requests. See
   755  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   756  	// details.
   757  	ForceSendFields []string `json:"-"`
   758  	// NullFields is a list of field names (e.g. "Instances") to include in API
   759  	// requests with the JSON null value. By default, fields with empty values are
   760  	// omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   762  	NullFields []string `json:"-"`
   763  }
   764  
   765  func (s *AllocationPolicy) MarshalJSON() ([]byte, error) {
   766  	type NoMethod AllocationPolicy
   767  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   768  }
   769  
   770  // AttachedDisk: A new or an existing persistent disk (PD) or a local ssd
   771  // attached to a VM instance.
   772  type AttachedDisk struct {
   773  	// DeviceName: Device name that the guest operating system will see. It is used
   774  	// by Runnable.volumes field to mount disks. So please specify the device_name
   775  	// if you want Batch to help mount the disk, and it should match the
   776  	// device_name field in volumes.
   777  	DeviceName string `json:"deviceName,omitempty"`
   778  	// ExistingDisk: Name of an existing PD.
   779  	ExistingDisk string `json:"existingDisk,omitempty"`
   780  	NewDisk      *Disk  `json:"newDisk,omitempty"`
   781  	// ForceSendFields is a list of field names (e.g. "DeviceName") to
   782  	// unconditionally include in API requests. By default, fields with empty or
   783  	// default values are omitted from API requests. See
   784  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   785  	// details.
   786  	ForceSendFields []string `json:"-"`
   787  	// NullFields is a list of field names (e.g. "DeviceName") to include in API
   788  	// requests with the JSON null value. By default, fields with empty values are
   789  	// omitted from API requests. See
   790  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   791  	NullFields []string `json:"-"`
   792  }
   793  
   794  func (s *AttachedDisk) MarshalJSON() ([]byte, error) {
   795  	type NoMethod AttachedDisk
   796  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   797  }
   798  
   799  // Barrier: Barrier runnable blocks until all tasks in a taskgroup reach it.
   800  type Barrier struct {
   801  	// Name: Barriers are identified by their index in runnable list. Names are not
   802  	// required, but if present should be an identifier.
   803  	Name string `json:"name,omitempty"`
   804  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   805  	// include in API requests. By default, fields with empty or default values are
   806  	// omitted from API requests. See
   807  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   808  	// details.
   809  	ForceSendFields []string `json:"-"`
   810  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   811  	// with the JSON null value. By default, fields with empty values are omitted
   812  	// from API requests. See
   813  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   814  	NullFields []string `json:"-"`
   815  }
   816  
   817  func (s *Barrier) MarshalJSON() ([]byte, error) {
   818  	type NoMethod Barrier
   819  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   820  }
   821  
   822  // CancelOperationRequest: The request message for Operations.CancelOperation.
   823  type CancelOperationRequest struct {
   824  }
   825  
   826  // CloudLoggingOption: `CloudLoggingOption` contains additional settings for
   827  // Cloud Logging logs generated by Batch job.
   828  type CloudLoggingOption struct {
   829  	// UseGenericTaskMonitoredResource: Optional. Set this flag to true to change
   830  	// the monitored resource type
   831  	// (https://cloud.google.com/monitoring/api/resources) for Cloud Logging logs
   832  	// generated by this Batch job from the `batch.googleapis.com/Job`
   833  	// (https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job)
   834  	// type to the formerly used `generic_task`
   835  	// (https://cloud.google.com/monitoring/api/resources#tag_generic_task) type.
   836  	UseGenericTaskMonitoredResource bool `json:"useGenericTaskMonitoredResource,omitempty"`
   837  	// ForceSendFields is a list of field names (e.g.
   838  	// "UseGenericTaskMonitoredResource") to unconditionally include in API
   839  	// requests. By default, fields with empty or default values are omitted from
   840  	// API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   842  	// details.
   843  	ForceSendFields []string `json:"-"`
   844  	// NullFields is a list of field names (e.g. "UseGenericTaskMonitoredResource")
   845  	// to include in API requests with the JSON null value. By default, fields with
   846  	// empty values are omitted from API requests. See
   847  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   848  	NullFields []string `json:"-"`
   849  }
   850  
   851  func (s *CloudLoggingOption) MarshalJSON() ([]byte, error) {
   852  	type NoMethod CloudLoggingOption
   853  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   854  }
   855  
   856  // ComputeResource: Compute resource requirements. ComputeResource defines the
   857  // amount of resources required for each task. Make sure your tasks have enough
   858  // resources to successfully run. If you also define the types of resources for
   859  // a job to use with the InstancePolicyOrTemplate
   860  // (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
   861  // field, make sure both fields are compatible with each other.
   862  type ComputeResource struct {
   863  	// BootDiskMib: Extra boot disk size in MiB for each task.
   864  	BootDiskMib int64 `json:"bootDiskMib,omitempty,string"`
   865  	// CpuMilli: The milliCPU count. `cpuMilli` defines the amount of CPU resources
   866  	// per task in milliCPU units. For example, `1000` corresponds to 1 vCPU per
   867  	// task. If undefined, the default value is `2000`. If you also define the VM's
   868  	// machine type using the `machineType` in InstancePolicy
   869  	// (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy)
   870  	// field or inside the `instanceTemplate` in the InstancePolicyOrTemplate
   871  	// (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
   872  	// field, make sure the CPU resources for both fields are compatible with each
   873  	// other and with how many tasks you want to allow to run on the same VM at the
   874  	// same time. For example, if you specify the `n2-standard-2` machine type,
   875  	// which has 2 vCPUs each, you are recommended to set `cpuMilli` no more than
   876  	// `2000`, or you are recommended to run two tasks on the same VM if you set
   877  	// `cpuMilli` to `1000` or less.
   878  	CpuMilli int64 `json:"cpuMilli,omitempty,string"`
   879  	// MemoryMib: Memory in MiB. `memoryMib` defines the amount of memory per task
   880  	// in MiB units. If undefined, the default value is `2000`. If you also define
   881  	// the VM's machine type using the `machineType` in InstancePolicy
   882  	// (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy)
   883  	// field or inside the `instanceTemplate` in the InstancePolicyOrTemplate
   884  	// (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
   885  	// field, make sure the memory resources for both fields are compatible with
   886  	// each other and with how many tasks you want to allow to run on the same VM
   887  	// at the same time. For example, if you specify the `n2-standard-2` machine
   888  	// type, which has 8 GiB each, you are recommended to set `memoryMib` to no
   889  	// more than `8192`, or you are recommended to run two tasks on the same VM if
   890  	// you set `memoryMib` to `4096` or less.
   891  	MemoryMib int64 `json:"memoryMib,omitempty,string"`
   892  	// ForceSendFields is a list of field names (e.g. "BootDiskMib") to
   893  	// unconditionally include in API requests. By default, fields with empty or
   894  	// default values are omitted from API requests. See
   895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   896  	// details.
   897  	ForceSendFields []string `json:"-"`
   898  	// NullFields is a list of field names (e.g. "BootDiskMib") to include in API
   899  	// requests with the JSON null value. By default, fields with empty values are
   900  	// omitted from API requests. See
   901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   902  	NullFields []string `json:"-"`
   903  }
   904  
   905  func (s *ComputeResource) MarshalJSON() ([]byte, error) {
   906  	type NoMethod ComputeResource
   907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   908  }
   909  
   910  // Container: Container runnable.
   911  type Container struct {
   912  	// BlockExternalNetwork: If set to true, external network access to and from
   913  	// container will be blocked, containers that are with block_external_network
   914  	// as true can still communicate with each other, network cannot be specified
   915  	// in the `container.options` field.
   916  	BlockExternalNetwork bool `json:"blockExternalNetwork,omitempty"`
   917  	// Commands: Overrides the `CMD` specified in the container. If there is an
   918  	// ENTRYPOINT (either in the container image or with the entrypoint field
   919  	// below) then commands are appended as arguments to the ENTRYPOINT.
   920  	Commands []string `json:"commands,omitempty"`
   921  	// EnableImageStreaming: Optional. If set to true, this container runnable uses
   922  	// Image streaming. Use Image streaming to allow the runnable to initialize
   923  	// without waiting for the entire container image to download, which can
   924  	// significantly reduce startup time for large container images. When
   925  	// `enableImageStreaming` is set to true, the container runtime is containerd
   926  	// (https://containerd.io/) instead of Docker. Additionally, this container
   927  	// runnable only supports the following `container` subfields: `imageUri`,
   928  	// `commands[]`, `entrypoint`, and `volumes[]`; any other `container` subfields
   929  	// are ignored. For more information about the requirements and limitations for
   930  	// using Image streaming with Batch, see the `image-streaming` sample on GitHub
   931  	// (https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
   932  	EnableImageStreaming bool `json:"enableImageStreaming,omitempty"`
   933  	// Entrypoint: Overrides the `ENTRYPOINT` specified in the container.
   934  	Entrypoint string `json:"entrypoint,omitempty"`
   935  	// ImageUri: The URI to pull the container image from.
   936  	ImageUri string `json:"imageUri,omitempty"`
   937  	// Options: Arbitrary additional options to include in the "docker run" command
   938  	// when running this container, e.g. "--network host".
   939  	Options string `json:"options,omitempty"`
   940  	// Password: Required if the container image is from a private Docker registry.
   941  	// The password to login to the Docker registry that contains the image. For
   942  	// security, it is strongly recommended to specify an encrypted password by
   943  	// using a Secret Manager secret: `projects/*/secrets/*/versions/*`. Warning:
   944  	// If you specify the password using plain text, you risk the password being
   945  	// exposed to any users who can view the job or its logs. To avoid this risk,
   946  	// specify a secret that contains the password instead. Learn more about Secret
   947  	// Manager (https://cloud.google.com/secret-manager/docs/) and using Secret
   948  	// Manager with Batch
   949  	// (https://cloud.google.com/batch/docs/create-run-job-secret-manager).
   950  	Password string `json:"password,omitempty"`
   951  	// Username: Required if the container image is from a private Docker registry.
   952  	// The username to login to the Docker registry that contains the image. You
   953  	// can either specify the username directly by using plain text or specify an
   954  	// encrypted username by using a Secret Manager secret:
   955  	// `projects/*/secrets/*/versions/*`. However, using a secret is recommended
   956  	// for enhanced security. Caution: If you specify the username using plain
   957  	// text, you risk the username being exposed to any users who can view the job
   958  	// or its logs. To avoid this risk, specify a secret that contains the username
   959  	// instead. Learn more about Secret Manager
   960  	// (https://cloud.google.com/secret-manager/docs/) and using Secret Manager
   961  	// with Batch
   962  	// (https://cloud.google.com/batch/docs/create-run-job-secret-manager).
   963  	Username string `json:"username,omitempty"`
   964  	// Volumes: Volumes to mount (bind mount) from the host machine files or
   965  	// directories into the container, formatted to match docker run's --volume
   966  	// option, e.g. /foo:/bar, or /foo:/bar:ro If the `TaskSpec.Volumes` field is
   967  	// specified but this field is not, Batch will mount each volume from the host
   968  	// machine to the container with the same mount path by default. In this case,
   969  	// the default mount option for containers will be read-only (ro) for existing
   970  	// persistent disks and read-write (rw) for other volume types, regardless of
   971  	// the original mount options specified in `TaskSpec.Volumes`. If you need
   972  	// different mount settings, you can explicitly configure them in this field.
   973  	Volumes []string `json:"volumes,omitempty"`
   974  	// ForceSendFields is a list of field names (e.g. "BlockExternalNetwork") to
   975  	// unconditionally include in API requests. By default, fields with empty or
   976  	// default values are omitted from API requests. See
   977  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   978  	// details.
   979  	ForceSendFields []string `json:"-"`
   980  	// NullFields is a list of field names (e.g. "BlockExternalNetwork") to include
   981  	// in API requests with the JSON null value. By default, fields with empty
   982  	// values are omitted from API requests. See
   983  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   984  	NullFields []string `json:"-"`
   985  }
   986  
   987  func (s *Container) MarshalJSON() ([]byte, error) {
   988  	type NoMethod Container
   989  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   990  }
   991  
   992  // Disk: A new persistent disk or a local ssd. A VM can only have one local SSD
   993  // setting but multiple local SSD partitions. See
   994  // https://cloud.google.com/compute/docs/disks#pdspecs and
   995  // https://cloud.google.com/compute/docs/disks#localssds.
   996  type Disk struct {
   997  	// DiskInterface: Local SSDs are available through both "SCSI" and "NVMe"
   998  	// interfaces. If not indicated, "NVMe" will be the default one for local ssds.
   999  	// This field is ignored for persistent disks as the interface is chosen
  1000  	// automatically. See
  1001  	// https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
  1002  	DiskInterface string `json:"diskInterface,omitempty"`
  1003  	// Image: URL for a VM image to use as the data source for this disk. For
  1004  	// example, the following are all valid URLs: * Specify the image by its family
  1005  	// name: projects/{project}/global/images/family/{image_family} * Specify the
  1006  	// image version: projects/{project}/global/images/{image_version} You can also
  1007  	// use Batch customized image in short names. The following image values are
  1008  	// supported for a boot disk: * `batch-debian`: use Batch Debian images. *
  1009  	// `batch-centos`: use Batch CentOS images. * `batch-cos`: use Batch
  1010  	// Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS
  1011  	// images. * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
  1012  	Image string `json:"image,omitempty"`
  1013  	// SizeGb: Disk size in GB. **Non-Boot Disk**: If the `type` specifies a
  1014  	// persistent disk, this field is ignored if `data_source` is set as `image` or
  1015  	// `snapshot`. If the `type` specifies a local SSD, this field should be a
  1016  	// multiple of 375 GB, otherwise, the final size will be the next greater
  1017  	// multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size
  1018  	// based on source image and task requirements if you do not speicify the size.
  1019  	// If both this field and the `boot_disk_mib` field in task spec's
  1020  	// `compute_resource` are defined, Batch will only honor this field. Also, this
  1021  	// field should be no smaller than the source disk's size when the
  1022  	// `data_source` is set as `snapshot` or `image`. For example, if you set an
  1023  	// image as the `data_source` field and the image's default disk size 30 GB,
  1024  	// you can only use this field to make the disk larger or equal to 30 GB.
  1025  	SizeGb int64 `json:"sizeGb,omitempty,string"`
  1026  	// Snapshot: Name of a snapshot used as the data source. Snapshot is not
  1027  	// supported as boot disk now.
  1028  	Snapshot string `json:"snapshot,omitempty"`
  1029  	// Type: Disk type as shown in `gcloud compute disk-types list`. For example,
  1030  	// local SSD uses type "local-ssd". Persistent disks and boot disks use
  1031  	// "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard".
  1032  	Type string `json:"type,omitempty"`
  1033  	// ForceSendFields is a list of field names (e.g. "DiskInterface") to
  1034  	// unconditionally include in API requests. By default, fields with empty or
  1035  	// default values are omitted from API requests. See
  1036  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1037  	// details.
  1038  	ForceSendFields []string `json:"-"`
  1039  	// NullFields is a list of field names (e.g. "DiskInterface") to include in API
  1040  	// requests with the JSON null value. By default, fields with empty values are
  1041  	// omitted from API requests. See
  1042  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1043  	NullFields []string `json:"-"`
  1044  }
  1045  
  1046  func (s *Disk) MarshalJSON() ([]byte, error) {
  1047  	type NoMethod Disk
  1048  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1049  }
  1050  
  1051  // Empty: A generic empty message that you can re-use to avoid defining
  1052  // duplicated empty messages in your APIs. A typical example is to use it as
  1053  // the request or the response type of an API method. For instance: service Foo
  1054  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1055  type Empty struct {
  1056  	// ServerResponse contains the HTTP response code and headers from the server.
  1057  	googleapi.ServerResponse `json:"-"`
  1058  }
  1059  
  1060  // Environment: An Environment describes a collection of environment variables
  1061  // to set when executing Tasks.
  1062  type Environment struct {
  1063  	// EncryptedVariables: An encrypted JSON dictionary where the key/value pairs
  1064  	// correspond to environment variable names and their values.
  1065  	EncryptedVariables *KMSEnvMap `json:"encryptedVariables,omitempty"`
  1066  	// SecretVariables: A map of environment variable names to Secret Manager
  1067  	// secret names. The VM will access the named secrets to set the value of each
  1068  	// environment variable.
  1069  	SecretVariables map[string]string `json:"secretVariables,omitempty"`
  1070  	// Variables: A map of environment variable names to values.
  1071  	Variables map[string]string `json:"variables,omitempty"`
  1072  	// ForceSendFields is a list of field names (e.g. "EncryptedVariables") to
  1073  	// unconditionally include in API requests. By default, fields with empty or
  1074  	// default values are omitted from API requests. See
  1075  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1076  	// details.
  1077  	ForceSendFields []string `json:"-"`
  1078  	// NullFields is a list of field names (e.g. "EncryptedVariables") to include
  1079  	// in API requests with the JSON null value. By default, fields with empty
  1080  	// values are omitted from API requests. See
  1081  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1082  	NullFields []string `json:"-"`
  1083  }
  1084  
  1085  func (s *Environment) MarshalJSON() ([]byte, error) {
  1086  	type NoMethod Environment
  1087  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1088  }
  1089  
  1090  // GCS: Represents a Google Cloud Storage volume.
  1091  type GCS struct {
  1092  	// RemotePath: Remote path, either a bucket name or a subdirectory of a bucket,
  1093  	// e.g.: bucket_name, bucket_name/subdirectory/
  1094  	RemotePath string `json:"remotePath,omitempty"`
  1095  	// ForceSendFields is a list of field names (e.g. "RemotePath") to
  1096  	// unconditionally include in API requests. By default, fields with empty or
  1097  	// default values are omitted from API requests. See
  1098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1099  	// details.
  1100  	ForceSendFields []string `json:"-"`
  1101  	// NullFields is a list of field names (e.g. "RemotePath") to include in API
  1102  	// requests with the JSON null value. By default, fields with empty values are
  1103  	// omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1105  	NullFields []string `json:"-"`
  1106  }
  1107  
  1108  func (s *GCS) MarshalJSON() ([]byte, error) {
  1109  	type NoMethod GCS
  1110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1111  }
  1112  
  1113  // InstancePolicy: InstancePolicy describes an instance type and resources
  1114  // attached to each VM created by this InstancePolicy.
  1115  type InstancePolicy struct {
  1116  	// Accelerators: The accelerators attached to each VM instance.
  1117  	Accelerators []*Accelerator `json:"accelerators,omitempty"`
  1118  	// BootDisk: Boot disk to be created and attached to each VM by this
  1119  	// InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API
  1120  	// now only supports booting from image.
  1121  	BootDisk *Disk `json:"bootDisk,omitempty"`
  1122  	// Disks: Non-boot disks to be attached for each VM created by this
  1123  	// InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot
  1124  	// disk is a disk that can be of a device with a file system or a raw storage
  1125  	// drive that is not ready for data storage and accessing.
  1126  	Disks []*AttachedDisk `json:"disks,omitempty"`
  1127  	// MachineType: The Compute Engine machine type.
  1128  	MachineType string `json:"machineType,omitempty"`
  1129  	// MinCpuPlatform: The minimum CPU platform. See
  1130  	// https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
  1131  	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
  1132  	// ProvisioningModel: The provisioning model.
  1133  	//
  1134  	// Possible values:
  1135  	//   "PROVISIONING_MODEL_UNSPECIFIED" - Unspecified.
  1136  	//   "STANDARD" - Standard VM.
  1137  	//   "SPOT" - SPOT VM.
  1138  	//   "PREEMPTIBLE" - Preemptible VM (PVM). Above SPOT VM is the preferable
  1139  	// model for preemptible VM instances: the old preemptible VM model (indicated
  1140  	// by this field) is the older model, and has been migrated to use the SPOT
  1141  	// model as the underlying technology. This old model will still be supported.
  1142  	ProvisioningModel string `json:"provisioningModel,omitempty"`
  1143  	// Reservation: Optional. If specified, VMs will consume only the specified
  1144  	// reservation. If not specified (default), VMs will consume any applicable
  1145  	// reservation.
  1146  	Reservation string `json:"reservation,omitempty"`
  1147  	// ForceSendFields is a list of field names (e.g. "Accelerators") to
  1148  	// unconditionally include in API requests. By default, fields with empty or
  1149  	// default values are omitted from API requests. See
  1150  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1151  	// details.
  1152  	ForceSendFields []string `json:"-"`
  1153  	// NullFields is a list of field names (e.g. "Accelerators") to include in API
  1154  	// requests with the JSON null value. By default, fields with empty values are
  1155  	// omitted from API requests. See
  1156  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1157  	NullFields []string `json:"-"`
  1158  }
  1159  
  1160  func (s *InstancePolicy) MarshalJSON() ([]byte, error) {
  1161  	type NoMethod InstancePolicy
  1162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1163  }
  1164  
  1165  // InstancePolicyOrTemplate: InstancePolicyOrTemplate lets you define the type
  1166  // of resources to use for this job either with an InstancePolicy or an
  1167  // instance template. If undefined, Batch picks the type of VM to use and
  1168  // doesn't include optional VM resources such as GPUs and extra disks.
  1169  type InstancePolicyOrTemplate struct {
  1170  	// InstallGpuDrivers: Set this field true if users want Batch to help fetch
  1171  	// drivers from a third party location and install them for GPUs specified in
  1172  	// policy.accelerators or instance_template on their behalf. Default is false.
  1173  	// For Container-Optimized Image cases, Batch will install the accelerator
  1174  	// driver following milestones of
  1175  	// https://cloud.google.com/container-optimized-os/docs/release-notes. For non
  1176  	// Container-Optimized Image cases, following
  1177  	// https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
  1178  	InstallGpuDrivers bool `json:"installGpuDrivers,omitempty"`
  1179  	// InstanceTemplate: Name of an instance template used to create VMs. Named the
  1180  	// field as 'instance_template' instead of 'template' to avoid c++ keyword
  1181  	// conflict.
  1182  	InstanceTemplate string `json:"instanceTemplate,omitempty"`
  1183  	// Policy: InstancePolicy.
  1184  	Policy *InstancePolicy `json:"policy,omitempty"`
  1185  	// ForceSendFields is a list of field names (e.g. "InstallGpuDrivers") to
  1186  	// unconditionally include in API requests. By default, fields with empty or
  1187  	// default values are omitted from API requests. See
  1188  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1189  	// details.
  1190  	ForceSendFields []string `json:"-"`
  1191  	// NullFields is a list of field names (e.g. "InstallGpuDrivers") to include in
  1192  	// API requests with the JSON null value. By default, fields with empty values
  1193  	// are omitted from API requests. See
  1194  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1195  	NullFields []string `json:"-"`
  1196  }
  1197  
  1198  func (s *InstancePolicyOrTemplate) MarshalJSON() ([]byte, error) {
  1199  	type NoMethod InstancePolicyOrTemplate
  1200  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1201  }
  1202  
  1203  // InstanceStatus: VM instance status.
  1204  type InstanceStatus struct {
  1205  	// BootDisk: The VM boot disk.
  1206  	BootDisk *Disk `json:"bootDisk,omitempty"`
  1207  	// MachineType: The Compute Engine machine type.
  1208  	MachineType string `json:"machineType,omitempty"`
  1209  	// ProvisioningModel: The VM instance provisioning model.
  1210  	//
  1211  	// Possible values:
  1212  	//   "PROVISIONING_MODEL_UNSPECIFIED" - Unspecified.
  1213  	//   "STANDARD" - Standard VM.
  1214  	//   "SPOT" - SPOT VM.
  1215  	//   "PREEMPTIBLE" - Preemptible VM (PVM). Above SPOT VM is the preferable
  1216  	// model for preemptible VM instances: the old preemptible VM model (indicated
  1217  	// by this field) is the older model, and has been migrated to use the SPOT
  1218  	// model as the underlying technology. This old model will still be supported.
  1219  	ProvisioningModel string `json:"provisioningModel,omitempty"`
  1220  	// TaskPack: The max number of tasks can be assigned to this instance type.
  1221  	TaskPack int64 `json:"taskPack,omitempty,string"`
  1222  	// ForceSendFields is a list of field names (e.g. "BootDisk") to
  1223  	// unconditionally include in API requests. By default, fields with empty or
  1224  	// default values are omitted from API requests. See
  1225  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1226  	// details.
  1227  	ForceSendFields []string `json:"-"`
  1228  	// NullFields is a list of field names (e.g. "BootDisk") to include in API
  1229  	// requests with the JSON null value. By default, fields with empty values are
  1230  	// omitted from API requests. See
  1231  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1232  	NullFields []string `json:"-"`
  1233  }
  1234  
  1235  func (s *InstanceStatus) MarshalJSON() ([]byte, error) {
  1236  	type NoMethod InstanceStatus
  1237  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1238  }
  1239  
  1240  // Job: The Cloud Batch Job description.
  1241  type Job struct {
  1242  	// AllocationPolicy: Compute resource allocation for all TaskGroups in the Job.
  1243  	AllocationPolicy *AllocationPolicy `json:"allocationPolicy,omitempty"`
  1244  	// CreateTime: Output only. When the Job was created.
  1245  	CreateTime string `json:"createTime,omitempty"`
  1246  	// Labels: Labels for the Job. Labels could be user provided or system
  1247  	// generated. For example, "labels": { "department": "finance", "environment":
  1248  	// "test" } You can assign up to 64 labels. Google Compute Engine label
  1249  	// restrictions
  1250  	// (https://cloud.google.com/compute/docs/labeling-resources#restrictions)
  1251  	// apply. Label names that start with "goog-" or "google-" are reserved.
  1252  	Labels map[string]string `json:"labels,omitempty"`
  1253  	// LogsPolicy: Log preservation policy for the Job.
  1254  	LogsPolicy *LogsPolicy `json:"logsPolicy,omitempty"`
  1255  	// Name: Output only. Job name. For example:
  1256  	// "projects/123456/locations/us-central1/jobs/job01".
  1257  	Name string `json:"name,omitempty"`
  1258  	// Notifications: Notification configurations.
  1259  	Notifications []*JobNotification `json:"notifications,omitempty"`
  1260  	// Priority: Priority of the Job. The valid value range is [0, 100). Default
  1261  	// value is 0. Higher value indicates higher priority. A job with higher
  1262  	// priority value is more likely to run earlier if all other requirements are
  1263  	// satisfied.
  1264  	Priority int64 `json:"priority,omitempty,string"`
  1265  	// Status: Output only. Job status. It is read only for users.
  1266  	Status *JobStatus `json:"status,omitempty"`
  1267  	// TaskGroups: Required. TaskGroups in the Job. Only one TaskGroup is supported
  1268  	// now.
  1269  	TaskGroups []*TaskGroup `json:"taskGroups,omitempty"`
  1270  	// Uid: Output only. A system generated unique ID for the Job.
  1271  	Uid string `json:"uid,omitempty"`
  1272  	// UpdateTime: Output only. The last time the Job was updated.
  1273  	UpdateTime string `json:"updateTime,omitempty"`
  1274  
  1275  	// ServerResponse contains the HTTP response code and headers from the server.
  1276  	googleapi.ServerResponse `json:"-"`
  1277  	// ForceSendFields is a list of field names (e.g. "AllocationPolicy") to
  1278  	// unconditionally include in API requests. By default, fields with empty or
  1279  	// default values are omitted from API requests. See
  1280  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1281  	// details.
  1282  	ForceSendFields []string `json:"-"`
  1283  	// NullFields is a list of field names (e.g. "AllocationPolicy") to include in
  1284  	// API requests with the JSON null value. By default, fields with empty values
  1285  	// are omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1287  	NullFields []string `json:"-"`
  1288  }
  1289  
  1290  func (s *Job) MarshalJSON() ([]byte, error) {
  1291  	type NoMethod Job
  1292  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1293  }
  1294  
  1295  // JobNotification: Notification configurations.
  1296  type JobNotification struct {
  1297  	// Message: The attribute requirements of messages to be sent to this Pub/Sub
  1298  	// topic. Without this field, no message will be sent.
  1299  	Message *Message `json:"message,omitempty"`
  1300  	// PubsubTopic: The Pub/Sub topic where notifications like the job state
  1301  	// changes will be published. The topic must exist in the same project as the
  1302  	// job and billings will be charged to this project. If not specified, no
  1303  	// Pub/Sub messages will be sent. Topic format:
  1304  	// `projects/{project}/topics/{topic}`.
  1305  	PubsubTopic string `json:"pubsubTopic,omitempty"`
  1306  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
  1307  	// include in API requests. By default, fields with empty or default values are
  1308  	// omitted from API requests. See
  1309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1310  	// details.
  1311  	ForceSendFields []string `json:"-"`
  1312  	// NullFields is a list of field names (e.g. "Message") to include in API
  1313  	// requests with the JSON null value. By default, fields with empty values are
  1314  	// omitted from API requests. See
  1315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1316  	NullFields []string `json:"-"`
  1317  }
  1318  
  1319  func (s *JobNotification) MarshalJSON() ([]byte, error) {
  1320  	type NoMethod JobNotification
  1321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1322  }
  1323  
  1324  // JobStatus: Job status.
  1325  type JobStatus struct {
  1326  	// RunDuration: The duration of time that the Job spent in status RUNNING.
  1327  	RunDuration string `json:"runDuration,omitempty"`
  1328  	// State: Job state
  1329  	//
  1330  	// Possible values:
  1331  	//   "STATE_UNSPECIFIED" - Job state unspecified.
  1332  	//   "QUEUED" - Job is admitted (validated and persisted) and waiting for
  1333  	// resources.
  1334  	//   "SCHEDULED" - Job is scheduled to run as soon as resource allocation is
  1335  	// ready. The resource allocation may happen at a later time but with a high
  1336  	// chance to succeed.
  1337  	//   "RUNNING" - Resource allocation has been successful. At least one Task in
  1338  	// the Job is RUNNING.
  1339  	//   "SUCCEEDED" - All Tasks in the Job have finished successfully.
  1340  	//   "FAILED" - At least one Task in the Job has failed.
  1341  	//   "DELETION_IN_PROGRESS" - The Job will be deleted, but has not been deleted
  1342  	// yet. Typically this is because resources used by the Job are still being
  1343  	// cleaned up.
  1344  	State string `json:"state,omitempty"`
  1345  	// StatusEvents: Job status events
  1346  	StatusEvents []*StatusEvent `json:"statusEvents,omitempty"`
  1347  	// TaskGroups: Aggregated task status for each TaskGroup in the Job. The map
  1348  	// key is TaskGroup ID.
  1349  	TaskGroups map[string]TaskGroupStatus `json:"taskGroups,omitempty"`
  1350  	// ForceSendFields is a list of field names (e.g. "RunDuration") to
  1351  	// unconditionally include in API requests. By default, fields with empty or
  1352  	// default values are omitted from API requests. See
  1353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1354  	// details.
  1355  	ForceSendFields []string `json:"-"`
  1356  	// NullFields is a list of field names (e.g. "RunDuration") to include in API
  1357  	// requests with the JSON null value. By default, fields with empty values are
  1358  	// omitted from API requests. See
  1359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1360  	NullFields []string `json:"-"`
  1361  }
  1362  
  1363  func (s *JobStatus) MarshalJSON() ([]byte, error) {
  1364  	type NoMethod JobStatus
  1365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1366  }
  1367  
  1368  type KMSEnvMap struct {
  1369  	// CipherText: The value of the cipherText response from the `encrypt` method.
  1370  	CipherText string `json:"cipherText,omitempty"`
  1371  	// KeyName: The name of the KMS key that will be used to decrypt the cipher
  1372  	// text.
  1373  	KeyName string `json:"keyName,omitempty"`
  1374  	// ForceSendFields is a list of field names (e.g. "CipherText") to
  1375  	// unconditionally include in API requests. By default, fields with empty or
  1376  	// default values are omitted from API requests. See
  1377  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1378  	// details.
  1379  	ForceSendFields []string `json:"-"`
  1380  	// NullFields is a list of field names (e.g. "CipherText") to include in API
  1381  	// requests with the JSON null value. By default, fields with empty values are
  1382  	// omitted from API requests. See
  1383  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1384  	NullFields []string `json:"-"`
  1385  }
  1386  
  1387  func (s *KMSEnvMap) MarshalJSON() ([]byte, error) {
  1388  	type NoMethod KMSEnvMap
  1389  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1390  }
  1391  
  1392  // LifecyclePolicy: LifecyclePolicy describes how to deal with task failures
  1393  // based on different conditions.
  1394  type LifecyclePolicy struct {
  1395  	// Action: Action to execute when ActionCondition is true. When RETRY_TASK is
  1396  	// specified, we will retry failed tasks if we notice any exit code match and
  1397  	// fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we
  1398  	// will fail tasks if we notice any exit code match and retry tasks if no match
  1399  	// is found.
  1400  	//
  1401  	// Possible values:
  1402  	//   "ACTION_UNSPECIFIED" - Action unspecified.
  1403  	//   "RETRY_TASK" - Action that tasks in the group will be scheduled to
  1404  	// re-execute.
  1405  	//   "FAIL_TASK" - Action that tasks in the group will be stopped immediately.
  1406  	Action string `json:"action,omitempty"`
  1407  	// ActionCondition: Conditions that decide why a task failure is dealt with a
  1408  	// specific action.
  1409  	ActionCondition *ActionCondition `json:"actionCondition,omitempty"`
  1410  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1411  	// include in API requests. By default, fields with empty or default values are
  1412  	// omitted from API requests. See
  1413  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1414  	// details.
  1415  	ForceSendFields []string `json:"-"`
  1416  	// NullFields is a list of field names (e.g. "Action") to include in API
  1417  	// requests with the JSON null value. By default, fields with empty values are
  1418  	// omitted from API requests. See
  1419  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1420  	NullFields []string `json:"-"`
  1421  }
  1422  
  1423  func (s *LifecyclePolicy) MarshalJSON() ([]byte, error) {
  1424  	type NoMethod LifecyclePolicy
  1425  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1426  }
  1427  
  1428  // ListJobsResponse: ListJob Response.
  1429  type ListJobsResponse struct {
  1430  	// Jobs: Jobs.
  1431  	Jobs []*Job `json:"jobs,omitempty"`
  1432  	// NextPageToken: Next page token.
  1433  	NextPageToken string `json:"nextPageToken,omitempty"`
  1434  	// Unreachable: Locations that could not be reached.
  1435  	Unreachable []string `json:"unreachable,omitempty"`
  1436  
  1437  	// ServerResponse contains the HTTP response code and headers from the server.
  1438  	googleapi.ServerResponse `json:"-"`
  1439  	// ForceSendFields is a list of field names (e.g. "Jobs") to unconditionally
  1440  	// include in API requests. By default, fields with empty or default values are
  1441  	// omitted from API requests. See
  1442  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1443  	// details.
  1444  	ForceSendFields []string `json:"-"`
  1445  	// NullFields is a list of field names (e.g. "Jobs") to include in API requests
  1446  	// with the JSON null value. By default, fields with empty values are omitted
  1447  	// from API requests. See
  1448  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1449  	NullFields []string `json:"-"`
  1450  }
  1451  
  1452  func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
  1453  	type NoMethod ListJobsResponse
  1454  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1455  }
  1456  
  1457  // ListLocationsResponse: The response message for Locations.ListLocations.
  1458  type ListLocationsResponse struct {
  1459  	// Locations: A list of locations that matches the specified filter in the
  1460  	// request.
  1461  	Locations []*Location `json:"locations,omitempty"`
  1462  	// NextPageToken: The standard List next-page token.
  1463  	NextPageToken string `json:"nextPageToken,omitempty"`
  1464  
  1465  	// ServerResponse contains the HTTP response code and headers from the server.
  1466  	googleapi.ServerResponse `json:"-"`
  1467  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1468  	// unconditionally include in API requests. By default, fields with empty or
  1469  	// default values are omitted from API requests. See
  1470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1471  	// details.
  1472  	ForceSendFields []string `json:"-"`
  1473  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1474  	// requests with the JSON null value. By default, fields with empty values are
  1475  	// omitted from API requests. See
  1476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1477  	NullFields []string `json:"-"`
  1478  }
  1479  
  1480  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1481  	type NoMethod ListLocationsResponse
  1482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1483  }
  1484  
  1485  // ListOperationsResponse: The response message for Operations.ListOperations.
  1486  type ListOperationsResponse struct {
  1487  	// NextPageToken: The standard List next-page token.
  1488  	NextPageToken string `json:"nextPageToken,omitempty"`
  1489  	// Operations: A list of operations that matches the specified filter in the
  1490  	// request.
  1491  	Operations []*Operation `json:"operations,omitempty"`
  1492  
  1493  	// ServerResponse contains the HTTP response code and headers from the server.
  1494  	googleapi.ServerResponse `json:"-"`
  1495  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1496  	// unconditionally include in API requests. By default, fields with empty or
  1497  	// default values are omitted from API requests. See
  1498  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1499  	// details.
  1500  	ForceSendFields []string `json:"-"`
  1501  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1502  	// requests with the JSON null value. By default, fields with empty values are
  1503  	// omitted from API requests. See
  1504  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1505  	NullFields []string `json:"-"`
  1506  }
  1507  
  1508  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1509  	type NoMethod ListOperationsResponse
  1510  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1511  }
  1512  
  1513  // ListTasksResponse: ListTasks Response.
  1514  type ListTasksResponse struct {
  1515  	// NextPageToken: Next page token.
  1516  	NextPageToken string `json:"nextPageToken,omitempty"`
  1517  	// Tasks: Tasks.
  1518  	Tasks []*Task `json:"tasks,omitempty"`
  1519  	// Unreachable: Locations that could not be reached.
  1520  	Unreachable []string `json:"unreachable,omitempty"`
  1521  
  1522  	// ServerResponse contains the HTTP response code and headers from the server.
  1523  	googleapi.ServerResponse `json:"-"`
  1524  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1525  	// unconditionally include in API requests. By default, fields with empty or
  1526  	// default values are omitted from API requests. See
  1527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1528  	// details.
  1529  	ForceSendFields []string `json:"-"`
  1530  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1531  	// requests with the JSON null value. By default, fields with empty values are
  1532  	// omitted from API requests. See
  1533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1534  	NullFields []string `json:"-"`
  1535  }
  1536  
  1537  func (s *ListTasksResponse) MarshalJSON() ([]byte, error) {
  1538  	type NoMethod ListTasksResponse
  1539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1540  }
  1541  
  1542  // Location: A resource that represents a Google Cloud location.
  1543  type Location struct {
  1544  	// DisplayName: The friendly name for this location, typically a nearby city
  1545  	// name. For example, "Tokyo".
  1546  	DisplayName string `json:"displayName,omitempty"`
  1547  	// Labels: Cross-service attributes for the location. For example
  1548  	// {"cloud.googleapis.com/region": "us-east1"}
  1549  	Labels map[string]string `json:"labels,omitempty"`
  1550  	// LocationId: The canonical id for this location. For example: "us-east1".
  1551  	LocationId string `json:"locationId,omitempty"`
  1552  	// Metadata: Service-specific metadata. For example the available capacity at
  1553  	// the given location.
  1554  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1555  	// Name: Resource name for the location, which may vary between
  1556  	// implementations. For example:
  1557  	// "projects/example-project/locations/us-east1"
  1558  	Name string `json:"name,omitempty"`
  1559  
  1560  	// ServerResponse contains the HTTP response code and headers from the server.
  1561  	googleapi.ServerResponse `json:"-"`
  1562  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1563  	// unconditionally include in API requests. By default, fields with empty or
  1564  	// default values are omitted from API requests. See
  1565  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1566  	// details.
  1567  	ForceSendFields []string `json:"-"`
  1568  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1569  	// requests with the JSON null value. By default, fields with empty values are
  1570  	// omitted from API requests. See
  1571  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1572  	NullFields []string `json:"-"`
  1573  }
  1574  
  1575  func (s *Location) MarshalJSON() ([]byte, error) {
  1576  	type NoMethod Location
  1577  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1578  }
  1579  
  1580  type LocationPolicy struct {
  1581  	// AllowedLocations: A list of allowed location names represented by internal
  1582  	// URLs. Each location can be a region or a zone. Only one region or multiple
  1583  	// zones in one region is supported now. For example, ["regions/us-central1"]
  1584  	// allow VMs in any zones in region us-central1. ["zones/us-central1-a",
  1585  	// "zones/us-central1-c"] only allow VMs in zones us-central1-a and
  1586  	// us-central1-c. Mixing locations from different regions would cause errors.
  1587  	// For example, ["regions/us-central1", "zones/us-central1-a",
  1588  	// "zones/us-central1-b", "zones/us-west1-a"] contains locations from two
  1589  	// distinct regions: us-central1 and us-west1. This combination will trigger an
  1590  	// error.
  1591  	AllowedLocations []string `json:"allowedLocations,omitempty"`
  1592  	// ForceSendFields is a list of field names (e.g. "AllowedLocations") to
  1593  	// unconditionally include in API requests. By default, fields with empty or
  1594  	// default values are omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1596  	// details.
  1597  	ForceSendFields []string `json:"-"`
  1598  	// NullFields is a list of field names (e.g. "AllowedLocations") to include in
  1599  	// API requests with the JSON null value. By default, fields with empty values
  1600  	// are omitted from API requests. See
  1601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1602  	NullFields []string `json:"-"`
  1603  }
  1604  
  1605  func (s *LocationPolicy) MarshalJSON() ([]byte, error) {
  1606  	type NoMethod LocationPolicy
  1607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1608  }
  1609  
  1610  // LogsPolicy: LogsPolicy describes how outputs from a Job's Tasks
  1611  // (stdout/stderr) will be preserved.
  1612  type LogsPolicy struct {
  1613  	// CloudLoggingOption: Optional. Additional settings for Cloud Logging. It will
  1614  	// only take effect when the destination of `LogsPolicy` is set to
  1615  	// `CLOUD_LOGGING`.
  1616  	CloudLoggingOption *CloudLoggingOption `json:"cloudLoggingOption,omitempty"`
  1617  	// Destination: Where logs should be saved.
  1618  	//
  1619  	// Possible values:
  1620  	//   "DESTINATION_UNSPECIFIED" - Logs are not preserved.
  1621  	//   "CLOUD_LOGGING" - Logs are streamed to Cloud Logging.
  1622  	//   "PATH" - Logs are saved to a file path.
  1623  	Destination string `json:"destination,omitempty"`
  1624  	// LogsPath: The path to which logs are saved when the destination = PATH. This
  1625  	// can be a local file path on the VM, or under the mount point of a Persistent
  1626  	// Disk or Filestore, or a Cloud Storage path.
  1627  	LogsPath string `json:"logsPath,omitempty"`
  1628  	// ForceSendFields is a list of field names (e.g. "CloudLoggingOption") to
  1629  	// unconditionally include in API requests. By default, fields with empty or
  1630  	// default values are omitted from API requests. See
  1631  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1632  	// details.
  1633  	ForceSendFields []string `json:"-"`
  1634  	// NullFields is a list of field names (e.g. "CloudLoggingOption") to include
  1635  	// in API requests with the JSON null value. By default, fields with empty
  1636  	// values are omitted from API requests. See
  1637  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1638  	NullFields []string `json:"-"`
  1639  }
  1640  
  1641  func (s *LogsPolicy) MarshalJSON() ([]byte, error) {
  1642  	type NoMethod LogsPolicy
  1643  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1644  }
  1645  
  1646  // Message: Message details. Describe the conditions under which messages will
  1647  // be sent. If no attribute is defined, no message will be sent by default. One
  1648  // message should specify either the job or the task level attributes, but not
  1649  // both. For example, job level: JOB_STATE_CHANGED and/or a specified
  1650  // new_job_state; task level: TASK_STATE_CHANGED and/or a specified
  1651  // new_task_state.
  1652  type Message struct {
  1653  	// NewJobState: The new job state.
  1654  	//
  1655  	// Possible values:
  1656  	//   "STATE_UNSPECIFIED" - Job state unspecified.
  1657  	//   "QUEUED" - Job is admitted (validated and persisted) and waiting for
  1658  	// resources.
  1659  	//   "SCHEDULED" - Job is scheduled to run as soon as resource allocation is
  1660  	// ready. The resource allocation may happen at a later time but with a high
  1661  	// chance to succeed.
  1662  	//   "RUNNING" - Resource allocation has been successful. At least one Task in
  1663  	// the Job is RUNNING.
  1664  	//   "SUCCEEDED" - All Tasks in the Job have finished successfully.
  1665  	//   "FAILED" - At least one Task in the Job has failed.
  1666  	//   "DELETION_IN_PROGRESS" - The Job will be deleted, but has not been deleted
  1667  	// yet. Typically this is because resources used by the Job are still being
  1668  	// cleaned up.
  1669  	NewJobState string `json:"newJobState,omitempty"`
  1670  	// NewTaskState: The new task state.
  1671  	//
  1672  	// Possible values:
  1673  	//   "STATE_UNSPECIFIED" - Unknown state.
  1674  	//   "PENDING" - The Task is created and waiting for resources.
  1675  	//   "ASSIGNED" - The Task is assigned to at least one VM.
  1676  	//   "RUNNING" - The Task is running.
  1677  	//   "FAILED" - The Task has failed.
  1678  	//   "SUCCEEDED" - The Task has succeeded.
  1679  	//   "UNEXECUTED" - The Task has not been executed when the Job finishes.
  1680  	NewTaskState string `json:"newTaskState,omitempty"`
  1681  	// Type: The message type.
  1682  	//
  1683  	// Possible values:
  1684  	//   "TYPE_UNSPECIFIED" - Unspecified.
  1685  	//   "JOB_STATE_CHANGED" - Notify users that the job state has changed.
  1686  	//   "TASK_STATE_CHANGED" - Notify users that the task state has changed.
  1687  	Type string `json:"type,omitempty"`
  1688  	// ForceSendFields is a list of field names (e.g. "NewJobState") to
  1689  	// unconditionally include in API requests. By default, fields with empty or
  1690  	// default values are omitted from API requests. See
  1691  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1692  	// details.
  1693  	ForceSendFields []string `json:"-"`
  1694  	// NullFields is a list of field names (e.g. "NewJobState") to include in API
  1695  	// requests with the JSON null value. By default, fields with empty values are
  1696  	// omitted from API requests. See
  1697  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1698  	NullFields []string `json:"-"`
  1699  }
  1700  
  1701  func (s *Message) MarshalJSON() ([]byte, error) {
  1702  	type NoMethod Message
  1703  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1704  }
  1705  
  1706  // NFS: Represents an NFS volume.
  1707  type NFS struct {
  1708  	// RemotePath: Remote source path exported from the NFS, e.g., "/share".
  1709  	RemotePath string `json:"remotePath,omitempty"`
  1710  	// Server: The IP address of the NFS.
  1711  	Server string `json:"server,omitempty"`
  1712  	// ForceSendFields is a list of field names (e.g. "RemotePath") to
  1713  	// unconditionally include in API requests. By default, fields with empty or
  1714  	// default values are omitted from API requests. See
  1715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1716  	// details.
  1717  	ForceSendFields []string `json:"-"`
  1718  	// NullFields is a list of field names (e.g. "RemotePath") to include in API
  1719  	// requests with the JSON null value. By default, fields with empty values are
  1720  	// omitted from API requests. See
  1721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1722  	NullFields []string `json:"-"`
  1723  }
  1724  
  1725  func (s *NFS) MarshalJSON() ([]byte, error) {
  1726  	type NoMethod NFS
  1727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1728  }
  1729  
  1730  // NetworkInterface: A network interface.
  1731  type NetworkInterface struct {
  1732  	// Network: The URL of an existing network resource. You can specify the
  1733  	// network as a full or partial URL. For example, the following are all valid
  1734  	// URLs: *
  1735  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1736  	// * projects/{project}/global/networks/{network} * global/networks/{network}
  1737  	Network string `json:"network,omitempty"`
  1738  	// NoExternalIpAddress: Default is false (with an external IP address).
  1739  	// Required if no external public IP address is attached to the VM. If no
  1740  	// external public IP address, additional configuration is required to allow
  1741  	// the VM to access Google Services. See
  1742  	// https://cloud.google.com/vpc/docs/configure-private-google-access and
  1743  	// https://cloud.google.com/nat/docs/gce-example#create-nat for more
  1744  	// information.
  1745  	NoExternalIpAddress bool `json:"noExternalIpAddress,omitempty"`
  1746  	// Subnetwork: The URL of an existing subnetwork resource in the network. You
  1747  	// can specify the subnetwork as a full or partial URL. For example, the
  1748  	// following are all valid URLs: *
  1749  	// https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
  1750  	// * projects/{project}/regions/{region}/subnetworks/{subnetwork} *
  1751  	// regions/{region}/subnetworks/{subnetwork}
  1752  	Subnetwork string `json:"subnetwork,omitempty"`
  1753  	// ForceSendFields is a list of field names (e.g. "Network") to unconditionally
  1754  	// include in API requests. By default, fields with empty or default values are
  1755  	// omitted from API requests. See
  1756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1757  	// details.
  1758  	ForceSendFields []string `json:"-"`
  1759  	// NullFields is a list of field names (e.g. "Network") to include in API
  1760  	// requests with the JSON null value. By default, fields with empty values are
  1761  	// omitted from API requests. See
  1762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1763  	NullFields []string `json:"-"`
  1764  }
  1765  
  1766  func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
  1767  	type NoMethod NetworkInterface
  1768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1769  }
  1770  
  1771  // NetworkPolicy: NetworkPolicy describes VM instance network configurations.
  1772  type NetworkPolicy struct {
  1773  	// NetworkInterfaces: Network configurations.
  1774  	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
  1775  	// ForceSendFields is a list of field names (e.g. "NetworkInterfaces") to
  1776  	// unconditionally include in API requests. By default, fields with empty or
  1777  	// default values are omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "NetworkInterfaces") to include in
  1782  	// API requests with the JSON null value. By default, fields with empty values
  1783  	// are omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *NetworkPolicy) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod NetworkPolicy
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  // Operation: This resource represents a long-running operation that is the
  1794  // result of a network API call.
  1795  type Operation struct {
  1796  	// Done: If the value is `false`, it means the operation is still in progress.
  1797  	// If `true`, the operation is completed, and either `error` or `response` is
  1798  	// available.
  1799  	Done bool `json:"done,omitempty"`
  1800  	// Error: The error result of the operation in case of failure or cancellation.
  1801  	Error *Status `json:"error,omitempty"`
  1802  	// Metadata: Service-specific metadata associated with the operation. It
  1803  	// typically contains progress information and common metadata such as create
  1804  	// time. Some services might not provide such metadata. Any method that returns
  1805  	// a long-running operation should document the metadata type, if any.
  1806  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1807  	// Name: The server-assigned name, which is only unique within the same service
  1808  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1809  	// should be a resource name ending with `operations/{unique_id}`.
  1810  	Name string `json:"name,omitempty"`
  1811  	// Response: The normal, successful response of the operation. If the original
  1812  	// method returns no data on success, such as `Delete`, the response is
  1813  	// `google.protobuf.Empty`. If the original method is standard
  1814  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1815  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1816  	// original method name. For example, if the original method name is
  1817  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1818  	Response googleapi.RawMessage `json:"response,omitempty"`
  1819  
  1820  	// ServerResponse contains the HTTP response code and headers from the server.
  1821  	googleapi.ServerResponse `json:"-"`
  1822  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1823  	// include in API requests. By default, fields with empty or default values are
  1824  	// omitted from API requests. See
  1825  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1826  	// details.
  1827  	ForceSendFields []string `json:"-"`
  1828  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1829  	// with the JSON null value. By default, fields with empty values are omitted
  1830  	// from API requests. See
  1831  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1832  	NullFields []string `json:"-"`
  1833  }
  1834  
  1835  func (s *Operation) MarshalJSON() ([]byte, error) {
  1836  	type NoMethod Operation
  1837  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1838  }
  1839  
  1840  // OperationMetadata: Represents the metadata of the long-running operation.
  1841  type OperationMetadata struct {
  1842  	// ApiVersion: Output only. API version used to start the operation.
  1843  	ApiVersion string `json:"apiVersion,omitempty"`
  1844  	// CreateTime: Output only. The time the operation was created.
  1845  	CreateTime string `json:"createTime,omitempty"`
  1846  	// EndTime: Output only. The time the operation finished running.
  1847  	EndTime string `json:"endTime,omitempty"`
  1848  	// RequestedCancellation: Output only. Identifies whether the user has
  1849  	// requested cancellation of the operation. Operations that have successfully
  1850  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1851  	// 1, corresponding to `Code.CANCELLED`.
  1852  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1853  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1854  	StatusMessage string `json:"statusMessage,omitempty"`
  1855  	// Target: Output only. Server-defined resource path for the target of the
  1856  	// operation.
  1857  	Target string `json:"target,omitempty"`
  1858  	// Verb: Output only. Name of the verb executed by the operation.
  1859  	Verb string `json:"verb,omitempty"`
  1860  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1861  	// unconditionally include in API requests. By default, fields with empty or
  1862  	// default values are omitted from API requests. See
  1863  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1864  	// details.
  1865  	ForceSendFields []string `json:"-"`
  1866  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1867  	// requests with the JSON null value. By default, fields with empty values are
  1868  	// omitted from API requests. See
  1869  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1870  	NullFields []string `json:"-"`
  1871  }
  1872  
  1873  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1874  	type NoMethod OperationMetadata
  1875  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1876  }
  1877  
  1878  // PlacementPolicy: PlacementPolicy describes a group placement policy for the
  1879  // VMs controlled by this AllocationPolicy.
  1880  type PlacementPolicy struct {
  1881  	// Collocation: UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use
  1882  	// COLLOCATED when you want VMs to be located close to each other for low
  1883  	// network latency between the VMs. No placement policy will be generated when
  1884  	// collocation is UNSPECIFIED.
  1885  	Collocation string `json:"collocation,omitempty"`
  1886  	// MaxDistance: When specified, causes the job to fail if more than
  1887  	// max_distance logical switches are required between VMs. Batch uses the most
  1888  	// compact possible placement of VMs even when max_distance is not specified.
  1889  	// An explicit max_distance makes that level of compactness a strict
  1890  	// requirement. Not yet implemented
  1891  	MaxDistance int64 `json:"maxDistance,omitempty,string"`
  1892  	// ForceSendFields is a list of field names (e.g. "Collocation") to
  1893  	// unconditionally include in API requests. By default, fields with empty or
  1894  	// default values are omitted from API requests. See
  1895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1896  	// details.
  1897  	ForceSendFields []string `json:"-"`
  1898  	// NullFields is a list of field names (e.g. "Collocation") to include in API
  1899  	// requests with the JSON null value. By default, fields with empty values are
  1900  	// omitted from API requests. See
  1901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1902  	NullFields []string `json:"-"`
  1903  }
  1904  
  1905  func (s *PlacementPolicy) MarshalJSON() ([]byte, error) {
  1906  	type NoMethod PlacementPolicy
  1907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1908  }
  1909  
  1910  // ReportAgentStateRequest: Request to report agent's state. The Request itself
  1911  // implies the agent is healthy.
  1912  type ReportAgentStateRequest struct {
  1913  	// AgentInfo: Agent info.
  1914  	AgentInfo *AgentInfo `json:"agentInfo,omitempty"`
  1915  	// AgentTimingInfo: Agent timing info.
  1916  	AgentTimingInfo *AgentTimingInfo `json:"agentTimingInfo,omitempty"`
  1917  	// Metadata: Agent metadata.
  1918  	Metadata *AgentMetadata `json:"metadata,omitempty"`
  1919  	// ForceSendFields is a list of field names (e.g. "AgentInfo") to
  1920  	// unconditionally include in API requests. By default, fields with empty or
  1921  	// default values are omitted from API requests. See
  1922  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1923  	// details.
  1924  	ForceSendFields []string `json:"-"`
  1925  	// NullFields is a list of field names (e.g. "AgentInfo") to include in API
  1926  	// requests with the JSON null value. By default, fields with empty values are
  1927  	// omitted from API requests. See
  1928  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1929  	NullFields []string `json:"-"`
  1930  }
  1931  
  1932  func (s *ReportAgentStateRequest) MarshalJSON() ([]byte, error) {
  1933  	type NoMethod ReportAgentStateRequest
  1934  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1935  }
  1936  
  1937  // ReportAgentStateResponse: Response to ReportAgentStateRequest.
  1938  type ReportAgentStateResponse struct {
  1939  	// DefaultReportInterval: Default report interval override
  1940  	DefaultReportInterval string `json:"defaultReportInterval,omitempty"`
  1941  	// MinReportInterval: Minimum report interval override
  1942  	MinReportInterval string `json:"minReportInterval,omitempty"`
  1943  	// Tasks: Tasks assigned to the agent
  1944  	Tasks []*AgentTask `json:"tasks,omitempty"`
  1945  	// UseBatchMonitoredResource: If true, the cloud logging for batch agent will
  1946  	// use batch.googleapis.com/Job as monitored resource for Batch job related
  1947  	// logging.
  1948  	UseBatchMonitoredResource bool `json:"useBatchMonitoredResource,omitempty"`
  1949  
  1950  	// ServerResponse contains the HTTP response code and headers from the server.
  1951  	googleapi.ServerResponse `json:"-"`
  1952  	// ForceSendFields is a list of field names (e.g. "DefaultReportInterval") to
  1953  	// unconditionally include in API requests. By default, fields with empty or
  1954  	// default values are omitted from API requests. See
  1955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1956  	// details.
  1957  	ForceSendFields []string `json:"-"`
  1958  	// NullFields is a list of field names (e.g. "DefaultReportInterval") to
  1959  	// include in API requests with the JSON null value. By default, fields with
  1960  	// empty values are omitted from API requests. See
  1961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1962  	NullFields []string `json:"-"`
  1963  }
  1964  
  1965  func (s *ReportAgentStateResponse) MarshalJSON() ([]byte, error) {
  1966  	type NoMethod ReportAgentStateResponse
  1967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1968  }
  1969  
  1970  // Runnable: Runnable describes instructions for executing a specific script or
  1971  // container as part of a Task.
  1972  type Runnable struct {
  1973  	// AlwaysRun: By default, after a Runnable fails, no further Runnable are
  1974  	// executed. This flag indicates that this Runnable must be run even if the
  1975  	// Task has already failed. This is useful for Runnables that copy output files
  1976  	// off of the VM or for debugging. The always_run flag does not override the
  1977  	// Task's overall max_run_duration. If the max_run_duration has expired then no
  1978  	// further Runnables will execute, not even always_run Runnables.
  1979  	AlwaysRun bool `json:"alwaysRun,omitempty"`
  1980  	// Background: This flag allows a Runnable to continue running in the
  1981  	// background while the Task executes subsequent Runnables. This is useful to
  1982  	// provide services to other Runnables (or to provide debugging support tools
  1983  	// like SSH servers).
  1984  	Background bool `json:"background,omitempty"`
  1985  	// Barrier: Barrier runnable.
  1986  	Barrier *Barrier `json:"barrier,omitempty"`
  1987  	// Container: Container runnable.
  1988  	Container *Container `json:"container,omitempty"`
  1989  	// DisplayName: Optional. DisplayName is an optional field that can be provided
  1990  	// by the caller. If provided, it will be used in logs and other outputs to
  1991  	// identify the script, making it easier for users to understand the logs. If
  1992  	// not provided the index of the runnable will be used for outputs.
  1993  	DisplayName string `json:"displayName,omitempty"`
  1994  	// Environment: Environment variables for this Runnable (overrides variables
  1995  	// set for the whole Task or TaskGroup).
  1996  	Environment *Environment `json:"environment,omitempty"`
  1997  	// IgnoreExitStatus: Normally, a non-zero exit status causes the Task to fail.
  1998  	// This flag allows execution of other Runnables to continue instead.
  1999  	IgnoreExitStatus bool `json:"ignoreExitStatus,omitempty"`
  2000  	// Labels: Labels for this Runnable.
  2001  	Labels map[string]string `json:"labels,omitempty"`
  2002  	// Script: Script runnable.
  2003  	Script *Script `json:"script,omitempty"`
  2004  	// Timeout: Timeout for this Runnable.
  2005  	Timeout string `json:"timeout,omitempty"`
  2006  	// ForceSendFields is a list of field names (e.g. "AlwaysRun") to
  2007  	// unconditionally include in API requests. By default, fields with empty or
  2008  	// default values are omitted from API requests. See
  2009  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2010  	// details.
  2011  	ForceSendFields []string `json:"-"`
  2012  	// NullFields is a list of field names (e.g. "AlwaysRun") to include in API
  2013  	// requests with the JSON null value. By default, fields with empty values are
  2014  	// omitted from API requests. See
  2015  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2016  	NullFields []string `json:"-"`
  2017  }
  2018  
  2019  func (s *Runnable) MarshalJSON() ([]byte, error) {
  2020  	type NoMethod Runnable
  2021  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2022  }
  2023  
  2024  // Script: Script runnable.
  2025  type Script struct {
  2026  	// Path: Script file path on the host VM. To specify an interpreter, please add
  2027  	// a `#!`(also known as shebang line
  2028  	// (https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the
  2029  	// file.(For example, to execute the script using bash, `#!/bin/bash` should be
  2030  	// the first line of the file. To execute the script using`Python3`,
  2031  	// `#!/usr/bin/env python3` should be the first line of the file.) Otherwise,
  2032  	// the file will by default be executed by `/bin/sh`.
  2033  	Path string `json:"path,omitempty"`
  2034  	// Text: Shell script text. To specify an interpreter, please add a `#!\n` at
  2035  	// the beginning of the text.(For example, to execute the script using bash,
  2036  	// `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  2037  	// `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by
  2038  	// default be executed by `/bin/sh`.
  2039  	Text string `json:"text,omitempty"`
  2040  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
  2041  	// include in API requests. By default, fields with empty or default values are
  2042  	// omitted from API requests. See
  2043  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2044  	// details.
  2045  	ForceSendFields []string `json:"-"`
  2046  	// NullFields is a list of field names (e.g. "Path") to include in API requests
  2047  	// with the JSON null value. By default, fields with empty values are omitted
  2048  	// from API requests. See
  2049  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2050  	NullFields []string `json:"-"`
  2051  }
  2052  
  2053  func (s *Script) MarshalJSON() ([]byte, error) {
  2054  	type NoMethod Script
  2055  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2056  }
  2057  
  2058  // ServiceAccount: Carries information about a Google Cloud service account.
  2059  type ServiceAccount struct {
  2060  	// Email: Email address of the service account.
  2061  	Email string `json:"email,omitempty"`
  2062  	// Scopes: List of scopes to be enabled for this service account.
  2063  	Scopes []string `json:"scopes,omitempty"`
  2064  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  2065  	// include in API requests. By default, fields with empty or default values are
  2066  	// omitted from API requests. See
  2067  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2068  	// details.
  2069  	ForceSendFields []string `json:"-"`
  2070  	// NullFields is a list of field names (e.g. "Email") to include in API
  2071  	// requests with the JSON null value. By default, fields with empty values are
  2072  	// omitted from API requests. See
  2073  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2074  	NullFields []string `json:"-"`
  2075  }
  2076  
  2077  func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  2078  	type NoMethod ServiceAccount
  2079  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2080  }
  2081  
  2082  // Status: The `Status` type defines a logical error model that is suitable for
  2083  // different programming environments, including REST APIs and RPC APIs. It is
  2084  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2085  // pieces of data: error code, error message, and error details. You can find
  2086  // out more about this error model and how to work with it in the API Design
  2087  // Guide (https://cloud.google.com/apis/design/errors).
  2088  type Status struct {
  2089  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2090  	Code int64 `json:"code,omitempty"`
  2091  	// Details: A list of messages that carry the error details. There is a common
  2092  	// set of message types for APIs to use.
  2093  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2094  	// Message: A developer-facing error message, which should be in English. Any
  2095  	// user-facing error message should be localized and sent in the
  2096  	// google.rpc.Status.details field, or localized by the client.
  2097  	Message string `json:"message,omitempty"`
  2098  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2099  	// include in API requests. By default, fields with empty or default values are
  2100  	// omitted from API requests. See
  2101  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2102  	// details.
  2103  	ForceSendFields []string `json:"-"`
  2104  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2105  	// with the JSON null value. By default, fields with empty values are omitted
  2106  	// from API requests. See
  2107  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2108  	NullFields []string `json:"-"`
  2109  }
  2110  
  2111  func (s *Status) MarshalJSON() ([]byte, error) {
  2112  	type NoMethod Status
  2113  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2114  }
  2115  
  2116  // StatusEvent: Status event
  2117  type StatusEvent struct {
  2118  	// Description: Description of the event.
  2119  	Description string `json:"description,omitempty"`
  2120  	// EventTime: The time this event occurred.
  2121  	EventTime string `json:"eventTime,omitempty"`
  2122  	// TaskExecution: Task Execution
  2123  	TaskExecution *TaskExecution `json:"taskExecution,omitempty"`
  2124  	// TaskState: Task State
  2125  	//
  2126  	// Possible values:
  2127  	//   "STATE_UNSPECIFIED" - Unknown state.
  2128  	//   "PENDING" - The Task is created and waiting for resources.
  2129  	//   "ASSIGNED" - The Task is assigned to at least one VM.
  2130  	//   "RUNNING" - The Task is running.
  2131  	//   "FAILED" - The Task has failed.
  2132  	//   "SUCCEEDED" - The Task has succeeded.
  2133  	//   "UNEXECUTED" - The Task has not been executed when the Job finishes.
  2134  	TaskState string `json:"taskState,omitempty"`
  2135  	// Type: Type of the event.
  2136  	Type string `json:"type,omitempty"`
  2137  	// ForceSendFields is a list of field names (e.g. "Description") to
  2138  	// unconditionally include in API requests. By default, fields with empty or
  2139  	// default values are omitted from API requests. See
  2140  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2141  	// details.
  2142  	ForceSendFields []string `json:"-"`
  2143  	// NullFields is a list of field names (e.g. "Description") to include in API
  2144  	// requests with the JSON null value. By default, fields with empty values are
  2145  	// omitted from API requests. See
  2146  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2147  	NullFields []string `json:"-"`
  2148  }
  2149  
  2150  func (s *StatusEvent) MarshalJSON() ([]byte, error) {
  2151  	type NoMethod StatusEvent
  2152  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2153  }
  2154  
  2155  // Task: A Cloud Batch task.
  2156  type Task struct {
  2157  	// Name: Task name. The name is generated from the parent TaskGroup name and
  2158  	// 'id' field. For example:
  2159  	// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task0
  2160  	// 1".
  2161  	Name string `json:"name,omitempty"`
  2162  	// Status: Task Status.
  2163  	Status *TaskStatus `json:"status,omitempty"`
  2164  
  2165  	// ServerResponse contains the HTTP response code and headers from the server.
  2166  	googleapi.ServerResponse `json:"-"`
  2167  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2168  	// include in API requests. By default, fields with empty or default values are
  2169  	// omitted from API requests. See
  2170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2171  	// details.
  2172  	ForceSendFields []string `json:"-"`
  2173  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2174  	// with the JSON null value. By default, fields with empty values are omitted
  2175  	// from API requests. See
  2176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2177  	NullFields []string `json:"-"`
  2178  }
  2179  
  2180  func (s *Task) MarshalJSON() ([]byte, error) {
  2181  	type NoMethod Task
  2182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2183  }
  2184  
  2185  // TaskExecution: This Task Execution field includes detail information for
  2186  // task execution procedures, based on StatusEvent types.
  2187  type TaskExecution struct {
  2188  	// ExitCode: The exit code of a finished task. If the task succeeded, the exit
  2189  	// code will be 0. If the task failed but not due to the following reasons, the
  2190  	// exit code will be 50000. Otherwise, it can be from different sources: -
  2191  	// Batch known failures as
  2192  	// https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. -
  2193  	// Batch runnable execution failures: You can rely on Batch logs for further
  2194  	// diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
  2195  	// there are multiple runnables failures, Batch only exposes the first error
  2196  	// caught for now.
  2197  	ExitCode int64 `json:"exitCode,omitempty"`
  2198  	// ForceSendFields is a list of field names (e.g. "ExitCode") to
  2199  	// unconditionally include in API requests. By default, fields with empty or
  2200  	// default values are omitted from API requests. See
  2201  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2202  	// details.
  2203  	ForceSendFields []string `json:"-"`
  2204  	// NullFields is a list of field names (e.g. "ExitCode") to include in API
  2205  	// requests with the JSON null value. By default, fields with empty values are
  2206  	// omitted from API requests. See
  2207  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2208  	NullFields []string `json:"-"`
  2209  }
  2210  
  2211  func (s *TaskExecution) MarshalJSON() ([]byte, error) {
  2212  	type NoMethod TaskExecution
  2213  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2214  }
  2215  
  2216  // TaskGroup: A TaskGroup defines one or more Tasks that all share the same
  2217  // TaskSpec.
  2218  type TaskGroup struct {
  2219  	// Name: Output only. TaskGroup name. The system generates this field based on
  2220  	// parent Job name. For example:
  2221  	// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".
  2222  	Name string `json:"name,omitempty"`
  2223  	// Parallelism: Max number of tasks that can run in parallel. Default to
  2224  	// min(task_count, parallel tasks per job limit). See: Job Limits
  2225  	// (https://cloud.google.com/batch/quotas#job_limits). Field parallelism must
  2226  	// be 1 if the scheduling_policy is IN_ORDER.
  2227  	Parallelism int64 `json:"parallelism,omitempty,string"`
  2228  	// PermissiveSsh: When true, Batch will configure SSH to allow passwordless
  2229  	// login between VMs running the Batch tasks in the same TaskGroup.
  2230  	PermissiveSsh bool `json:"permissiveSsh,omitempty"`
  2231  	// RequireHostsFile: When true, Batch will populate a file with a list of all
  2232  	// VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment
  2233  	// variable to the path of that file. Defaults to false. The host file supports
  2234  	// up to 1000 VMs.
  2235  	RequireHostsFile bool `json:"requireHostsFile,omitempty"`
  2236  	// RunAsNonRoot: Optional. If not set or set to false, Batch uses the root user
  2237  	// to execute runnables. If set to true, Batch runs the runnables using a
  2238  	// non-root user. Currently, the non-root user Batch used is generated by OS
  2239  	// Login. For more information, see About OS Login
  2240  	// (https://cloud.google.com/compute/docs/oslogin).
  2241  	RunAsNonRoot bool `json:"runAsNonRoot,omitempty"`
  2242  	// SchedulingPolicy: Scheduling policy for Tasks in the TaskGroup. The default
  2243  	// value is AS_SOON_AS_POSSIBLE.
  2244  	//
  2245  	// Possible values:
  2246  	//   "SCHEDULING_POLICY_UNSPECIFIED" - Unspecified.
  2247  	//   "AS_SOON_AS_POSSIBLE" - Run Tasks as soon as resources are available.
  2248  	// Tasks might be executed in parallel depending on parallelism and task_count
  2249  	// values.
  2250  	//   "IN_ORDER" - Run Tasks sequentially with increased task index.
  2251  	SchedulingPolicy string `json:"schedulingPolicy,omitempty"`
  2252  	// TaskCount: Number of Tasks in the TaskGroup. Default is 1.
  2253  	TaskCount int64 `json:"taskCount,omitempty,string"`
  2254  	// TaskCountPerNode: Max number of tasks that can be run on a VM at the same
  2255  	// time. If not specified, the system will decide a value based on available
  2256  	// compute resources on a VM and task requirements.
  2257  	TaskCountPerNode int64 `json:"taskCountPerNode,omitempty,string"`
  2258  	// TaskEnvironments: An array of environment variable mappings, which are
  2259  	// passed to Tasks with matching indices. If task_environments is used then
  2260  	// task_count should not be specified in the request (and will be ignored).
  2261  	// Task count will be the length of task_environments. Tasks get a
  2262  	// BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to
  2263  	// any environment variables set in task_environments, specifying the number of
  2264  	// Tasks in the Task's parent TaskGroup, and the specific Task's index in the
  2265  	// TaskGroup (0 through BATCH_TASK_COUNT - 1).
  2266  	TaskEnvironments []*Environment `json:"taskEnvironments,omitempty"`
  2267  	// TaskSpec: Required. Tasks in the group share the same task spec.
  2268  	TaskSpec *TaskSpec `json:"taskSpec,omitempty"`
  2269  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2270  	// include in API requests. By default, fields with empty or default values are
  2271  	// omitted from API requests. See
  2272  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2273  	// details.
  2274  	ForceSendFields []string `json:"-"`
  2275  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2276  	// with the JSON null value. By default, fields with empty values are omitted
  2277  	// from API requests. See
  2278  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2279  	NullFields []string `json:"-"`
  2280  }
  2281  
  2282  func (s *TaskGroup) MarshalJSON() ([]byte, error) {
  2283  	type NoMethod TaskGroup
  2284  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2285  }
  2286  
  2287  // TaskGroupStatus: Aggregated task status for a TaskGroup.
  2288  type TaskGroupStatus struct {
  2289  	// Counts: Count of task in each state in the TaskGroup. The map key is task
  2290  	// state name.
  2291  	Counts map[string]string `json:"counts,omitempty"`
  2292  	// Instances: Status of instances allocated for the TaskGroup.
  2293  	Instances []*InstanceStatus `json:"instances,omitempty"`
  2294  	// ForceSendFields is a list of field names (e.g. "Counts") to unconditionally
  2295  	// include in API requests. By default, fields with empty or default values are
  2296  	// omitted from API requests. See
  2297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2298  	// details.
  2299  	ForceSendFields []string `json:"-"`
  2300  	// NullFields is a list of field names (e.g. "Counts") to include in API
  2301  	// requests with the JSON null value. By default, fields with empty values are
  2302  	// omitted from API requests. See
  2303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2304  	NullFields []string `json:"-"`
  2305  }
  2306  
  2307  func (s *TaskGroupStatus) MarshalJSON() ([]byte, error) {
  2308  	type NoMethod TaskGroupStatus
  2309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2310  }
  2311  
  2312  // TaskSpec: Spec of a task
  2313  type TaskSpec struct {
  2314  	// ComputeResource: ComputeResource requirements.
  2315  	ComputeResource *ComputeResource `json:"computeResource,omitempty"`
  2316  	// Environment: Environment variables to set before running the Task.
  2317  	Environment *Environment `json:"environment,omitempty"`
  2318  	// Environments: Deprecated: please use environment(non-plural) instead.
  2319  	Environments map[string]string `json:"environments,omitempty"`
  2320  	// LifecyclePolicies: Lifecycle management schema when any task in a task group
  2321  	// is failed. Currently we only support one lifecycle policy. When the
  2322  	// lifecycle policy condition is met, the action in the policy will execute. If
  2323  	// task execution result does not meet with the defined lifecycle policy, we
  2324  	// consider it as the default policy. Default policy means if the exit code is
  2325  	// 0, exit task. If task ends with non-zero exit code, retry the task with
  2326  	// max_retry_count.
  2327  	LifecyclePolicies []*LifecyclePolicy `json:"lifecyclePolicies,omitempty"`
  2328  	// MaxRetryCount: Maximum number of retries on failures. The default, 0, which
  2329  	// means never retry. The valid value range is [0, 10].
  2330  	MaxRetryCount int64 `json:"maxRetryCount,omitempty"`
  2331  	// MaxRunDuration: Maximum duration the task should run. The task will be
  2332  	// killed and marked as FAILED if over this limit. The valid value range for
  2333  	// max_run_duration in seconds is [0, 315576000000.999999999],
  2334  	MaxRunDuration string `json:"maxRunDuration,omitempty"`
  2335  	// Runnables: The sequence of scripts or containers to run for this Task. Each
  2336  	// Task using this TaskSpec executes its list of runnables in order. The Task
  2337  	// succeeds if all of its runnables either exit with a zero status or any that
  2338  	// exit with a non-zero status have the ignore_exit_status flag. Background
  2339  	// runnables are killed automatically (if they have not already exited) a short
  2340  	// time after all foreground runnables have completed. Even though this is
  2341  	// likely to result in a non-zero exit status for the background runnable,
  2342  	// these automatic kills are not treated as Task failures.
  2343  	Runnables []*Runnable `json:"runnables,omitempty"`
  2344  	// Volumes: Volumes to mount before running Tasks using this TaskSpec.
  2345  	Volumes []*Volume `json:"volumes,omitempty"`
  2346  	// ForceSendFields is a list of field names (e.g. "ComputeResource") to
  2347  	// unconditionally include in API requests. By default, fields with empty or
  2348  	// default values are omitted from API requests. See
  2349  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2350  	// details.
  2351  	ForceSendFields []string `json:"-"`
  2352  	// NullFields is a list of field names (e.g. "ComputeResource") to include in
  2353  	// API requests with the JSON null value. By default, fields with empty values
  2354  	// are omitted from API requests. See
  2355  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2356  	NullFields []string `json:"-"`
  2357  }
  2358  
  2359  func (s *TaskSpec) MarshalJSON() ([]byte, error) {
  2360  	type NoMethod TaskSpec
  2361  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2362  }
  2363  
  2364  // TaskStatus: Status of a task
  2365  type TaskStatus struct {
  2366  	// State: Task state
  2367  	//
  2368  	// Possible values:
  2369  	//   "STATE_UNSPECIFIED" - Unknown state.
  2370  	//   "PENDING" - The Task is created and waiting for resources.
  2371  	//   "ASSIGNED" - The Task is assigned to at least one VM.
  2372  	//   "RUNNING" - The Task is running.
  2373  	//   "FAILED" - The Task has failed.
  2374  	//   "SUCCEEDED" - The Task has succeeded.
  2375  	//   "UNEXECUTED" - The Task has not been executed when the Job finishes.
  2376  	State string `json:"state,omitempty"`
  2377  	// StatusEvents: Detailed info about why the state is reached.
  2378  	StatusEvents []*StatusEvent `json:"statusEvents,omitempty"`
  2379  	// ForceSendFields is a list of field names (e.g. "State") to unconditionally
  2380  	// include in API requests. By default, fields with empty or default values are
  2381  	// omitted from API requests. See
  2382  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2383  	// details.
  2384  	ForceSendFields []string `json:"-"`
  2385  	// NullFields is a list of field names (e.g. "State") to include in API
  2386  	// requests with the JSON null value. By default, fields with empty values are
  2387  	// omitted from API requests. See
  2388  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2389  	NullFields []string `json:"-"`
  2390  }
  2391  
  2392  func (s *TaskStatus) MarshalJSON() ([]byte, error) {
  2393  	type NoMethod TaskStatus
  2394  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2395  }
  2396  
  2397  // Volume: Volume describes a volume and parameters for it to be mounted to a
  2398  // VM.
  2399  type Volume struct {
  2400  	// DeviceName: Device name of an attached disk volume, which should align with
  2401  	// a device_name specified by
  2402  	// job.allocation_policy.instances[0].policy.disks[i].device_name or defined by
  2403  	// the given instance template in
  2404  	// job.allocation_policy.instances[0].instance_template.
  2405  	DeviceName string `json:"deviceName,omitempty"`
  2406  	// Gcs: A Google Cloud Storage (GCS) volume.
  2407  	Gcs *GCS `json:"gcs,omitempty"`
  2408  	// MountOptions: For Google Cloud Storage (GCS), mount options are the options
  2409  	// supported by the gcsfuse tool
  2410  	// (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent
  2411  	// disks, mount options provided by the mount command
  2412  	// (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are
  2413  	// supported. This is due to restrictions of multi-writer mode
  2414  	// (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For
  2415  	// other attached disks and Network File System (NFS), mount options are these
  2416  	// supported by the mount command
  2417  	// (https://man7.org/linux/man-pages/man8/mount.8.html).
  2418  	MountOptions []string `json:"mountOptions,omitempty"`
  2419  	// MountPath: The mount path for the volume, e.g. /mnt/disks/share.
  2420  	MountPath string `json:"mountPath,omitempty"`
  2421  	// Nfs: A Network File System (NFS) volume. For example, a Filestore file
  2422  	// share.
  2423  	Nfs *NFS `json:"nfs,omitempty"`
  2424  	// ForceSendFields is a list of field names (e.g. "DeviceName") to
  2425  	// unconditionally include in API requests. By default, fields with empty or
  2426  	// default values are omitted from API requests. See
  2427  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2428  	// details.
  2429  	ForceSendFields []string `json:"-"`
  2430  	// NullFields is a list of field names (e.g. "DeviceName") to include in API
  2431  	// requests with the JSON null value. By default, fields with empty values are
  2432  	// omitted from API requests. See
  2433  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2434  	NullFields []string `json:"-"`
  2435  }
  2436  
  2437  func (s *Volume) MarshalJSON() ([]byte, error) {
  2438  	type NoMethod Volume
  2439  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2440  }
  2441  
  2442  type ProjectsLocationsGetCall struct {
  2443  	s            *Service
  2444  	name         string
  2445  	urlParams_   gensupport.URLParams
  2446  	ifNoneMatch_ string
  2447  	ctx_         context.Context
  2448  	header_      http.Header
  2449  }
  2450  
  2451  // Get: Gets information about a location.
  2452  //
  2453  // - name: Resource name for the location.
  2454  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2455  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2456  	c.name = name
  2457  	return c
  2458  }
  2459  
  2460  // Fields allows partial responses to be retrieved. See
  2461  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2462  // details.
  2463  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2464  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2465  	return c
  2466  }
  2467  
  2468  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2469  // object's ETag matches the given value. This is useful for getting updates
  2470  // only after the object has changed since the last request.
  2471  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2472  	c.ifNoneMatch_ = entityTag
  2473  	return c
  2474  }
  2475  
  2476  // Context sets the context to be used in this call's Do method.
  2477  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2478  	c.ctx_ = ctx
  2479  	return c
  2480  }
  2481  
  2482  // Header returns a http.Header that can be modified by the caller to add
  2483  // headers to the request.
  2484  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2485  	if c.header_ == nil {
  2486  		c.header_ = make(http.Header)
  2487  	}
  2488  	return c.header_
  2489  }
  2490  
  2491  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2492  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2493  	if c.ifNoneMatch_ != "" {
  2494  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2495  	}
  2496  	var body io.Reader = nil
  2497  	c.urlParams_.Set("alt", alt)
  2498  	c.urlParams_.Set("prettyPrint", "false")
  2499  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2500  	urls += "?" + c.urlParams_.Encode()
  2501  	req, err := http.NewRequest("GET", urls, body)
  2502  	if err != nil {
  2503  		return nil, err
  2504  	}
  2505  	req.Header = reqHeaders
  2506  	googleapi.Expand(req.URL, map[string]string{
  2507  		"name": c.name,
  2508  	})
  2509  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2510  }
  2511  
  2512  // Do executes the "batch.projects.locations.get" call.
  2513  // Any non-2xx status code is an error. Response headers are in either
  2514  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2515  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2516  // whether the returned error was because http.StatusNotModified was returned.
  2517  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2518  	gensupport.SetOptions(c.urlParams_, opts...)
  2519  	res, err := c.doRequest("json")
  2520  	if res != nil && res.StatusCode == http.StatusNotModified {
  2521  		if res.Body != nil {
  2522  			res.Body.Close()
  2523  		}
  2524  		return nil, gensupport.WrapError(&googleapi.Error{
  2525  			Code:   res.StatusCode,
  2526  			Header: res.Header,
  2527  		})
  2528  	}
  2529  	if err != nil {
  2530  		return nil, err
  2531  	}
  2532  	defer googleapi.CloseBody(res)
  2533  	if err := googleapi.CheckResponse(res); err != nil {
  2534  		return nil, gensupport.WrapError(err)
  2535  	}
  2536  	ret := &Location{
  2537  		ServerResponse: googleapi.ServerResponse{
  2538  			Header:         res.Header,
  2539  			HTTPStatusCode: res.StatusCode,
  2540  		},
  2541  	}
  2542  	target := &ret
  2543  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2544  		return nil, err
  2545  	}
  2546  	return ret, nil
  2547  }
  2548  
  2549  type ProjectsLocationsListCall struct {
  2550  	s            *Service
  2551  	name         string
  2552  	urlParams_   gensupport.URLParams
  2553  	ifNoneMatch_ string
  2554  	ctx_         context.Context
  2555  	header_      http.Header
  2556  }
  2557  
  2558  // List: Lists information about the supported locations for this service.
  2559  //
  2560  // - name: The resource that owns the locations collection, if applicable.
  2561  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2562  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2563  	c.name = name
  2564  	return c
  2565  }
  2566  
  2567  // Filter sets the optional parameter "filter": A filter to narrow down results
  2568  // to a preferred subset. The filtering language accepts strings like
  2569  // "displayName=tokyo", and is documented in more detail in AIP-160
  2570  // (https://google.aip.dev/160).
  2571  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2572  	c.urlParams_.Set("filter", filter)
  2573  	return c
  2574  }
  2575  
  2576  // PageSize sets the optional parameter "pageSize": The maximum number of
  2577  // results to return. If not set, the service selects a default.
  2578  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2579  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2580  	return c
  2581  }
  2582  
  2583  // PageToken sets the optional parameter "pageToken": A page token received
  2584  // from the `next_page_token` field in the response. Send that page token to
  2585  // receive the subsequent page.
  2586  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2587  	c.urlParams_.Set("pageToken", pageToken)
  2588  	return c
  2589  }
  2590  
  2591  // Fields allows partial responses to be retrieved. See
  2592  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2593  // details.
  2594  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2595  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2596  	return c
  2597  }
  2598  
  2599  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2600  // object's ETag matches the given value. This is useful for getting updates
  2601  // only after the object has changed since the last request.
  2602  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2603  	c.ifNoneMatch_ = entityTag
  2604  	return c
  2605  }
  2606  
  2607  // Context sets the context to be used in this call's Do method.
  2608  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2609  	c.ctx_ = ctx
  2610  	return c
  2611  }
  2612  
  2613  // Header returns a http.Header that can be modified by the caller to add
  2614  // headers to the request.
  2615  func (c *ProjectsLocationsListCall) Header() http.Header {
  2616  	if c.header_ == nil {
  2617  		c.header_ = make(http.Header)
  2618  	}
  2619  	return c.header_
  2620  }
  2621  
  2622  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2623  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2624  	if c.ifNoneMatch_ != "" {
  2625  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2626  	}
  2627  	var body io.Reader = nil
  2628  	c.urlParams_.Set("alt", alt)
  2629  	c.urlParams_.Set("prettyPrint", "false")
  2630  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  2631  	urls += "?" + c.urlParams_.Encode()
  2632  	req, err := http.NewRequest("GET", urls, body)
  2633  	if err != nil {
  2634  		return nil, err
  2635  	}
  2636  	req.Header = reqHeaders
  2637  	googleapi.Expand(req.URL, map[string]string{
  2638  		"name": c.name,
  2639  	})
  2640  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2641  }
  2642  
  2643  // Do executes the "batch.projects.locations.list" call.
  2644  // Any non-2xx status code is an error. Response headers are in either
  2645  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2646  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2647  // check whether the returned error was because http.StatusNotModified was
  2648  // returned.
  2649  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2650  	gensupport.SetOptions(c.urlParams_, opts...)
  2651  	res, err := c.doRequest("json")
  2652  	if res != nil && res.StatusCode == http.StatusNotModified {
  2653  		if res.Body != nil {
  2654  			res.Body.Close()
  2655  		}
  2656  		return nil, gensupport.WrapError(&googleapi.Error{
  2657  			Code:   res.StatusCode,
  2658  			Header: res.Header,
  2659  		})
  2660  	}
  2661  	if err != nil {
  2662  		return nil, err
  2663  	}
  2664  	defer googleapi.CloseBody(res)
  2665  	if err := googleapi.CheckResponse(res); err != nil {
  2666  		return nil, gensupport.WrapError(err)
  2667  	}
  2668  	ret := &ListLocationsResponse{
  2669  		ServerResponse: googleapi.ServerResponse{
  2670  			Header:         res.Header,
  2671  			HTTPStatusCode: res.StatusCode,
  2672  		},
  2673  	}
  2674  	target := &ret
  2675  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2676  		return nil, err
  2677  	}
  2678  	return ret, nil
  2679  }
  2680  
  2681  // Pages invokes f for each page of results.
  2682  // A non-nil error returned from f will halt the iteration.
  2683  // The provided context supersedes any context provided to the Context method.
  2684  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2685  	c.ctx_ = ctx
  2686  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2687  	for {
  2688  		x, err := c.Do()
  2689  		if err != nil {
  2690  			return err
  2691  		}
  2692  		if err := f(x); err != nil {
  2693  			return err
  2694  		}
  2695  		if x.NextPageToken == "" {
  2696  			return nil
  2697  		}
  2698  		c.PageToken(x.NextPageToken)
  2699  	}
  2700  }
  2701  
  2702  type ProjectsLocationsJobsCreateCall struct {
  2703  	s          *Service
  2704  	parent     string
  2705  	job        *Job
  2706  	urlParams_ gensupport.URLParams
  2707  	ctx_       context.Context
  2708  	header_    http.Header
  2709  }
  2710  
  2711  // Create: Create a Job.
  2712  //
  2713  //   - parent: The parent resource name where the Job will be created. Pattern:
  2714  //     "projects/{project}/locations/{location}".
  2715  func (r *ProjectsLocationsJobsService) Create(parent string, job *Job) *ProjectsLocationsJobsCreateCall {
  2716  	c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2717  	c.parent = parent
  2718  	c.job = job
  2719  	return c
  2720  }
  2721  
  2722  // JobId sets the optional parameter "jobId": ID used to uniquely identify the
  2723  // Job within its parent scope. This field should contain at most 63 characters
  2724  // and must start with lowercase characters. Only lowercase characters, numbers
  2725  // and '-' are accepted. The '-' character cannot be the first or the last one.
  2726  // A system generated ID will be used if the field is not set. The job.name
  2727  // field in the request will be ignored and the created resource name of the
  2728  // Job will be "{parent}/jobs/{job_id}".
  2729  func (c *ProjectsLocationsJobsCreateCall) JobId(jobId string) *ProjectsLocationsJobsCreateCall {
  2730  	c.urlParams_.Set("jobId", jobId)
  2731  	return c
  2732  }
  2733  
  2734  // RequestId sets the optional parameter "requestId": An optional request ID to
  2735  // identify requests. Specify a unique request ID so that if you must retry
  2736  // your request, the server will know to ignore the request if it has already
  2737  // been completed. The server will guarantee that for at least 60 minutes since
  2738  // the first request. For example, consider a situation where you make an
  2739  // initial request and the request times out. If you make the request again
  2740  // with the same request ID, the server can check if original operation with
  2741  // the same request ID was received, and if so, will ignore the second request.
  2742  // This prevents clients from accidentally creating duplicate commitments. The
  2743  // request ID must be a valid UUID with the exception that zero UUID is not
  2744  // supported (00000000-0000-0000-0000-000000000000).
  2745  func (c *ProjectsLocationsJobsCreateCall) RequestId(requestId string) *ProjectsLocationsJobsCreateCall {
  2746  	c.urlParams_.Set("requestId", requestId)
  2747  	return c
  2748  }
  2749  
  2750  // Fields allows partial responses to be retrieved. See
  2751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2752  // details.
  2753  func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall {
  2754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2755  	return c
  2756  }
  2757  
  2758  // Context sets the context to be used in this call's Do method.
  2759  func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall {
  2760  	c.ctx_ = ctx
  2761  	return c
  2762  }
  2763  
  2764  // Header returns a http.Header that can be modified by the caller to add
  2765  // headers to the request.
  2766  func (c *ProjectsLocationsJobsCreateCall) Header() http.Header {
  2767  	if c.header_ == nil {
  2768  		c.header_ = make(http.Header)
  2769  	}
  2770  	return c.header_
  2771  }
  2772  
  2773  func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  2774  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2775  	var body io.Reader = nil
  2776  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  2777  	if err != nil {
  2778  		return nil, err
  2779  	}
  2780  	c.urlParams_.Set("alt", alt)
  2781  	c.urlParams_.Set("prettyPrint", "false")
  2782  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
  2783  	urls += "?" + c.urlParams_.Encode()
  2784  	req, err := http.NewRequest("POST", urls, body)
  2785  	if err != nil {
  2786  		return nil, err
  2787  	}
  2788  	req.Header = reqHeaders
  2789  	googleapi.Expand(req.URL, map[string]string{
  2790  		"parent": c.parent,
  2791  	})
  2792  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2793  }
  2794  
  2795  // Do executes the "batch.projects.locations.jobs.create" call.
  2796  // Any non-2xx status code is an error. Response headers are in either
  2797  // *Job.ServerResponse.Header or (if a response was returned at all) in
  2798  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2799  // whether the returned error was because http.StatusNotModified was returned.
  2800  func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  2801  	gensupport.SetOptions(c.urlParams_, opts...)
  2802  	res, err := c.doRequest("json")
  2803  	if res != nil && res.StatusCode == http.StatusNotModified {
  2804  		if res.Body != nil {
  2805  			res.Body.Close()
  2806  		}
  2807  		return nil, gensupport.WrapError(&googleapi.Error{
  2808  			Code:   res.StatusCode,
  2809  			Header: res.Header,
  2810  		})
  2811  	}
  2812  	if err != nil {
  2813  		return nil, err
  2814  	}
  2815  	defer googleapi.CloseBody(res)
  2816  	if err := googleapi.CheckResponse(res); err != nil {
  2817  		return nil, gensupport.WrapError(err)
  2818  	}
  2819  	ret := &Job{
  2820  		ServerResponse: googleapi.ServerResponse{
  2821  			Header:         res.Header,
  2822  			HTTPStatusCode: res.StatusCode,
  2823  		},
  2824  	}
  2825  	target := &ret
  2826  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2827  		return nil, err
  2828  	}
  2829  	return ret, nil
  2830  }
  2831  
  2832  type ProjectsLocationsJobsDeleteCall struct {
  2833  	s          *Service
  2834  	name       string
  2835  	urlParams_ gensupport.URLParams
  2836  	ctx_       context.Context
  2837  	header_    http.Header
  2838  }
  2839  
  2840  // Delete: Delete a Job.
  2841  //
  2842  // - name: Job name.
  2843  func (r *ProjectsLocationsJobsService) Delete(name string) *ProjectsLocationsJobsDeleteCall {
  2844  	c := &ProjectsLocationsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2845  	c.name = name
  2846  	return c
  2847  }
  2848  
  2849  // Reason sets the optional parameter "reason": Reason for this deletion.
  2850  func (c *ProjectsLocationsJobsDeleteCall) Reason(reason string) *ProjectsLocationsJobsDeleteCall {
  2851  	c.urlParams_.Set("reason", reason)
  2852  	return c
  2853  }
  2854  
  2855  // RequestId sets the optional parameter "requestId": An optional request ID to
  2856  // identify requests. Specify a unique request ID so that if you must retry
  2857  // your request, the server will know to ignore the request if it has already
  2858  // been completed. The server will guarantee that for at least 60 minutes after
  2859  // the first request. For example, consider a situation where you make an
  2860  // initial request and the request times out. If you make the request again
  2861  // with the same request ID, the server can check if original operation with
  2862  // the same request ID was received, and if so, will ignore the second request.
  2863  // This prevents clients from accidentally creating duplicate commitments. The
  2864  // request ID must be a valid UUID with the exception that zero UUID is not
  2865  // supported (00000000-0000-0000-0000-000000000000).
  2866  func (c *ProjectsLocationsJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsJobsDeleteCall {
  2867  	c.urlParams_.Set("requestId", requestId)
  2868  	return c
  2869  }
  2870  
  2871  // Fields allows partial responses to be retrieved. See
  2872  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2873  // details.
  2874  func (c *ProjectsLocationsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDeleteCall {
  2875  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2876  	return c
  2877  }
  2878  
  2879  // Context sets the context to be used in this call's Do method.
  2880  func (c *ProjectsLocationsJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobsDeleteCall {
  2881  	c.ctx_ = ctx
  2882  	return c
  2883  }
  2884  
  2885  // Header returns a http.Header that can be modified by the caller to add
  2886  // headers to the request.
  2887  func (c *ProjectsLocationsJobsDeleteCall) Header() http.Header {
  2888  	if c.header_ == nil {
  2889  		c.header_ = make(http.Header)
  2890  	}
  2891  	return c.header_
  2892  }
  2893  
  2894  func (c *ProjectsLocationsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2895  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2896  	var body io.Reader = nil
  2897  	c.urlParams_.Set("alt", alt)
  2898  	c.urlParams_.Set("prettyPrint", "false")
  2899  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2900  	urls += "?" + c.urlParams_.Encode()
  2901  	req, err := http.NewRequest("DELETE", urls, body)
  2902  	if err != nil {
  2903  		return nil, err
  2904  	}
  2905  	req.Header = reqHeaders
  2906  	googleapi.Expand(req.URL, map[string]string{
  2907  		"name": c.name,
  2908  	})
  2909  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2910  }
  2911  
  2912  // Do executes the "batch.projects.locations.jobs.delete" call.
  2913  // Any non-2xx status code is an error. Response headers are in either
  2914  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2915  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2916  // whether the returned error was because http.StatusNotModified was returned.
  2917  func (c *ProjectsLocationsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2918  	gensupport.SetOptions(c.urlParams_, opts...)
  2919  	res, err := c.doRequest("json")
  2920  	if res != nil && res.StatusCode == http.StatusNotModified {
  2921  		if res.Body != nil {
  2922  			res.Body.Close()
  2923  		}
  2924  		return nil, gensupport.WrapError(&googleapi.Error{
  2925  			Code:   res.StatusCode,
  2926  			Header: res.Header,
  2927  		})
  2928  	}
  2929  	if err != nil {
  2930  		return nil, err
  2931  	}
  2932  	defer googleapi.CloseBody(res)
  2933  	if err := googleapi.CheckResponse(res); err != nil {
  2934  		return nil, gensupport.WrapError(err)
  2935  	}
  2936  	ret := &Operation{
  2937  		ServerResponse: googleapi.ServerResponse{
  2938  			Header:         res.Header,
  2939  			HTTPStatusCode: res.StatusCode,
  2940  		},
  2941  	}
  2942  	target := &ret
  2943  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2944  		return nil, err
  2945  	}
  2946  	return ret, nil
  2947  }
  2948  
  2949  type ProjectsLocationsJobsGetCall struct {
  2950  	s            *Service
  2951  	name         string
  2952  	urlParams_   gensupport.URLParams
  2953  	ifNoneMatch_ string
  2954  	ctx_         context.Context
  2955  	header_      http.Header
  2956  }
  2957  
  2958  // Get: Get a Job specified by its resource name.
  2959  //
  2960  // - name: Job name.
  2961  func (r *ProjectsLocationsJobsService) Get(name string) *ProjectsLocationsJobsGetCall {
  2962  	c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2963  	c.name = name
  2964  	return c
  2965  }
  2966  
  2967  // Fields allows partial responses to be retrieved. See
  2968  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2969  // details.
  2970  func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall {
  2971  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2972  	return c
  2973  }
  2974  
  2975  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2976  // object's ETag matches the given value. This is useful for getting updates
  2977  // only after the object has changed since the last request.
  2978  func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall {
  2979  	c.ifNoneMatch_ = entityTag
  2980  	return c
  2981  }
  2982  
  2983  // Context sets the context to be used in this call's Do method.
  2984  func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall {
  2985  	c.ctx_ = ctx
  2986  	return c
  2987  }
  2988  
  2989  // Header returns a http.Header that can be modified by the caller to add
  2990  // headers to the request.
  2991  func (c *ProjectsLocationsJobsGetCall) Header() http.Header {
  2992  	if c.header_ == nil {
  2993  		c.header_ = make(http.Header)
  2994  	}
  2995  	return c.header_
  2996  }
  2997  
  2998  func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  2999  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3000  	if c.ifNoneMatch_ != "" {
  3001  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3002  	}
  3003  	var body io.Reader = nil
  3004  	c.urlParams_.Set("alt", alt)
  3005  	c.urlParams_.Set("prettyPrint", "false")
  3006  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3007  	urls += "?" + c.urlParams_.Encode()
  3008  	req, err := http.NewRequest("GET", urls, body)
  3009  	if err != nil {
  3010  		return nil, err
  3011  	}
  3012  	req.Header = reqHeaders
  3013  	googleapi.Expand(req.URL, map[string]string{
  3014  		"name": c.name,
  3015  	})
  3016  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3017  }
  3018  
  3019  // Do executes the "batch.projects.locations.jobs.get" call.
  3020  // Any non-2xx status code is an error. Response headers are in either
  3021  // *Job.ServerResponse.Header or (if a response was returned at all) in
  3022  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3023  // whether the returned error was because http.StatusNotModified was returned.
  3024  func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  3025  	gensupport.SetOptions(c.urlParams_, opts...)
  3026  	res, err := c.doRequest("json")
  3027  	if res != nil && res.StatusCode == http.StatusNotModified {
  3028  		if res.Body != nil {
  3029  			res.Body.Close()
  3030  		}
  3031  		return nil, gensupport.WrapError(&googleapi.Error{
  3032  			Code:   res.StatusCode,
  3033  			Header: res.Header,
  3034  		})
  3035  	}
  3036  	if err != nil {
  3037  		return nil, err
  3038  	}
  3039  	defer googleapi.CloseBody(res)
  3040  	if err := googleapi.CheckResponse(res); err != nil {
  3041  		return nil, gensupport.WrapError(err)
  3042  	}
  3043  	ret := &Job{
  3044  		ServerResponse: googleapi.ServerResponse{
  3045  			Header:         res.Header,
  3046  			HTTPStatusCode: res.StatusCode,
  3047  		},
  3048  	}
  3049  	target := &ret
  3050  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3051  		return nil, err
  3052  	}
  3053  	return ret, nil
  3054  }
  3055  
  3056  type ProjectsLocationsJobsListCall struct {
  3057  	s            *Service
  3058  	parent       string
  3059  	urlParams_   gensupport.URLParams
  3060  	ifNoneMatch_ string
  3061  	ctx_         context.Context
  3062  	header_      http.Header
  3063  }
  3064  
  3065  // List: List all Jobs for a project within a region.
  3066  //
  3067  // - parent: Parent path.
  3068  func (r *ProjectsLocationsJobsService) List(parent string) *ProjectsLocationsJobsListCall {
  3069  	c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3070  	c.parent = parent
  3071  	return c
  3072  }
  3073  
  3074  // Filter sets the optional parameter "filter": List filter.
  3075  func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall {
  3076  	c.urlParams_.Set("filter", filter)
  3077  	return c
  3078  }
  3079  
  3080  // OrderBy sets the optional parameter "orderBy": Sort results. Supported are
  3081  // "name", "name desc", "create_time", and "create_time desc".
  3082  func (c *ProjectsLocationsJobsListCall) OrderBy(orderBy string) *ProjectsLocationsJobsListCall {
  3083  	c.urlParams_.Set("orderBy", orderBy)
  3084  	return c
  3085  }
  3086  
  3087  // PageSize sets the optional parameter "pageSize": Page size.
  3088  func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall {
  3089  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3090  	return c
  3091  }
  3092  
  3093  // PageToken sets the optional parameter "pageToken": Page token.
  3094  func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall {
  3095  	c.urlParams_.Set("pageToken", pageToken)
  3096  	return c
  3097  }
  3098  
  3099  // Fields allows partial responses to be retrieved. See
  3100  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3101  // details.
  3102  func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall {
  3103  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3104  	return c
  3105  }
  3106  
  3107  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3108  // object's ETag matches the given value. This is useful for getting updates
  3109  // only after the object has changed since the last request.
  3110  func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall {
  3111  	c.ifNoneMatch_ = entityTag
  3112  	return c
  3113  }
  3114  
  3115  // Context sets the context to be used in this call's Do method.
  3116  func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall {
  3117  	c.ctx_ = ctx
  3118  	return c
  3119  }
  3120  
  3121  // Header returns a http.Header that can be modified by the caller to add
  3122  // headers to the request.
  3123  func (c *ProjectsLocationsJobsListCall) Header() http.Header {
  3124  	if c.header_ == nil {
  3125  		c.header_ = make(http.Header)
  3126  	}
  3127  	return c.header_
  3128  }
  3129  
  3130  func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) {
  3131  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3132  	if c.ifNoneMatch_ != "" {
  3133  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3134  	}
  3135  	var body io.Reader = nil
  3136  	c.urlParams_.Set("alt", alt)
  3137  	c.urlParams_.Set("prettyPrint", "false")
  3138  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
  3139  	urls += "?" + c.urlParams_.Encode()
  3140  	req, err := http.NewRequest("GET", urls, body)
  3141  	if err != nil {
  3142  		return nil, err
  3143  	}
  3144  	req.Header = reqHeaders
  3145  	googleapi.Expand(req.URL, map[string]string{
  3146  		"parent": c.parent,
  3147  	})
  3148  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3149  }
  3150  
  3151  // Do executes the "batch.projects.locations.jobs.list" call.
  3152  // Any non-2xx status code is an error. Response headers are in either
  3153  // *ListJobsResponse.ServerResponse.Header or (if a response was returned at
  3154  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3155  // check whether the returned error was because http.StatusNotModified was
  3156  // returned.
  3157  func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  3158  	gensupport.SetOptions(c.urlParams_, opts...)
  3159  	res, err := c.doRequest("json")
  3160  	if res != nil && res.StatusCode == http.StatusNotModified {
  3161  		if res.Body != nil {
  3162  			res.Body.Close()
  3163  		}
  3164  		return nil, gensupport.WrapError(&googleapi.Error{
  3165  			Code:   res.StatusCode,
  3166  			Header: res.Header,
  3167  		})
  3168  	}
  3169  	if err != nil {
  3170  		return nil, err
  3171  	}
  3172  	defer googleapi.CloseBody(res)
  3173  	if err := googleapi.CheckResponse(res); err != nil {
  3174  		return nil, gensupport.WrapError(err)
  3175  	}
  3176  	ret := &ListJobsResponse{
  3177  		ServerResponse: googleapi.ServerResponse{
  3178  			Header:         res.Header,
  3179  			HTTPStatusCode: res.StatusCode,
  3180  		},
  3181  	}
  3182  	target := &ret
  3183  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3184  		return nil, err
  3185  	}
  3186  	return ret, nil
  3187  }
  3188  
  3189  // Pages invokes f for each page of results.
  3190  // A non-nil error returned from f will halt the iteration.
  3191  // The provided context supersedes any context provided to the Context method.
  3192  func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  3193  	c.ctx_ = ctx
  3194  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3195  	for {
  3196  		x, err := c.Do()
  3197  		if err != nil {
  3198  			return err
  3199  		}
  3200  		if err := f(x); err != nil {
  3201  			return err
  3202  		}
  3203  		if x.NextPageToken == "" {
  3204  			return nil
  3205  		}
  3206  		c.PageToken(x.NextPageToken)
  3207  	}
  3208  }
  3209  
  3210  type ProjectsLocationsJobsTaskGroupsTasksGetCall struct {
  3211  	s            *Service
  3212  	name         string
  3213  	urlParams_   gensupport.URLParams
  3214  	ifNoneMatch_ string
  3215  	ctx_         context.Context
  3216  	header_      http.Header
  3217  }
  3218  
  3219  // Get: Return a single Task.
  3220  //
  3221  // - name: Task name.
  3222  func (r *ProjectsLocationsJobsTaskGroupsTasksService) Get(name string) *ProjectsLocationsJobsTaskGroupsTasksGetCall {
  3223  	c := &ProjectsLocationsJobsTaskGroupsTasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3224  	c.name = name
  3225  	return c
  3226  }
  3227  
  3228  // Fields allows partial responses to be retrieved. See
  3229  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3230  // details.
  3231  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsTaskGroupsTasksGetCall {
  3232  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3233  	return c
  3234  }
  3235  
  3236  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3237  // object's ETag matches the given value. This is useful for getting updates
  3238  // only after the object has changed since the last request.
  3239  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsTaskGroupsTasksGetCall {
  3240  	c.ifNoneMatch_ = entityTag
  3241  	return c
  3242  }
  3243  
  3244  // Context sets the context to be used in this call's Do method.
  3245  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) Context(ctx context.Context) *ProjectsLocationsJobsTaskGroupsTasksGetCall {
  3246  	c.ctx_ = ctx
  3247  	return c
  3248  }
  3249  
  3250  // Header returns a http.Header that can be modified by the caller to add
  3251  // headers to the request.
  3252  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) Header() http.Header {
  3253  	if c.header_ == nil {
  3254  		c.header_ = make(http.Header)
  3255  	}
  3256  	return c.header_
  3257  }
  3258  
  3259  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) doRequest(alt string) (*http.Response, error) {
  3260  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3261  	if c.ifNoneMatch_ != "" {
  3262  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3263  	}
  3264  	var body io.Reader = nil
  3265  	c.urlParams_.Set("alt", alt)
  3266  	c.urlParams_.Set("prettyPrint", "false")
  3267  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3268  	urls += "?" + c.urlParams_.Encode()
  3269  	req, err := http.NewRequest("GET", urls, body)
  3270  	if err != nil {
  3271  		return nil, err
  3272  	}
  3273  	req.Header = reqHeaders
  3274  	googleapi.Expand(req.URL, map[string]string{
  3275  		"name": c.name,
  3276  	})
  3277  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3278  }
  3279  
  3280  // Do executes the "batch.projects.locations.jobs.taskGroups.tasks.get" call.
  3281  // Any non-2xx status code is an error. Response headers are in either
  3282  // *Task.ServerResponse.Header or (if a response was returned at all) in
  3283  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3284  // whether the returned error was because http.StatusNotModified was returned.
  3285  func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) Do(opts ...googleapi.CallOption) (*Task, error) {
  3286  	gensupport.SetOptions(c.urlParams_, opts...)
  3287  	res, err := c.doRequest("json")
  3288  	if res != nil && res.StatusCode == http.StatusNotModified {
  3289  		if res.Body != nil {
  3290  			res.Body.Close()
  3291  		}
  3292  		return nil, gensupport.WrapError(&googleapi.Error{
  3293  			Code:   res.StatusCode,
  3294  			Header: res.Header,
  3295  		})
  3296  	}
  3297  	if err != nil {
  3298  		return nil, err
  3299  	}
  3300  	defer googleapi.CloseBody(res)
  3301  	if err := googleapi.CheckResponse(res); err != nil {
  3302  		return nil, gensupport.WrapError(err)
  3303  	}
  3304  	ret := &Task{
  3305  		ServerResponse: googleapi.ServerResponse{
  3306  			Header:         res.Header,
  3307  			HTTPStatusCode: res.StatusCode,
  3308  		},
  3309  	}
  3310  	target := &ret
  3311  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3312  		return nil, err
  3313  	}
  3314  	return ret, nil
  3315  }
  3316  
  3317  type ProjectsLocationsJobsTaskGroupsTasksListCall struct {
  3318  	s            *Service
  3319  	parent       string
  3320  	urlParams_   gensupport.URLParams
  3321  	ifNoneMatch_ string
  3322  	ctx_         context.Context
  3323  	header_      http.Header
  3324  }
  3325  
  3326  // List: List Tasks associated with a job.
  3327  //
  3328  //   - parent: Name of a TaskGroup from which Tasks are being requested. Pattern:
  3329  //     "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}
  3330  //     ".
  3331  func (r *ProjectsLocationsJobsTaskGroupsTasksService) List(parent string) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3332  	c := &ProjectsLocationsJobsTaskGroupsTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3333  	c.parent = parent
  3334  	return c
  3335  }
  3336  
  3337  // Filter sets the optional parameter "filter": Task filter, null filter
  3338  // matches all Tasks. Filter string should be of the format
  3339  // State=TaskStatus.State e.g. State=RUNNING
  3340  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Filter(filter string) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3341  	c.urlParams_.Set("filter", filter)
  3342  	return c
  3343  }
  3344  
  3345  // PageSize sets the optional parameter "pageSize": Page size.
  3346  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) PageSize(pageSize int64) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3347  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3348  	return c
  3349  }
  3350  
  3351  // PageToken sets the optional parameter "pageToken": Page token.
  3352  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) PageToken(pageToken string) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3353  	c.urlParams_.Set("pageToken", pageToken)
  3354  	return c
  3355  }
  3356  
  3357  // Fields allows partial responses to be retrieved. See
  3358  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3359  // details.
  3360  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3361  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3362  	return c
  3363  }
  3364  
  3365  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3366  // object's ETag matches the given value. This is useful for getting updates
  3367  // only after the object has changed since the last request.
  3368  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3369  	c.ifNoneMatch_ = entityTag
  3370  	return c
  3371  }
  3372  
  3373  // Context sets the context to be used in this call's Do method.
  3374  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Context(ctx context.Context) *ProjectsLocationsJobsTaskGroupsTasksListCall {
  3375  	c.ctx_ = ctx
  3376  	return c
  3377  }
  3378  
  3379  // Header returns a http.Header that can be modified by the caller to add
  3380  // headers to the request.
  3381  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Header() http.Header {
  3382  	if c.header_ == nil {
  3383  		c.header_ = make(http.Header)
  3384  	}
  3385  	return c.header_
  3386  }
  3387  
  3388  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) doRequest(alt string) (*http.Response, error) {
  3389  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3390  	if c.ifNoneMatch_ != "" {
  3391  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3392  	}
  3393  	var body io.Reader = nil
  3394  	c.urlParams_.Set("alt", alt)
  3395  	c.urlParams_.Set("prettyPrint", "false")
  3396  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks")
  3397  	urls += "?" + c.urlParams_.Encode()
  3398  	req, err := http.NewRequest("GET", urls, body)
  3399  	if err != nil {
  3400  		return nil, err
  3401  	}
  3402  	req.Header = reqHeaders
  3403  	googleapi.Expand(req.URL, map[string]string{
  3404  		"parent": c.parent,
  3405  	})
  3406  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3407  }
  3408  
  3409  // Do executes the "batch.projects.locations.jobs.taskGroups.tasks.list" call.
  3410  // Any non-2xx status code is an error. Response headers are in either
  3411  // *ListTasksResponse.ServerResponse.Header or (if a response was returned at
  3412  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3413  // check whether the returned error was because http.StatusNotModified was
  3414  // returned.
  3415  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Do(opts ...googleapi.CallOption) (*ListTasksResponse, error) {
  3416  	gensupport.SetOptions(c.urlParams_, opts...)
  3417  	res, err := c.doRequest("json")
  3418  	if res != nil && res.StatusCode == http.StatusNotModified {
  3419  		if res.Body != nil {
  3420  			res.Body.Close()
  3421  		}
  3422  		return nil, gensupport.WrapError(&googleapi.Error{
  3423  			Code:   res.StatusCode,
  3424  			Header: res.Header,
  3425  		})
  3426  	}
  3427  	if err != nil {
  3428  		return nil, err
  3429  	}
  3430  	defer googleapi.CloseBody(res)
  3431  	if err := googleapi.CheckResponse(res); err != nil {
  3432  		return nil, gensupport.WrapError(err)
  3433  	}
  3434  	ret := &ListTasksResponse{
  3435  		ServerResponse: googleapi.ServerResponse{
  3436  			Header:         res.Header,
  3437  			HTTPStatusCode: res.StatusCode,
  3438  		},
  3439  	}
  3440  	target := &ret
  3441  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3442  		return nil, err
  3443  	}
  3444  	return ret, nil
  3445  }
  3446  
  3447  // Pages invokes f for each page of results.
  3448  // A non-nil error returned from f will halt the iteration.
  3449  // The provided context supersedes any context provided to the Context method.
  3450  func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Pages(ctx context.Context, f func(*ListTasksResponse) error) error {
  3451  	c.ctx_ = ctx
  3452  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3453  	for {
  3454  		x, err := c.Do()
  3455  		if err != nil {
  3456  			return err
  3457  		}
  3458  		if err := f(x); err != nil {
  3459  			return err
  3460  		}
  3461  		if x.NextPageToken == "" {
  3462  			return nil
  3463  		}
  3464  		c.PageToken(x.NextPageToken)
  3465  	}
  3466  }
  3467  
  3468  type ProjectsLocationsOperationsCancelCall struct {
  3469  	s                      *Service
  3470  	name                   string
  3471  	canceloperationrequest *CancelOperationRequest
  3472  	urlParams_             gensupport.URLParams
  3473  	ctx_                   context.Context
  3474  	header_                http.Header
  3475  }
  3476  
  3477  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  3478  // server makes a best effort to cancel the operation, but success is not
  3479  // guaranteed. If the server doesn't support this method, it returns
  3480  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  3481  // other methods to check whether the cancellation succeeded or whether the
  3482  // operation completed despite cancellation. On successful cancellation, the
  3483  // operation is not deleted; instead, it becomes an operation with an
  3484  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  3485  // `Code.CANCELLED`.
  3486  //
  3487  // - name: The name of the operation resource to be cancelled.
  3488  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  3489  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3490  	c.name = name
  3491  	c.canceloperationrequest = canceloperationrequest
  3492  	return c
  3493  }
  3494  
  3495  // Fields allows partial responses to be retrieved. See
  3496  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3497  // details.
  3498  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  3499  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3500  	return c
  3501  }
  3502  
  3503  // Context sets the context to be used in this call's Do method.
  3504  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  3505  	c.ctx_ = ctx
  3506  	return c
  3507  }
  3508  
  3509  // Header returns a http.Header that can be modified by the caller to add
  3510  // headers to the request.
  3511  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  3512  	if c.header_ == nil {
  3513  		c.header_ = make(http.Header)
  3514  	}
  3515  	return c.header_
  3516  }
  3517  
  3518  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  3519  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3520  	var body io.Reader = nil
  3521  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  3522  	if err != nil {
  3523  		return nil, err
  3524  	}
  3525  	c.urlParams_.Set("alt", alt)
  3526  	c.urlParams_.Set("prettyPrint", "false")
  3527  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  3528  	urls += "?" + c.urlParams_.Encode()
  3529  	req, err := http.NewRequest("POST", urls, body)
  3530  	if err != nil {
  3531  		return nil, err
  3532  	}
  3533  	req.Header = reqHeaders
  3534  	googleapi.Expand(req.URL, map[string]string{
  3535  		"name": c.name,
  3536  	})
  3537  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3538  }
  3539  
  3540  // Do executes the "batch.projects.locations.operations.cancel" call.
  3541  // Any non-2xx status code is an error. Response headers are in either
  3542  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3543  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3544  // whether the returned error was because http.StatusNotModified was returned.
  3545  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3546  	gensupport.SetOptions(c.urlParams_, opts...)
  3547  	res, err := c.doRequest("json")
  3548  	if res != nil && res.StatusCode == http.StatusNotModified {
  3549  		if res.Body != nil {
  3550  			res.Body.Close()
  3551  		}
  3552  		return nil, gensupport.WrapError(&googleapi.Error{
  3553  			Code:   res.StatusCode,
  3554  			Header: res.Header,
  3555  		})
  3556  	}
  3557  	if err != nil {
  3558  		return nil, err
  3559  	}
  3560  	defer googleapi.CloseBody(res)
  3561  	if err := googleapi.CheckResponse(res); err != nil {
  3562  		return nil, gensupport.WrapError(err)
  3563  	}
  3564  	ret := &Empty{
  3565  		ServerResponse: googleapi.ServerResponse{
  3566  			Header:         res.Header,
  3567  			HTTPStatusCode: res.StatusCode,
  3568  		},
  3569  	}
  3570  	target := &ret
  3571  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3572  		return nil, err
  3573  	}
  3574  	return ret, nil
  3575  }
  3576  
  3577  type ProjectsLocationsOperationsDeleteCall struct {
  3578  	s          *Service
  3579  	name       string
  3580  	urlParams_ gensupport.URLParams
  3581  	ctx_       context.Context
  3582  	header_    http.Header
  3583  }
  3584  
  3585  // Delete: Deletes a long-running operation. This method indicates that the
  3586  // client is no longer interested in the operation result. It does not cancel
  3587  // the operation. If the server doesn't support this method, it returns
  3588  // `google.rpc.Code.UNIMPLEMENTED`.
  3589  //
  3590  // - name: The name of the operation resource to be deleted.
  3591  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  3592  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3593  	c.name = name
  3594  	return c
  3595  }
  3596  
  3597  // Fields allows partial responses to be retrieved. See
  3598  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3599  // details.
  3600  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  3601  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3602  	return c
  3603  }
  3604  
  3605  // Context sets the context to be used in this call's Do method.
  3606  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  3607  	c.ctx_ = ctx
  3608  	return c
  3609  }
  3610  
  3611  // Header returns a http.Header that can be modified by the caller to add
  3612  // headers to the request.
  3613  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  3614  	if c.header_ == nil {
  3615  		c.header_ = make(http.Header)
  3616  	}
  3617  	return c.header_
  3618  }
  3619  
  3620  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3621  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3622  	var body io.Reader = nil
  3623  	c.urlParams_.Set("alt", alt)
  3624  	c.urlParams_.Set("prettyPrint", "false")
  3625  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3626  	urls += "?" + c.urlParams_.Encode()
  3627  	req, err := http.NewRequest("DELETE", urls, body)
  3628  	if err != nil {
  3629  		return nil, err
  3630  	}
  3631  	req.Header = reqHeaders
  3632  	googleapi.Expand(req.URL, map[string]string{
  3633  		"name": c.name,
  3634  	})
  3635  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3636  }
  3637  
  3638  // Do executes the "batch.projects.locations.operations.delete" call.
  3639  // Any non-2xx status code is an error. Response headers are in either
  3640  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3641  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3642  // whether the returned error was because http.StatusNotModified was returned.
  3643  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3644  	gensupport.SetOptions(c.urlParams_, opts...)
  3645  	res, err := c.doRequest("json")
  3646  	if res != nil && res.StatusCode == http.StatusNotModified {
  3647  		if res.Body != nil {
  3648  			res.Body.Close()
  3649  		}
  3650  		return nil, gensupport.WrapError(&googleapi.Error{
  3651  			Code:   res.StatusCode,
  3652  			Header: res.Header,
  3653  		})
  3654  	}
  3655  	if err != nil {
  3656  		return nil, err
  3657  	}
  3658  	defer googleapi.CloseBody(res)
  3659  	if err := googleapi.CheckResponse(res); err != nil {
  3660  		return nil, gensupport.WrapError(err)
  3661  	}
  3662  	ret := &Empty{
  3663  		ServerResponse: googleapi.ServerResponse{
  3664  			Header:         res.Header,
  3665  			HTTPStatusCode: res.StatusCode,
  3666  		},
  3667  	}
  3668  	target := &ret
  3669  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3670  		return nil, err
  3671  	}
  3672  	return ret, nil
  3673  }
  3674  
  3675  type ProjectsLocationsOperationsGetCall struct {
  3676  	s            *Service
  3677  	name         string
  3678  	urlParams_   gensupport.URLParams
  3679  	ifNoneMatch_ string
  3680  	ctx_         context.Context
  3681  	header_      http.Header
  3682  }
  3683  
  3684  // Get: Gets the latest state of a long-running operation. Clients can use this
  3685  // method to poll the operation result at intervals as recommended by the API
  3686  // service.
  3687  //
  3688  // - name: The name of the operation resource.
  3689  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  3690  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3691  	c.name = name
  3692  	return c
  3693  }
  3694  
  3695  // Fields allows partial responses to be retrieved. See
  3696  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3697  // details.
  3698  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  3699  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3700  	return c
  3701  }
  3702  
  3703  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3704  // object's ETag matches the given value. This is useful for getting updates
  3705  // only after the object has changed since the last request.
  3706  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  3707  	c.ifNoneMatch_ = entityTag
  3708  	return c
  3709  }
  3710  
  3711  // Context sets the context to be used in this call's Do method.
  3712  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  3713  	c.ctx_ = ctx
  3714  	return c
  3715  }
  3716  
  3717  // Header returns a http.Header that can be modified by the caller to add
  3718  // headers to the request.
  3719  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  3720  	if c.header_ == nil {
  3721  		c.header_ = make(http.Header)
  3722  	}
  3723  	return c.header_
  3724  }
  3725  
  3726  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3727  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3728  	if c.ifNoneMatch_ != "" {
  3729  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3730  	}
  3731  	var body io.Reader = nil
  3732  	c.urlParams_.Set("alt", alt)
  3733  	c.urlParams_.Set("prettyPrint", "false")
  3734  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3735  	urls += "?" + c.urlParams_.Encode()
  3736  	req, err := http.NewRequest("GET", urls, body)
  3737  	if err != nil {
  3738  		return nil, err
  3739  	}
  3740  	req.Header = reqHeaders
  3741  	googleapi.Expand(req.URL, map[string]string{
  3742  		"name": c.name,
  3743  	})
  3744  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3745  }
  3746  
  3747  // Do executes the "batch.projects.locations.operations.get" call.
  3748  // Any non-2xx status code is an error. Response headers are in either
  3749  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3750  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3751  // whether the returned error was because http.StatusNotModified was returned.
  3752  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3753  	gensupport.SetOptions(c.urlParams_, opts...)
  3754  	res, err := c.doRequest("json")
  3755  	if res != nil && res.StatusCode == http.StatusNotModified {
  3756  		if res.Body != nil {
  3757  			res.Body.Close()
  3758  		}
  3759  		return nil, gensupport.WrapError(&googleapi.Error{
  3760  			Code:   res.StatusCode,
  3761  			Header: res.Header,
  3762  		})
  3763  	}
  3764  	if err != nil {
  3765  		return nil, err
  3766  	}
  3767  	defer googleapi.CloseBody(res)
  3768  	if err := googleapi.CheckResponse(res); err != nil {
  3769  		return nil, gensupport.WrapError(err)
  3770  	}
  3771  	ret := &Operation{
  3772  		ServerResponse: googleapi.ServerResponse{
  3773  			Header:         res.Header,
  3774  			HTTPStatusCode: res.StatusCode,
  3775  		},
  3776  	}
  3777  	target := &ret
  3778  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3779  		return nil, err
  3780  	}
  3781  	return ret, nil
  3782  }
  3783  
  3784  type ProjectsLocationsOperationsListCall struct {
  3785  	s            *Service
  3786  	name         string
  3787  	urlParams_   gensupport.URLParams
  3788  	ifNoneMatch_ string
  3789  	ctx_         context.Context
  3790  	header_      http.Header
  3791  }
  3792  
  3793  // List: Lists operations that match the specified filter in the request. If
  3794  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3795  //
  3796  // - name: The name of the operation's parent resource.
  3797  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  3798  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3799  	c.name = name
  3800  	return c
  3801  }
  3802  
  3803  // Filter sets the optional parameter "filter": The standard list filter.
  3804  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  3805  	c.urlParams_.Set("filter", filter)
  3806  	return c
  3807  }
  3808  
  3809  // PageSize sets the optional parameter "pageSize": The standard list page
  3810  // size.
  3811  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  3812  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3813  	return c
  3814  }
  3815  
  3816  // PageToken sets the optional parameter "pageToken": The standard list page
  3817  // token.
  3818  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  3819  	c.urlParams_.Set("pageToken", pageToken)
  3820  	return c
  3821  }
  3822  
  3823  // Fields allows partial responses to be retrieved. See
  3824  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3825  // details.
  3826  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  3827  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3828  	return c
  3829  }
  3830  
  3831  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3832  // object's ETag matches the given value. This is useful for getting updates
  3833  // only after the object has changed since the last request.
  3834  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  3835  	c.ifNoneMatch_ = entityTag
  3836  	return c
  3837  }
  3838  
  3839  // Context sets the context to be used in this call's Do method.
  3840  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  3841  	c.ctx_ = ctx
  3842  	return c
  3843  }
  3844  
  3845  // Header returns a http.Header that can be modified by the caller to add
  3846  // headers to the request.
  3847  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  3848  	if c.header_ == nil {
  3849  		c.header_ = make(http.Header)
  3850  	}
  3851  	return c.header_
  3852  }
  3853  
  3854  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3855  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3856  	if c.ifNoneMatch_ != "" {
  3857  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3858  	}
  3859  	var body io.Reader = nil
  3860  	c.urlParams_.Set("alt", alt)
  3861  	c.urlParams_.Set("prettyPrint", "false")
  3862  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  3863  	urls += "?" + c.urlParams_.Encode()
  3864  	req, err := http.NewRequest("GET", urls, body)
  3865  	if err != nil {
  3866  		return nil, err
  3867  	}
  3868  	req.Header = reqHeaders
  3869  	googleapi.Expand(req.URL, map[string]string{
  3870  		"name": c.name,
  3871  	})
  3872  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3873  }
  3874  
  3875  // Do executes the "batch.projects.locations.operations.list" call.
  3876  // Any non-2xx status code is an error. Response headers are in either
  3877  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  3878  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3879  // check whether the returned error was because http.StatusNotModified was
  3880  // returned.
  3881  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3882  	gensupport.SetOptions(c.urlParams_, opts...)
  3883  	res, err := c.doRequest("json")
  3884  	if res != nil && res.StatusCode == http.StatusNotModified {
  3885  		if res.Body != nil {
  3886  			res.Body.Close()
  3887  		}
  3888  		return nil, gensupport.WrapError(&googleapi.Error{
  3889  			Code:   res.StatusCode,
  3890  			Header: res.Header,
  3891  		})
  3892  	}
  3893  	if err != nil {
  3894  		return nil, err
  3895  	}
  3896  	defer googleapi.CloseBody(res)
  3897  	if err := googleapi.CheckResponse(res); err != nil {
  3898  		return nil, gensupport.WrapError(err)
  3899  	}
  3900  	ret := &ListOperationsResponse{
  3901  		ServerResponse: googleapi.ServerResponse{
  3902  			Header:         res.Header,
  3903  			HTTPStatusCode: res.StatusCode,
  3904  		},
  3905  	}
  3906  	target := &ret
  3907  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3908  		return nil, err
  3909  	}
  3910  	return ret, nil
  3911  }
  3912  
  3913  // Pages invokes f for each page of results.
  3914  // A non-nil error returned from f will halt the iteration.
  3915  // The provided context supersedes any context provided to the Context method.
  3916  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3917  	c.ctx_ = ctx
  3918  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3919  	for {
  3920  		x, err := c.Do()
  3921  		if err != nil {
  3922  			return err
  3923  		}
  3924  		if err := f(x); err != nil {
  3925  			return err
  3926  		}
  3927  		if x.NextPageToken == "" {
  3928  			return nil
  3929  		}
  3930  		c.PageToken(x.NextPageToken)
  3931  	}
  3932  }
  3933  
  3934  type ProjectsLocationsStateReportCall struct {
  3935  	s                       *Service
  3936  	parent                  string
  3937  	reportagentstaterequest *ReportAgentStateRequest
  3938  	urlParams_              gensupport.URLParams
  3939  	ctx_                    context.Context
  3940  	header_                 http.Header
  3941  }
  3942  
  3943  // Report: Report agent's state, e.g. agent status and tasks information
  3944  //
  3945  //   - parent: Format: projects/{project}/locations/{location} {project} should
  3946  //     be a project number.
  3947  func (r *ProjectsLocationsStateService) Report(parent string, reportagentstaterequest *ReportAgentStateRequest) *ProjectsLocationsStateReportCall {
  3948  	c := &ProjectsLocationsStateReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3949  	c.parent = parent
  3950  	c.reportagentstaterequest = reportagentstaterequest
  3951  	return c
  3952  }
  3953  
  3954  // Fields allows partial responses to be retrieved. See
  3955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3956  // details.
  3957  func (c *ProjectsLocationsStateReportCall) Fields(s ...googleapi.Field) *ProjectsLocationsStateReportCall {
  3958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3959  	return c
  3960  }
  3961  
  3962  // Context sets the context to be used in this call's Do method.
  3963  func (c *ProjectsLocationsStateReportCall) Context(ctx context.Context) *ProjectsLocationsStateReportCall {
  3964  	c.ctx_ = ctx
  3965  	return c
  3966  }
  3967  
  3968  // Header returns a http.Header that can be modified by the caller to add
  3969  // headers to the request.
  3970  func (c *ProjectsLocationsStateReportCall) Header() http.Header {
  3971  	if c.header_ == nil {
  3972  		c.header_ = make(http.Header)
  3973  	}
  3974  	return c.header_
  3975  }
  3976  
  3977  func (c *ProjectsLocationsStateReportCall) doRequest(alt string) (*http.Response, error) {
  3978  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3979  	var body io.Reader = nil
  3980  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportagentstaterequest)
  3981  	if err != nil {
  3982  		return nil, err
  3983  	}
  3984  	c.urlParams_.Set("alt", alt)
  3985  	c.urlParams_.Set("prettyPrint", "false")
  3986  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/state:report")
  3987  	urls += "?" + c.urlParams_.Encode()
  3988  	req, err := http.NewRequest("POST", urls, body)
  3989  	if err != nil {
  3990  		return nil, err
  3991  	}
  3992  	req.Header = reqHeaders
  3993  	googleapi.Expand(req.URL, map[string]string{
  3994  		"parent": c.parent,
  3995  	})
  3996  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3997  }
  3998  
  3999  // Do executes the "batch.projects.locations.state.report" call.
  4000  // Any non-2xx status code is an error. Response headers are in either
  4001  // *ReportAgentStateResponse.ServerResponse.Header or (if a response was
  4002  // returned at all) in error.(*googleapi.Error).Header. Use
  4003  // googleapi.IsNotModified to check whether the returned error was because
  4004  // http.StatusNotModified was returned.
  4005  func (c *ProjectsLocationsStateReportCall) Do(opts ...googleapi.CallOption) (*ReportAgentStateResponse, error) {
  4006  	gensupport.SetOptions(c.urlParams_, opts...)
  4007  	res, err := c.doRequest("json")
  4008  	if res != nil && res.StatusCode == http.StatusNotModified {
  4009  		if res.Body != nil {
  4010  			res.Body.Close()
  4011  		}
  4012  		return nil, gensupport.WrapError(&googleapi.Error{
  4013  			Code:   res.StatusCode,
  4014  			Header: res.Header,
  4015  		})
  4016  	}
  4017  	if err != nil {
  4018  		return nil, err
  4019  	}
  4020  	defer googleapi.CloseBody(res)
  4021  	if err := googleapi.CheckResponse(res); err != nil {
  4022  		return nil, gensupport.WrapError(err)
  4023  	}
  4024  	ret := &ReportAgentStateResponse{
  4025  		ServerResponse: googleapi.ServerResponse{
  4026  			Header:         res.Header,
  4027  			HTTPStatusCode: res.StatusCode,
  4028  		},
  4029  	}
  4030  	target := &ret
  4031  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4032  		return nil, err
  4033  	}
  4034  	return ret, nil
  4035  }
  4036  

View as plain text