...

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

Documentation: google.golang.org/api/ml/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 ml provides access to the AI Platform Training & Prediction API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/ml/
    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/ml/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	mlService, err := ml.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  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	mlService, err := ml.NewService(ctx, option.WithScopes(ml.CloudPlatformReadOnlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	mlService, err := ml.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	mlService, err := ml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package ml // import "google.golang.org/api/ml/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "ml:v1"
    95  const apiName = "ml"
    96  const apiVersion = "v1"
    97  const basePath = "https://ml.googleapis.com/"
    98  const basePathTemplate = "https://ml.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://ml.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// See, edit, configure, and delete your Google Cloud data and see the email
   104  	// address for your Google Account.
   105  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   106  
   107  	// View your data across Google Cloud services and see the email address of
   108  	// your Google Account
   109  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
   110  )
   111  
   112  // NewService creates a new Service.
   113  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   114  	scopesOption := internaloption.WithDefaultScopes(
   115  		"https://www.googleapis.com/auth/cloud-platform",
   116  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   117  	)
   118  	// NOTE: prepend, so we don't override user-specified scopes.
   119  	opts = append([]option.ClientOption{scopesOption}, opts...)
   120  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   121  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   122  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   123  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   124  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	s, err := New(client)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	if endpoint != "" {
   133  		s.BasePath = endpoint
   134  	}
   135  	return s, nil
   136  }
   137  
   138  // New creates a new Service. It uses the provided http.Client for requests.
   139  //
   140  // Deprecated: please use NewService instead.
   141  // To provide a custom HTTP client, use option.WithHTTPClient.
   142  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   143  func New(client *http.Client) (*Service, error) {
   144  	if client == nil {
   145  		return nil, errors.New("client is nil")
   146  	}
   147  	s := &Service{client: client, BasePath: basePath}
   148  	s.Projects = NewProjectsService(s)
   149  	return s, nil
   150  }
   151  
   152  type Service struct {
   153  	client    *http.Client
   154  	BasePath  string // API endpoint base URL
   155  	UserAgent string // optional additional User-Agent fragment
   156  
   157  	Projects *ProjectsService
   158  }
   159  
   160  func (s *Service) userAgent() string {
   161  	if s.UserAgent == "" {
   162  		return googleapi.UserAgent
   163  	}
   164  	return googleapi.UserAgent + " " + s.UserAgent
   165  }
   166  
   167  func NewProjectsService(s *Service) *ProjectsService {
   168  	rs := &ProjectsService{s: s}
   169  	rs.Jobs = NewProjectsJobsService(s)
   170  	rs.Locations = NewProjectsLocationsService(s)
   171  	rs.Models = NewProjectsModelsService(s)
   172  	rs.Operations = NewProjectsOperationsService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsService struct {
   177  	s *Service
   178  
   179  	Jobs *ProjectsJobsService
   180  
   181  	Locations *ProjectsLocationsService
   182  
   183  	Models *ProjectsModelsService
   184  
   185  	Operations *ProjectsOperationsService
   186  }
   187  
   188  func NewProjectsJobsService(s *Service) *ProjectsJobsService {
   189  	rs := &ProjectsJobsService{s: s}
   190  	return rs
   191  }
   192  
   193  type ProjectsJobsService struct {
   194  	s *Service
   195  }
   196  
   197  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   198  	rs := &ProjectsLocationsService{s: s}
   199  	rs.Operations = NewProjectsLocationsOperationsService(s)
   200  	rs.Studies = NewProjectsLocationsStudiesService(s)
   201  	return rs
   202  }
   203  
   204  type ProjectsLocationsService struct {
   205  	s *Service
   206  
   207  	Operations *ProjectsLocationsOperationsService
   208  
   209  	Studies *ProjectsLocationsStudiesService
   210  }
   211  
   212  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   213  	rs := &ProjectsLocationsOperationsService{s: s}
   214  	return rs
   215  }
   216  
   217  type ProjectsLocationsOperationsService struct {
   218  	s *Service
   219  }
   220  
   221  func NewProjectsLocationsStudiesService(s *Service) *ProjectsLocationsStudiesService {
   222  	rs := &ProjectsLocationsStudiesService{s: s}
   223  	rs.Trials = NewProjectsLocationsStudiesTrialsService(s)
   224  	return rs
   225  }
   226  
   227  type ProjectsLocationsStudiesService struct {
   228  	s *Service
   229  
   230  	Trials *ProjectsLocationsStudiesTrialsService
   231  }
   232  
   233  func NewProjectsLocationsStudiesTrialsService(s *Service) *ProjectsLocationsStudiesTrialsService {
   234  	rs := &ProjectsLocationsStudiesTrialsService{s: s}
   235  	return rs
   236  }
   237  
   238  type ProjectsLocationsStudiesTrialsService struct {
   239  	s *Service
   240  }
   241  
   242  func NewProjectsModelsService(s *Service) *ProjectsModelsService {
   243  	rs := &ProjectsModelsService{s: s}
   244  	rs.Versions = NewProjectsModelsVersionsService(s)
   245  	return rs
   246  }
   247  
   248  type ProjectsModelsService struct {
   249  	s *Service
   250  
   251  	Versions *ProjectsModelsVersionsService
   252  }
   253  
   254  func NewProjectsModelsVersionsService(s *Service) *ProjectsModelsVersionsService {
   255  	rs := &ProjectsModelsVersionsService{s: s}
   256  	return rs
   257  }
   258  
   259  type ProjectsModelsVersionsService struct {
   260  	s *Service
   261  }
   262  
   263  func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
   264  	rs := &ProjectsOperationsService{s: s}
   265  	return rs
   266  }
   267  
   268  type ProjectsOperationsService struct {
   269  	s *Service
   270  }
   271  
   272  // GoogleApi__HttpBody: Message that represents an arbitrary HTTP body. It
   273  // should only be used for payload formats that can't be represented as JSON,
   274  // such as raw binary or an HTML page. This message can be used both in
   275  // streaming and non-streaming API methods in the request as well as the
   276  // response. It can be used as a top-level request field, which is convenient
   277  // if one wants to extract parameters from either the URL or HTTP template into
   278  // the request fields and also want access to the raw HTTP body. Example:
   279  // message GetResourceRequest { // A unique request id. string request_id = 1;
   280  // // The raw HTTP body is bound to this field. google.api.HttpBody http_body =
   281  // 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns
   282  // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns
   283  // (google.protobuf.Empty); } Example with streaming methods: service
   284  // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream
   285  // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns
   286  // (stream google.api.HttpBody); } Use of this type only changes how the
   287  // request and response bodies are handled, all other features will continue to
   288  // work unchanged.
   289  type GoogleApi__HttpBody struct {
   290  	// ContentType: The HTTP Content-Type header value specifying the content type
   291  	// of the body.
   292  	ContentType string `json:"contentType,omitempty"`
   293  	// Data: The HTTP request/response body as raw binary.
   294  	Data string `json:"data,omitempty"`
   295  	// Extensions: Application specific response metadata. Must be set in the first
   296  	// response for streaming APIs.
   297  	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
   298  
   299  	// ServerResponse contains the HTTP response code and headers from the server.
   300  	googleapi.ServerResponse `json:"-"`
   301  	// ForceSendFields is a list of field names (e.g. "ContentType") to
   302  	// unconditionally include in API requests. By default, fields with empty or
   303  	// default values are omitted from API requests. See
   304  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   305  	// details.
   306  	ForceSendFields []string `json:"-"`
   307  	// NullFields is a list of field names (e.g. "ContentType") to include in API
   308  	// requests with the JSON null value. By default, fields with empty values are
   309  	// omitted from API requests. See
   310  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   311  	NullFields []string `json:"-"`
   312  }
   313  
   314  func (s *GoogleApi__HttpBody) MarshalJSON() ([]byte, error) {
   315  	type NoMethod GoogleApi__HttpBody
   316  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   317  }
   318  
   319  type GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig struct {
   320  	// UseElapsedTime: If true, measurement.elapsed_time is used as the x-axis of
   321  	// each Trials Decay Curve. Otherwise, Measurement.steps will be used as the
   322  	// x-axis.
   323  	UseElapsedTime bool `json:"useElapsedTime,omitempty"`
   324  	// ForceSendFields is a list of field names (e.g. "UseElapsedTime") to
   325  	// unconditionally include in API requests. By default, fields with empty or
   326  	// default values are omitted from API requests. See
   327  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   328  	// details.
   329  	ForceSendFields []string `json:"-"`
   330  	// NullFields is a list of field names (e.g. "UseElapsedTime") to include in
   331  	// API requests with the JSON null value. By default, fields with empty values
   332  	// are omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   334  	NullFields []string `json:"-"`
   335  }
   336  
   337  func (s *GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
   338  	type NoMethod GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig
   339  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   340  }
   341  
   342  // GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig: The
   343  // median automated stopping rule stops a pending trial if the trial's best
   344  // objective_value is strictly below the median 'performance' of all completed
   345  // trials reported up to the trial's last measurement. Currently, 'performance'
   346  // refers to the running average of the objective values reported by the trial
   347  // in each measurement.
   348  type GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig struct {
   349  	// UseElapsedTime: If true, the median automated stopping rule applies to
   350  	// measurement.use_elapsed_time, which means the elapsed_time field of the
   351  	// current trial's latest measurement is used to compute the median objective
   352  	// value for each completed trial.
   353  	UseElapsedTime bool `json:"useElapsedTime,omitempty"`
   354  	// ForceSendFields is a list of field names (e.g. "UseElapsedTime") to
   355  	// unconditionally include in API requests. By default, fields with empty or
   356  	// default values are omitted from API requests. See
   357  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   358  	// details.
   359  	ForceSendFields []string `json:"-"`
   360  	// NullFields is a list of field names (e.g. "UseElapsedTime") to include in
   361  	// API requests with the JSON null value. By default, fields with empty values
   362  	// are omitted from API requests. See
   363  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   364  	NullFields []string `json:"-"`
   365  }
   366  
   367  func (s *GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
   368  	type NoMethod GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig
   369  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   370  }
   371  
   372  // GoogleCloudMlV1HyperparameterOutputHyperparameterMetric: An observed value
   373  // of a metric.
   374  type GoogleCloudMlV1HyperparameterOutputHyperparameterMetric struct {
   375  	// ObjectiveValue: The objective value at this training step.
   376  	ObjectiveValue float64 `json:"objectiveValue,omitempty"`
   377  	// TrainingStep: The global training step for this metric.
   378  	TrainingStep int64 `json:"trainingStep,omitempty,string"`
   379  	// ForceSendFields is a list of field names (e.g. "ObjectiveValue") to
   380  	// unconditionally include in API requests. By default, fields with empty or
   381  	// default values are omitted from API requests. See
   382  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   383  	// details.
   384  	ForceSendFields []string `json:"-"`
   385  	// NullFields is a list of field names (e.g. "ObjectiveValue") to include in
   386  	// API requests with the JSON null value. By default, fields with empty values
   387  	// are omitted from API requests. See
   388  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   389  	NullFields []string `json:"-"`
   390  }
   391  
   392  func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) MarshalJSON() ([]byte, error) {
   393  	type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
   394  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   395  }
   396  
   397  func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) UnmarshalJSON(data []byte) error {
   398  	type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
   399  	var s1 struct {
   400  		ObjectiveValue gensupport.JSONFloat64 `json:"objectiveValue"`
   401  		*NoMethod
   402  	}
   403  	s1.NoMethod = (*NoMethod)(s)
   404  	if err := json.Unmarshal(data, &s1); err != nil {
   405  		return err
   406  	}
   407  	s.ObjectiveValue = float64(s1.ObjectiveValue)
   408  	return nil
   409  }
   410  
   411  // GoogleCloudMlV1MeasurementMetric: A message representing a metric in the
   412  // measurement.
   413  type GoogleCloudMlV1MeasurementMetric struct {
   414  	// Metric: Required. Metric name.
   415  	Metric string `json:"metric,omitempty"`
   416  	// Value: Required. The value for this metric.
   417  	Value float64 `json:"value,omitempty"`
   418  	// ForceSendFields is a list of field names (e.g. "Metric") to unconditionally
   419  	// include in API requests. By default, fields with empty or default values are
   420  	// omitted from API requests. See
   421  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   422  	// details.
   423  	ForceSendFields []string `json:"-"`
   424  	// NullFields is a list of field names (e.g. "Metric") to include in API
   425  	// requests with the JSON null value. By default, fields with empty values are
   426  	// omitted from API requests. See
   427  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   428  	NullFields []string `json:"-"`
   429  }
   430  
   431  func (s *GoogleCloudMlV1MeasurementMetric) MarshalJSON() ([]byte, error) {
   432  	type NoMethod GoogleCloudMlV1MeasurementMetric
   433  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   434  }
   435  
   436  func (s *GoogleCloudMlV1MeasurementMetric) UnmarshalJSON(data []byte) error {
   437  	type NoMethod GoogleCloudMlV1MeasurementMetric
   438  	var s1 struct {
   439  		Value gensupport.JSONFloat64 `json:"value"`
   440  		*NoMethod
   441  	}
   442  	s1.NoMethod = (*NoMethod)(s)
   443  	if err := json.Unmarshal(data, &s1); err != nil {
   444  		return err
   445  	}
   446  	s.Value = float64(s1.Value)
   447  	return nil
   448  }
   449  
   450  type GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec struct {
   451  	// Values: Must be specified if type is `CATEGORICAL`. The list of possible
   452  	// categories.
   453  	Values []string `json:"values,omitempty"`
   454  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   455  	// include in API requests. By default, fields with empty or default values are
   456  	// omitted from API requests. See
   457  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   458  	// details.
   459  	ForceSendFields []string `json:"-"`
   460  	// NullFields is a list of field names (e.g. "Values") to include in API
   461  	// requests with the JSON null value. By default, fields with empty values are
   462  	// omitted from API requests. See
   463  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   464  	NullFields []string `json:"-"`
   465  }
   466  
   467  func (s *GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec) MarshalJSON() ([]byte, error) {
   468  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec
   469  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   470  }
   471  
   472  type GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec struct {
   473  	// Values: Must be specified if type is `DISCRETE`. A list of feasible points.
   474  	// The list should be in strictly increasing order. For instance, this
   475  	// parameter might have possible settings of 1.5, 2.5, and 4.0. This list
   476  	// should not contain more than 1,000 values.
   477  	Values []float64 `json:"values,omitempty"`
   478  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   479  	// include in API requests. By default, fields with empty or default values are
   480  	// omitted from API requests. See
   481  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   482  	// details.
   483  	ForceSendFields []string `json:"-"`
   484  	// NullFields is a list of field names (e.g. "Values") to include in API
   485  	// requests with the JSON null value. By default, fields with empty values are
   486  	// omitted from API requests. See
   487  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   488  	NullFields []string `json:"-"`
   489  }
   490  
   491  func (s *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec) MarshalJSON() ([]byte, error) {
   492  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec
   493  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   494  }
   495  
   496  func (s *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec) UnmarshalJSON(data []byte) error {
   497  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec
   498  	var s1 struct {
   499  		Values []gensupport.JSONFloat64 `json:"values"`
   500  		*NoMethod
   501  	}
   502  	s1.NoMethod = (*NoMethod)(s)
   503  	if err := json.Unmarshal(data, &s1); err != nil {
   504  		return err
   505  	}
   506  	s.Values = make([]float64, len(s1.Values))
   507  	for i := range s1.Values {
   508  		s.Values[i] = float64(s1.Values[i])
   509  	}
   510  	return nil
   511  }
   512  
   513  type GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec struct {
   514  	// MaxValue: Must be specified if type is `DOUBLE`. Maximum value of the
   515  	// parameter.
   516  	MaxValue float64 `json:"maxValue,omitempty"`
   517  	// MinValue: Must be specified if type is `DOUBLE`. Minimum value of the
   518  	// parameter.
   519  	MinValue float64 `json:"minValue,omitempty"`
   520  	// ForceSendFields is a list of field names (e.g. "MaxValue") to
   521  	// unconditionally include in API requests. By default, fields with empty or
   522  	// default values are omitted from API requests. See
   523  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   524  	// details.
   525  	ForceSendFields []string `json:"-"`
   526  	// NullFields is a list of field names (e.g. "MaxValue") to include in API
   527  	// requests with the JSON null value. By default, fields with empty values are
   528  	// omitted from API requests. See
   529  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   530  	NullFields []string `json:"-"`
   531  }
   532  
   533  func (s *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec) MarshalJSON() ([]byte, error) {
   534  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec
   535  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   536  }
   537  
   538  func (s *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec) UnmarshalJSON(data []byte) error {
   539  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec
   540  	var s1 struct {
   541  		MaxValue gensupport.JSONFloat64 `json:"maxValue"`
   542  		MinValue gensupport.JSONFloat64 `json:"minValue"`
   543  		*NoMethod
   544  	}
   545  	s1.NoMethod = (*NoMethod)(s)
   546  	if err := json.Unmarshal(data, &s1); err != nil {
   547  		return err
   548  	}
   549  	s.MaxValue = float64(s1.MaxValue)
   550  	s.MinValue = float64(s1.MinValue)
   551  	return nil
   552  }
   553  
   554  type GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec struct {
   555  	// MaxValue: Must be specified if type is `INTEGER`. Maximum value of the
   556  	// parameter.
   557  	MaxValue int64 `json:"maxValue,omitempty,string"`
   558  	// MinValue: Must be specified if type is `INTEGER`. Minimum value of the
   559  	// parameter.
   560  	MinValue int64 `json:"minValue,omitempty,string"`
   561  	// ForceSendFields is a list of field names (e.g. "MaxValue") to
   562  	// unconditionally include in API requests. By default, fields with empty or
   563  	// default values are omitted from API requests. See
   564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   565  	// details.
   566  	ForceSendFields []string `json:"-"`
   567  	// NullFields is a list of field names (e.g. "MaxValue") to include in API
   568  	// requests with the JSON null value. By default, fields with empty values are
   569  	// omitted from API requests. See
   570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   571  	NullFields []string `json:"-"`
   572  }
   573  
   574  func (s *GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec) MarshalJSON() ([]byte, error) {
   575  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec
   576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   577  }
   578  
   579  // GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec:
   580  // Represents the spec to match categorical values from parent parameter.
   581  type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec struct {
   582  	// Values: Matches values of the parent parameter with type 'CATEGORICAL'. All
   583  	// values must exist in `categorical_value_spec` of parent parameter.
   584  	Values []string `json:"values,omitempty"`
   585  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   586  	// include in API requests. By default, fields with empty or default values are
   587  	// omitted from API requests. See
   588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   589  	// details.
   590  	ForceSendFields []string `json:"-"`
   591  	// NullFields is a list of field names (e.g. "Values") to include in API
   592  	// requests with the JSON null value. By default, fields with empty values are
   593  	// omitted from API requests. See
   594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   595  	NullFields []string `json:"-"`
   596  }
   597  
   598  func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec) MarshalJSON() ([]byte, error) {
   599  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec
   600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   601  }
   602  
   603  // GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec:
   604  // Represents the spec to match discrete values from parent parameter.
   605  type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec struct {
   606  	// Values: Matches values of the parent parameter with type 'DISCRETE'. All
   607  	// values must exist in `discrete_value_spec` of parent parameter.
   608  	Values []float64 `json:"values,omitempty"`
   609  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   610  	// include in API requests. By default, fields with empty or default values are
   611  	// omitted from API requests. See
   612  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   613  	// details.
   614  	ForceSendFields []string `json:"-"`
   615  	// NullFields is a list of field names (e.g. "Values") to include in API
   616  	// requests with the JSON null value. By default, fields with empty values are
   617  	// omitted from API requests. See
   618  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   619  	NullFields []string `json:"-"`
   620  }
   621  
   622  func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec) MarshalJSON() ([]byte, error) {
   623  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec
   624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   625  }
   626  
   627  func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec) UnmarshalJSON(data []byte) error {
   628  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec
   629  	var s1 struct {
   630  		Values []gensupport.JSONFloat64 `json:"values"`
   631  		*NoMethod
   632  	}
   633  	s1.NoMethod = (*NoMethod)(s)
   634  	if err := json.Unmarshal(data, &s1); err != nil {
   635  		return err
   636  	}
   637  	s.Values = make([]float64, len(s1.Values))
   638  	for i := range s1.Values {
   639  		s.Values[i] = float64(s1.Values[i])
   640  	}
   641  	return nil
   642  }
   643  
   644  // GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec:
   645  // Represents the spec to match integer values from parent parameter.
   646  type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec struct {
   647  	// Values: Matches values of the parent parameter with type 'INTEGER'. All
   648  	// values must lie in `integer_value_spec` of parent parameter.
   649  	Values googleapi.Int64s `json:"values,omitempty"`
   650  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   651  	// include in API requests. By default, fields with empty or default values are
   652  	// omitted from API requests. See
   653  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   654  	// details.
   655  	ForceSendFields []string `json:"-"`
   656  	// NullFields is a list of field names (e.g. "Values") to include in API
   657  	// requests with the JSON null value. By default, fields with empty values are
   658  	// omitted from API requests. See
   659  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   660  	NullFields []string `json:"-"`
   661  }
   662  
   663  func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec) MarshalJSON() ([]byte, error) {
   664  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec
   665  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   666  }
   667  
   668  // GoogleCloudMlV1StudyConfigMetricSpec: Represents a metric to optimize.
   669  type GoogleCloudMlV1StudyConfigMetricSpec struct {
   670  	// Goal: Required. The optimization goal of the metric.
   671  	//
   672  	// Possible values:
   673  	//   "GOAL_TYPE_UNSPECIFIED" - Goal Type will default to maximize.
   674  	//   "MAXIMIZE" - Maximize the goal metric.
   675  	//   "MINIMIZE" - Minimize the goal metric.
   676  	Goal string `json:"goal,omitempty"`
   677  	// Metric: Required. The name of the metric.
   678  	Metric string `json:"metric,omitempty"`
   679  	// ForceSendFields is a list of field names (e.g. "Goal") to unconditionally
   680  	// include in API requests. By default, fields with empty or default values are
   681  	// omitted from API requests. See
   682  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   683  	// details.
   684  	ForceSendFields []string `json:"-"`
   685  	// NullFields is a list of field names (e.g. "Goal") to include in API requests
   686  	// with the JSON null value. By default, fields with empty values are omitted
   687  	// from API requests. See
   688  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   689  	NullFields []string `json:"-"`
   690  }
   691  
   692  func (s *GoogleCloudMlV1StudyConfigMetricSpec) MarshalJSON() ([]byte, error) {
   693  	type NoMethod GoogleCloudMlV1StudyConfigMetricSpec
   694  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   695  }
   696  
   697  // GoogleCloudMlV1StudyConfigParameterSpec: Represents a single parameter to
   698  // optimize.
   699  type GoogleCloudMlV1StudyConfigParameterSpec struct {
   700  	// CategoricalValueSpec: The value spec for a 'CATEGORICAL' parameter.
   701  	CategoricalValueSpec *GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec `json:"categoricalValueSpec,omitempty"`
   702  	// ChildParameterSpecs: A child node is active if the parameter's value matches
   703  	// the child node's matching_parent_values. If two items in
   704  	// child_parameter_specs have the same name, they must have disjoint
   705  	// matching_parent_values.
   706  	ChildParameterSpecs []*GoogleCloudMlV1StudyConfigParameterSpec `json:"childParameterSpecs,omitempty"`
   707  	// DiscreteValueSpec: The value spec for a 'DISCRETE' parameter.
   708  	DiscreteValueSpec *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec `json:"discreteValueSpec,omitempty"`
   709  	// DoubleValueSpec: The value spec for a 'DOUBLE' parameter.
   710  	DoubleValueSpec *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec `json:"doubleValueSpec,omitempty"`
   711  	// IntegerValueSpec: The value spec for an 'INTEGER' parameter.
   712  	IntegerValueSpec *GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec `json:"integerValueSpec,omitempty"`
   713  	// Parameter: Required. The parameter name must be unique amongst all
   714  	// ParameterSpecs.
   715  	Parameter               string                                                                     `json:"parameter,omitempty"`
   716  	ParentCategoricalValues *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec `json:"parentCategoricalValues,omitempty"`
   717  	ParentDiscreteValues    *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec    `json:"parentDiscreteValues,omitempty"`
   718  	ParentIntValues         *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec         `json:"parentIntValues,omitempty"`
   719  	// ScaleType: How the parameter should be scaled. Leave unset for categorical
   720  	// parameters.
   721  	//
   722  	// Possible values:
   723  	//   "SCALE_TYPE_UNSPECIFIED" - By default, no scaling is applied.
   724  	//   "UNIT_LINEAR_SCALE" - Scales the feasible space to (0, 1) linearly.
   725  	//   "UNIT_LOG_SCALE" - Scales the feasible space logarithmically to (0, 1).
   726  	// The entire feasible space must be strictly positive.
   727  	//   "UNIT_REVERSE_LOG_SCALE" - Scales the feasible space "reverse"
   728  	// logarithmically to (0, 1). The result is that values close to the top of the
   729  	// feasible space are spread out more than points near the bottom. The entire
   730  	// feasible space must be strictly positive.
   731  	ScaleType string `json:"scaleType,omitempty"`
   732  	// Type: Required. The type of the parameter.
   733  	//
   734  	// Possible values:
   735  	//   "PARAMETER_TYPE_UNSPECIFIED" - You must specify a valid type. Using this
   736  	// unspecified type will result in an error.
   737  	//   "DOUBLE" - Type for real-valued parameters.
   738  	//   "INTEGER" - Type for integral parameters.
   739  	//   "CATEGORICAL" - The parameter is categorical, with a value chosen from the
   740  	// categories field.
   741  	//   "DISCRETE" - The parameter is real valued, with a fixed set of feasible
   742  	// points. If `type==DISCRETE`, feasible_points must be provided, and
   743  	// {`min_value`, `max_value`} will be ignored.
   744  	Type string `json:"type,omitempty"`
   745  	// ForceSendFields is a list of field names (e.g. "CategoricalValueSpec") to
   746  	// unconditionally include in API requests. By default, fields with empty or
   747  	// default values are omitted from API requests. See
   748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   749  	// details.
   750  	ForceSendFields []string `json:"-"`
   751  	// NullFields is a list of field names (e.g. "CategoricalValueSpec") to include
   752  	// in API requests with the JSON null value. By default, fields with empty
   753  	// values are omitted from API requests. See
   754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   755  	NullFields []string `json:"-"`
   756  }
   757  
   758  func (s *GoogleCloudMlV1StudyConfigParameterSpec) MarshalJSON() ([]byte, error) {
   759  	type NoMethod GoogleCloudMlV1StudyConfigParameterSpec
   760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   761  }
   762  
   763  // GoogleCloudMlV1TrialParameter: A message representing a parameter to be
   764  // tuned. Contains the name of the parameter and the suggested value to use for
   765  // this trial.
   766  type GoogleCloudMlV1TrialParameter struct {
   767  	// FloatValue: Must be set if ParameterType is DOUBLE or DISCRETE.
   768  	FloatValue float64 `json:"floatValue,omitempty"`
   769  	// IntValue: Must be set if ParameterType is INTEGER
   770  	IntValue int64 `json:"intValue,omitempty,string"`
   771  	// Parameter: The name of the parameter.
   772  	Parameter string `json:"parameter,omitempty"`
   773  	// StringValue: Must be set if ParameterTypeis CATEGORICAL
   774  	StringValue string `json:"stringValue,omitempty"`
   775  	// ForceSendFields is a list of field names (e.g. "FloatValue") to
   776  	// unconditionally include in API requests. By default, fields with empty or
   777  	// default values are omitted from API requests. See
   778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   779  	// details.
   780  	ForceSendFields []string `json:"-"`
   781  	// NullFields is a list of field names (e.g. "FloatValue") to include in API
   782  	// requests with the JSON null value. By default, fields with empty values are
   783  	// omitted from API requests. See
   784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   785  	NullFields []string `json:"-"`
   786  }
   787  
   788  func (s *GoogleCloudMlV1TrialParameter) MarshalJSON() ([]byte, error) {
   789  	type NoMethod GoogleCloudMlV1TrialParameter
   790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   791  }
   792  
   793  func (s *GoogleCloudMlV1TrialParameter) UnmarshalJSON(data []byte) error {
   794  	type NoMethod GoogleCloudMlV1TrialParameter
   795  	var s1 struct {
   796  		FloatValue gensupport.JSONFloat64 `json:"floatValue"`
   797  		*NoMethod
   798  	}
   799  	s1.NoMethod = (*NoMethod)(s)
   800  	if err := json.Unmarshal(data, &s1); err != nil {
   801  		return err
   802  	}
   803  	s.FloatValue = float64(s1.FloatValue)
   804  	return nil
   805  }
   806  
   807  // GoogleCloudMlV1__AcceleratorConfig: Represents a hardware accelerator
   808  // request config. Note that the AcceleratorConfig can be used in both Jobs and
   809  // Versions. Learn more about accelerators for training
   810  // (/ml-engine/docs/using-gpus) and accelerators for online prediction
   811  // (/ml-engine/docs/machine-types-online-prediction#gpus).
   812  type GoogleCloudMlV1__AcceleratorConfig struct {
   813  	// Count: The number of accelerators to attach to each machine running the job.
   814  	Count int64 `json:"count,omitempty,string"`
   815  	// Type: The type of accelerator to use.
   816  	//
   817  	// Possible values:
   818  	//   "ACCELERATOR_TYPE_UNSPECIFIED" - Unspecified accelerator type. Default to
   819  	// no GPU.
   820  	//   "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU.
   821  	//   "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU.
   822  	//   "NVIDIA_TESLA_V100" - Nvidia V100 GPU.
   823  	//   "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU.
   824  	//   "NVIDIA_TESLA_T4" - Nvidia T4 GPU.
   825  	//   "NVIDIA_TESLA_A100" - Nvidia A100 GPU.
   826  	//   "TPU_V2" - TPU v2.
   827  	//   "TPU_V3" - TPU v3.
   828  	//   "TPU_V2_POD" - TPU v2 POD.
   829  	//   "TPU_V3_POD" - TPU v3 POD.
   830  	//   "TPU_V4_POD" - TPU v4 POD.
   831  	Type string `json:"type,omitempty"`
   832  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
   833  	// include in API requests. By default, fields with empty or default values are
   834  	// omitted from API requests. See
   835  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   836  	// details.
   837  	ForceSendFields []string `json:"-"`
   838  	// NullFields is a list of field names (e.g. "Count") to include in API
   839  	// requests with the JSON null value. By default, fields with empty values are
   840  	// omitted from API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   842  	NullFields []string `json:"-"`
   843  }
   844  
   845  func (s *GoogleCloudMlV1__AcceleratorConfig) MarshalJSON() ([]byte, error) {
   846  	type NoMethod GoogleCloudMlV1__AcceleratorConfig
   847  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   848  }
   849  
   850  // GoogleCloudMlV1__AddTrialMeasurementRequest: The request message for the
   851  // AddTrialMeasurement service method.
   852  type GoogleCloudMlV1__AddTrialMeasurementRequest struct {
   853  	// Measurement: Required. The measurement to be added to a trial.
   854  	Measurement *GoogleCloudMlV1__Measurement `json:"measurement,omitempty"`
   855  	// ForceSendFields is a list of field names (e.g. "Measurement") to
   856  	// unconditionally include in API requests. By default, fields with empty or
   857  	// default values are omitted from API requests. See
   858  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   859  	// details.
   860  	ForceSendFields []string `json:"-"`
   861  	// NullFields is a list of field names (e.g. "Measurement") to include in API
   862  	// requests with the JSON null value. By default, fields with empty values are
   863  	// omitted from API requests. See
   864  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   865  	NullFields []string `json:"-"`
   866  }
   867  
   868  func (s *GoogleCloudMlV1__AddTrialMeasurementRequest) MarshalJSON() ([]byte, error) {
   869  	type NoMethod GoogleCloudMlV1__AddTrialMeasurementRequest
   870  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   871  }
   872  
   873  // GoogleCloudMlV1__AutoScaling: Options for automatically scaling a model.
   874  type GoogleCloudMlV1__AutoScaling struct {
   875  	// MaxNodes: The maximum number of nodes to scale this model under load. The
   876  	// actual value will depend on resource quota and availability.
   877  	MaxNodes int64 `json:"maxNodes,omitempty"`
   878  	// Metrics: MetricSpec contains the specifications to use to calculate the
   879  	// desired nodes count.
   880  	Metrics []*GoogleCloudMlV1__MetricSpec `json:"metrics,omitempty"`
   881  	// MinNodes: Optional. The minimum number of nodes to allocate for this model.
   882  	// These nodes are always up, starting from the time the model is deployed.
   883  	// Therefore, the cost of operating this model will be at least `rate` *
   884  	// `min_nodes` * number of hours since last billing cycle, where `rate` is the
   885  	// cost per node-hour as documented in the pricing guide
   886  	// (/ml-engine/docs/pricing), even if no predictions are performed. There is
   887  	// additional cost for each prediction performed. Unlike manual scaling, if the
   888  	// load gets too heavy for the nodes that are up, the service will
   889  	// automatically add nodes to handle the increased load as well as scale back
   890  	// as traffic drops, always maintaining at least `min_nodes`. You will be
   891  	// charged for the time in which additional nodes are used. If `min_nodes` is
   892  	// not specified and AutoScaling is used with a legacy (MLS1) machine type
   893  	// (/ml-engine/docs/machine-types-online-prediction), `min_nodes` defaults to
   894  	// 0, in which case, when traffic to a model stops (and after a cool-down
   895  	// period), nodes will be shut down and no charges will be incurred until
   896  	// traffic to the model resumes. If `min_nodes` is not specified and
   897  	// AutoScaling is used with a Compute Engine (N1) machine type
   898  	// (/ml-engine/docs/machine-types-online-prediction), `min_nodes` defaults to
   899  	// 1. `min_nodes` must be at least 1 for use with a Compute Engine machine
   900  	// type. You can set `min_nodes` when creating the model version, and you can
   901  	// also update `min_nodes` for an existing version: update_body.json: {
   902  	// 'autoScaling': { 'minNodes': 5 } } HTTP request: PATCH
   903  	// https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes
   904  	// -d @./update_body.json
   905  	MinNodes int64 `json:"minNodes,omitempty"`
   906  	// ForceSendFields is a list of field names (e.g. "MaxNodes") to
   907  	// unconditionally include in API requests. By default, fields with empty or
   908  	// default values are omitted from API requests. See
   909  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   910  	// details.
   911  	ForceSendFields []string `json:"-"`
   912  	// NullFields is a list of field names (e.g. "MaxNodes") to include in API
   913  	// requests with the JSON null value. By default, fields with empty values are
   914  	// omitted from API requests. See
   915  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   916  	NullFields []string `json:"-"`
   917  }
   918  
   919  func (s *GoogleCloudMlV1__AutoScaling) MarshalJSON() ([]byte, error) {
   920  	type NoMethod GoogleCloudMlV1__AutoScaling
   921  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   922  }
   923  
   924  // GoogleCloudMlV1__AutomatedStoppingConfig: Configuration for Automated Early
   925  // Stopping of Trials. If no implementation_config is set, automated early
   926  // stopping will not be run.
   927  type GoogleCloudMlV1__AutomatedStoppingConfig struct {
   928  	DecayCurveStoppingConfig      *GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig `json:"decayCurveStoppingConfig,omitempty"`
   929  	MedianAutomatedStoppingConfig *GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig     `json:"medianAutomatedStoppingConfig,omitempty"`
   930  	// ForceSendFields is a list of field names (e.g. "DecayCurveStoppingConfig")
   931  	// to unconditionally include in API requests. By default, fields with empty or
   932  	// default values are omitted from API requests. See
   933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   934  	// details.
   935  	ForceSendFields []string `json:"-"`
   936  	// NullFields is a list of field names (e.g. "DecayCurveStoppingConfig") to
   937  	// include in API requests with the JSON null value. By default, fields with
   938  	// empty values are omitted from API requests. See
   939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   940  	NullFields []string `json:"-"`
   941  }
   942  
   943  func (s *GoogleCloudMlV1__AutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
   944  	type NoMethod GoogleCloudMlV1__AutomatedStoppingConfig
   945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   946  }
   947  
   948  // GoogleCloudMlV1__BuiltInAlgorithmOutput: Represents output related to a
   949  // built-in algorithm Job.
   950  type GoogleCloudMlV1__BuiltInAlgorithmOutput struct {
   951  	// Framework: Framework on which the built-in algorithm was trained.
   952  	Framework string `json:"framework,omitempty"`
   953  	// ModelPath: The Cloud Storage path to the `model/` directory where the
   954  	// training job saves the trained model. Only set for successful jobs that
   955  	// don't use hyperparameter tuning.
   956  	ModelPath string `json:"modelPath,omitempty"`
   957  	// PythonVersion: Python version on which the built-in algorithm was trained.
   958  	PythonVersion string `json:"pythonVersion,omitempty"`
   959  	// RuntimeVersion: AI Platform runtime version on which the built-in algorithm
   960  	// was trained.
   961  	RuntimeVersion string `json:"runtimeVersion,omitempty"`
   962  	// ForceSendFields is a list of field names (e.g. "Framework") to
   963  	// unconditionally include in API requests. By default, fields with empty or
   964  	// default values are omitted from API requests. See
   965  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   966  	// details.
   967  	ForceSendFields []string `json:"-"`
   968  	// NullFields is a list of field names (e.g. "Framework") to include in API
   969  	// requests with the JSON null value. By default, fields with empty values are
   970  	// omitted from API requests. See
   971  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   972  	NullFields []string `json:"-"`
   973  }
   974  
   975  func (s *GoogleCloudMlV1__BuiltInAlgorithmOutput) MarshalJSON() ([]byte, error) {
   976  	type NoMethod GoogleCloudMlV1__BuiltInAlgorithmOutput
   977  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   978  }
   979  
   980  // GoogleCloudMlV1__CancelJobRequest: Request message for the CancelJob method.
   981  type GoogleCloudMlV1__CancelJobRequest struct {
   982  }
   983  
   984  type GoogleCloudMlV1__Capability struct {
   985  	// AvailableAccelerators: Available accelerators for the capability.
   986  	//
   987  	// Possible values:
   988  	//   "ACCELERATOR_TYPE_UNSPECIFIED" - Unspecified accelerator type. Default to
   989  	// no GPU.
   990  	//   "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU.
   991  	//   "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU.
   992  	//   "NVIDIA_TESLA_V100" - Nvidia V100 GPU.
   993  	//   "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU.
   994  	//   "NVIDIA_TESLA_T4" - Nvidia T4 GPU.
   995  	//   "NVIDIA_TESLA_A100" - Nvidia A100 GPU.
   996  	//   "TPU_V2" - TPU v2.
   997  	//   "TPU_V3" - TPU v3.
   998  	//   "TPU_V2_POD" - TPU v2 POD.
   999  	//   "TPU_V3_POD" - TPU v3 POD.
  1000  	//   "TPU_V4_POD" - TPU v4 POD.
  1001  	AvailableAccelerators []string `json:"availableAccelerators,omitempty"`
  1002  	// Possible values:
  1003  	//   "TYPE_UNSPECIFIED"
  1004  	//   "TRAINING"
  1005  	//   "BATCH_PREDICTION"
  1006  	//   "ONLINE_PREDICTION"
  1007  	Type string `json:"type,omitempty"`
  1008  	// ForceSendFields is a list of field names (e.g. "AvailableAccelerators") to
  1009  	// unconditionally include in API requests. By default, fields with empty or
  1010  	// default values are omitted from API requests. See
  1011  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1012  	// details.
  1013  	ForceSendFields []string `json:"-"`
  1014  	// NullFields is a list of field names (e.g. "AvailableAccelerators") to
  1015  	// include in API requests with the JSON null value. By default, fields with
  1016  	// empty values are omitted from API requests. See
  1017  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1018  	NullFields []string `json:"-"`
  1019  }
  1020  
  1021  func (s *GoogleCloudMlV1__Capability) MarshalJSON() ([]byte, error) {
  1022  	type NoMethod GoogleCloudMlV1__Capability
  1023  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1024  }
  1025  
  1026  // GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata: This message will be
  1027  // placed in the metadata field of a google.longrunning.Operation associated
  1028  // with a CheckTrialEarlyStoppingState request.
  1029  type GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata struct {
  1030  	// CreateTime: The time at which the operation was submitted.
  1031  	CreateTime string `json:"createTime,omitempty"`
  1032  	// Study: The name of the study that the trial belongs to.
  1033  	Study string `json:"study,omitempty"`
  1034  	// Trial: The trial name.
  1035  	Trial string `json:"trial,omitempty"`
  1036  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1037  	// unconditionally include in API requests. By default, fields with empty or
  1038  	// default values are omitted from API requests. See
  1039  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1040  	// details.
  1041  	ForceSendFields []string `json:"-"`
  1042  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1043  	// requests with the JSON null value. By default, fields with empty values are
  1044  	// omitted from API requests. See
  1045  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1046  	NullFields []string `json:"-"`
  1047  }
  1048  
  1049  func (s *GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata) MarshalJSON() ([]byte, error) {
  1050  	type NoMethod GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata
  1051  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1052  }
  1053  
  1054  // GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest: The request message
  1055  // for the CheckTrialEarlyStoppingState service method.
  1056  type GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest struct {
  1057  }
  1058  
  1059  // GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse: The message will be
  1060  // placed in the response field of a completed google.longrunning.Operation
  1061  // associated with a CheckTrialEarlyStoppingState request.
  1062  type GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse struct {
  1063  	// EndTime: The time at which operation processing completed.
  1064  	EndTime string `json:"endTime,omitempty"`
  1065  	// ShouldStop: True if the Trial should stop.
  1066  	ShouldStop bool `json:"shouldStop,omitempty"`
  1067  	// StartTime: The time at which the operation was started.
  1068  	StartTime string `json:"startTime,omitempty"`
  1069  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1070  	// include in API requests. By default, fields with empty or default values are
  1071  	// omitted from API requests. See
  1072  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1073  	// details.
  1074  	ForceSendFields []string `json:"-"`
  1075  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1076  	// requests with the JSON null value. By default, fields with empty values are
  1077  	// omitted from API requests. See
  1078  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1079  	NullFields []string `json:"-"`
  1080  }
  1081  
  1082  func (s *GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse) MarshalJSON() ([]byte, error) {
  1083  	type NoMethod GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse
  1084  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1085  }
  1086  
  1087  // GoogleCloudMlV1__CompleteTrialRequest: The request message for the
  1088  // CompleteTrial service method.
  1089  type GoogleCloudMlV1__CompleteTrialRequest struct {
  1090  	// FinalMeasurement: Optional. If provided, it will be used as the completed
  1091  	// trial's final_measurement; Otherwise, the service will auto-select a
  1092  	// previously reported measurement as the final-measurement
  1093  	FinalMeasurement *GoogleCloudMlV1__Measurement `json:"finalMeasurement,omitempty"`
  1094  	// InfeasibleReason: Optional. A human readable reason why the trial was
  1095  	// infeasible. This should only be provided if `trial_infeasible` is true.
  1096  	InfeasibleReason string `json:"infeasibleReason,omitempty"`
  1097  	// TrialInfeasible: Optional. True if the trial cannot be run with the given
  1098  	// Parameter, and final_measurement will be ignored.
  1099  	TrialInfeasible bool `json:"trialInfeasible,omitempty"`
  1100  	// ForceSendFields is a list of field names (e.g. "FinalMeasurement") to
  1101  	// unconditionally include in API requests. By default, fields with empty or
  1102  	// default values are omitted from API requests. See
  1103  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1104  	// details.
  1105  	ForceSendFields []string `json:"-"`
  1106  	// NullFields is a list of field names (e.g. "FinalMeasurement") to include in
  1107  	// API requests with the JSON null value. By default, fields with empty values
  1108  	// are omitted from API requests. See
  1109  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1110  	NullFields []string `json:"-"`
  1111  }
  1112  
  1113  func (s *GoogleCloudMlV1__CompleteTrialRequest) MarshalJSON() ([]byte, error) {
  1114  	type NoMethod GoogleCloudMlV1__CompleteTrialRequest
  1115  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1116  }
  1117  
  1118  type GoogleCloudMlV1__Config struct {
  1119  	// TpuServiceAccount: The service account Cloud ML uses to run on TPU node.
  1120  	TpuServiceAccount string `json:"tpuServiceAccount,omitempty"`
  1121  	// ForceSendFields is a list of field names (e.g. "TpuServiceAccount") to
  1122  	// unconditionally include in API requests. By default, fields with empty or
  1123  	// default values are omitted from API requests. See
  1124  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1125  	// details.
  1126  	ForceSendFields []string `json:"-"`
  1127  	// NullFields is a list of field names (e.g. "TpuServiceAccount") to include in
  1128  	// API requests with the JSON null value. By default, fields with empty values
  1129  	// are omitted from API requests. See
  1130  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1131  	NullFields []string `json:"-"`
  1132  }
  1133  
  1134  func (s *GoogleCloudMlV1__Config) MarshalJSON() ([]byte, error) {
  1135  	type NoMethod GoogleCloudMlV1__Config
  1136  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1137  }
  1138  
  1139  // GoogleCloudMlV1__ContainerPort: Represents a network port in a single
  1140  // container. This message is a subset of the Kubernetes ContainerPort v1 core
  1141  // specification
  1142  // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core).
  1143  type GoogleCloudMlV1__ContainerPort struct {
  1144  	// ContainerPort: Number of the port to expose on the container. This must be a
  1145  	// valid port number: 0 < PORT_NUMBER < 65536.
  1146  	ContainerPort int64 `json:"containerPort,omitempty"`
  1147  	// ForceSendFields is a list of field names (e.g. "ContainerPort") 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. "ContainerPort") 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 *GoogleCloudMlV1__ContainerPort) MarshalJSON() ([]byte, error) {
  1161  	type NoMethod GoogleCloudMlV1__ContainerPort
  1162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1163  }
  1164  
  1165  // GoogleCloudMlV1__ContainerSpec: Specification of a custom container for
  1166  // serving predictions. This message is a subset of the Kubernetes Container v1
  1167  // core specification
  1168  // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
  1169  type GoogleCloudMlV1__ContainerSpec struct {
  1170  	// Args: Immutable. Specifies arguments for the command that runs when the
  1171  	// container starts. This overrides the container's `CMD`
  1172  	// (https://docs.docker.com/engine/reference/builder/#cmd). Specify this field
  1173  	// as an array of executable and arguments, similar to a Docker `CMD`'s
  1174  	// "default parameters" form. If you don't specify this field but do specify
  1175  	// the command field, then the command from the `command` field runs without
  1176  	// any additional arguments. See the Kubernetes documentation about how the
  1177  	// `command` and `args` fields interact with a container's `ENTRYPOINT` and
  1178  	// `CMD`
  1179  	// (https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes).
  1180  	// If you don't specify this field and don't specify the `commmand` field, then
  1181  	// the container's `ENTRYPOINT`
  1182  	// (https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine
  1183  	// what runs based on their default behavior. See the Docker documentation
  1184  	// about how `CMD` and `ENTRYPOINT` interact
  1185  	// (https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact).
  1186  	// In this field, you can reference environment variables set by AI Platform
  1187  	// Prediction
  1188  	// (/ai-platform/prediction/docs/custom-container-requirements#aip-variables)
  1189  	// and environment variables set in the env field. You cannot reference
  1190  	// environment variables set in the Docker image. In order for environment
  1191  	// variables to be expanded, reference them by using the following syntax: $(
  1192  	// VARIABLE_NAME) Note that this differs from Bash variable expansion, which
  1193  	// does not use parentheses. If a variable cannot be resolved, the reference in
  1194  	// the input string is used unchanged. To avoid variable expansion, you can
  1195  	// escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field
  1196  	// corresponds to the `args` field of the Kubernetes Containers v1 core API
  1197  	// (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
  1198  	Args []string `json:"args,omitempty"`
  1199  	// Command: Immutable. Specifies the command that runs when the container
  1200  	// starts. This overrides the container's `ENTRYPOINT`
  1201  	// (https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this
  1202  	// field as an array of executable and arguments, similar to a Docker
  1203  	// `ENTRYPOINT`'s "exec" form, not its "shell" form. If you do not specify this
  1204  	// field, then the container's `ENTRYPOINT` runs, in conjunction with the args
  1205  	// field or the container's `CMD`
  1206  	// (https://docs.docker.com/engine/reference/builder/#cmd), if either exists.
  1207  	// If this field is not specified and the container does not have an
  1208  	// `ENTRYPOINT`, then refer to the Docker documentation about how `CMD` and
  1209  	// `ENTRYPOINT` interact
  1210  	// (https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact).
  1211  	// If you specify this field, then you can also specify the `args` field to
  1212  	// provide additional arguments for this command. However, if you specify this
  1213  	// field, then the container's `CMD` is ignored. See the Kubernetes
  1214  	// documentation about how the `command` and `args` fields interact with a
  1215  	// container's `ENTRYPOINT` and `CMD`
  1216  	// (https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes).
  1217  	// In this field, you can reference environment variables set by AI Platform
  1218  	// Prediction
  1219  	// (/ai-platform/prediction/docs/custom-container-requirements#aip-variables)
  1220  	// and environment variables set in the env field. You cannot reference
  1221  	// environment variables set in the Docker image. In order for environment
  1222  	// variables to be expanded, reference them by using the following syntax: $(
  1223  	// VARIABLE_NAME) Note that this differs from Bash variable expansion, which
  1224  	// does not use parentheses. If a variable cannot be resolved, the reference in
  1225  	// the input string is used unchanged. To avoid variable expansion, you can
  1226  	// escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field
  1227  	// corresponds to the `command` field of the Kubernetes Containers v1 core API
  1228  	// (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
  1229  	Command []string `json:"command,omitempty"`
  1230  	// Env: Immutable. List of environment variables to set in the container. After
  1231  	// the container starts running, code running in the container can read these
  1232  	// environment variables. Additionally, the command and args fields can
  1233  	// reference these variables. Later entries in this list can also reference
  1234  	// earlier entries. For example, the following example sets the variable
  1235  	// `VAR_2` to have the value `foo bar`: ```json [ { "name": "VAR_1", "value":
  1236  	// "foo" }, { "name": "VAR_2", "value": "$(VAR_1) bar" } ] ``` If you switch
  1237  	// the order of the variables in the example, then the expansion does not
  1238  	// occur. This field corresponds to the `env` field of the Kubernetes
  1239  	// Containers v1 core API
  1240  	// (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
  1241  	Env []*GoogleCloudMlV1__EnvVar `json:"env,omitempty"`
  1242  	// Image: URI of the Docker image to be used as the custom container for
  1243  	// serving predictions. This URI must identify an image in Artifact Registry
  1244  	// (/artifact-registry/docs/overview) and begin with the hostname
  1245  	// `{REGION}-docker.pkg.dev`, where `{REGION}` is replaced by the region that
  1246  	// matches AI Platform Prediction regional endpoint
  1247  	// (/ai-platform/prediction/docs/regional-endpoints) that you are using. For
  1248  	// example, if you are using the `us-central1-ml.googleapis.com` endpoint, then
  1249  	// this URI must begin with `us-central1-docker.pkg.dev`. To use a custom
  1250  	// container, the AI Platform Google-managed service account
  1251  	// (/ai-platform/prediction/docs/custom-service-account#default) must have
  1252  	// permission to pull (read) the Docker image at this URI. The AI Platform
  1253  	// Google-managed service account has the following format:
  1254  	// `service-{PROJECT_NUMBER}@cloud-ml.google.com.iam.gserviceaccount.com`
  1255  	// {PROJECT_NUMBER} is replaced by your Google Cloud project number. By
  1256  	// default, this service account has necessary permissions to pull an Artifact
  1257  	// Registry image in the same Google Cloud project where you are using AI
  1258  	// Platform Prediction. In this case, no configuration is necessary. If you
  1259  	// want to use an image from a different Google Cloud project, learn how to
  1260  	// grant the Artifact Registry Reader (roles/artifactregistry.reader) role for
  1261  	// a repository (/artifact-registry/docs/access-control#grant-repo) to your
  1262  	// projet's AI Platform Google-managed service account. To learn about the
  1263  	// requirements for the Docker image itself, read Custom container requirements
  1264  	// (/ai-platform/prediction/docs/custom-container-requirements).
  1265  	Image string `json:"image,omitempty"`
  1266  	// Ports: Immutable. List of ports to expose from the container. AI Platform
  1267  	// Prediction sends any prediction requests that it receives to the first port
  1268  	// on this list. AI Platform Prediction also sends liveness and health checks
  1269  	// (/ai-platform/prediction/docs/custom-container-requirements#health) to this
  1270  	// port. If you do not specify this field, it defaults to following value:
  1271  	// ```json [ { "containerPort": 8080 } ] ``` AI Platform Prediction does not
  1272  	// use ports other than the first one listed. This field corresponds to the
  1273  	// `ports` field of the Kubernetes Containers v1 core API
  1274  	// (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
  1275  	Ports []*GoogleCloudMlV1__ContainerPort `json:"ports,omitempty"`
  1276  	// ForceSendFields is a list of field names (e.g. "Args") to unconditionally
  1277  	// include in API requests. By default, fields with empty or default values are
  1278  	// omitted from API requests. See
  1279  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1280  	// details.
  1281  	ForceSendFields []string `json:"-"`
  1282  	// NullFields is a list of field names (e.g. "Args") to include in API requests
  1283  	// with the JSON null value. By default, fields with empty values are omitted
  1284  	// from API requests. See
  1285  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1286  	NullFields []string `json:"-"`
  1287  }
  1288  
  1289  func (s *GoogleCloudMlV1__ContainerSpec) MarshalJSON() ([]byte, error) {
  1290  	type NoMethod GoogleCloudMlV1__ContainerSpec
  1291  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1292  }
  1293  
  1294  // GoogleCloudMlV1__DiskConfig: Represents the config of disk options.
  1295  type GoogleCloudMlV1__DiskConfig struct {
  1296  	// BootDiskSizeGb: Size in GB of the boot disk (default is 100GB).
  1297  	BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
  1298  	// BootDiskType: Type of the boot disk (default is "pd-ssd"). Valid values:
  1299  	// "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent
  1300  	// Disk Hard Disk Drive).
  1301  	BootDiskType string `json:"bootDiskType,omitempty"`
  1302  	// ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
  1303  	// unconditionally include in API requests. By default, fields with empty or
  1304  	// default values are omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1306  	// details.
  1307  	ForceSendFields []string `json:"-"`
  1308  	// NullFields is a list of field names (e.g. "BootDiskSizeGb") to include in
  1309  	// API requests with the JSON null value. By default, fields with empty values
  1310  	// are omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1312  	NullFields []string `json:"-"`
  1313  }
  1314  
  1315  func (s *GoogleCloudMlV1__DiskConfig) MarshalJSON() ([]byte, error) {
  1316  	type NoMethod GoogleCloudMlV1__DiskConfig
  1317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1318  }
  1319  
  1320  // GoogleCloudMlV1__EncryptionConfig: Represents a custom encryption key
  1321  // configuration that can be applied to a resource.
  1322  type GoogleCloudMlV1__EncryptionConfig struct {
  1323  	// KmsKeyName: The Cloud KMS resource identifier of the customer-managed
  1324  	// encryption key used to protect a resource, such as a training job. It has
  1325  	// the following format:
  1326  	// `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys
  1327  	// /{KEY_NAME}`
  1328  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1329  	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
  1330  	// unconditionally include in API requests. By default, fields with empty or
  1331  	// default values are omitted from API requests. See
  1332  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1333  	// details.
  1334  	ForceSendFields []string `json:"-"`
  1335  	// NullFields is a list of field names (e.g. "KmsKeyName") to include in API
  1336  	// requests with the JSON null value. By default, fields with empty values are
  1337  	// omitted from API requests. See
  1338  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1339  	NullFields []string `json:"-"`
  1340  }
  1341  
  1342  func (s *GoogleCloudMlV1__EncryptionConfig) MarshalJSON() ([]byte, error) {
  1343  	type NoMethod GoogleCloudMlV1__EncryptionConfig
  1344  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1345  }
  1346  
  1347  // GoogleCloudMlV1__EnvVar: Represents an environment variable to be made
  1348  // available in a container. This message is a subset of the Kubernetes EnvVar
  1349  // v1 core specification
  1350  // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core).
  1351  type GoogleCloudMlV1__EnvVar struct {
  1352  	// Name: Name of the environment variable. Must be a valid C identifier
  1353  	// (https://github.com/kubernetes/kubernetes/blob/v1.18.8/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L258)
  1354  	// and must not begin with the prefix `AIP_`.
  1355  	Name string `json:"name,omitempty"`
  1356  	// Value: Value of the environment variable. Defaults to an empty string. In
  1357  	// this field, you can reference environment variables set by AI Platform
  1358  	// Prediction
  1359  	// (/ai-platform/prediction/docs/custom-container-requirements#aip-variables)
  1360  	// and environment variables set earlier in the same env field as where this
  1361  	// message occurs. You cannot reference environment variables set in the Docker
  1362  	// image. In order for environment variables to be expanded, reference them by
  1363  	// using the following syntax: $(VARIABLE_NAME) Note that this differs from
  1364  	// Bash variable expansion, which does not use parentheses. If a variable
  1365  	// cannot be resolved, the reference in the input string is used unchanged. To
  1366  	// avoid variable expansion, you can escape this syntax with `$$`; for example:
  1367  	// $$(VARIABLE_NAME)
  1368  	Value string `json:"value,omitempty"`
  1369  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1370  	// include in API requests. By default, fields with empty or default values are
  1371  	// omitted from API requests. See
  1372  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1373  	// details.
  1374  	ForceSendFields []string `json:"-"`
  1375  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1376  	// with the JSON null value. By default, fields with empty values are omitted
  1377  	// from API requests. See
  1378  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1379  	NullFields []string `json:"-"`
  1380  }
  1381  
  1382  func (s *GoogleCloudMlV1__EnvVar) MarshalJSON() ([]byte, error) {
  1383  	type NoMethod GoogleCloudMlV1__EnvVar
  1384  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1385  }
  1386  
  1387  // GoogleCloudMlV1__ExplainRequest: Request for explanations to be issued
  1388  // against a trained model.
  1389  type GoogleCloudMlV1__ExplainRequest struct {
  1390  	// HttpBody: Required. The explanation request body.
  1391  	HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"`
  1392  	// ForceSendFields is a list of field names (e.g. "HttpBody") to
  1393  	// unconditionally include in API requests. By default, fields with empty or
  1394  	// default values are omitted from API requests. See
  1395  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1396  	// details.
  1397  	ForceSendFields []string `json:"-"`
  1398  	// NullFields is a list of field names (e.g. "HttpBody") to include in API
  1399  	// requests with the JSON null value. By default, fields with empty values are
  1400  	// omitted from API requests. See
  1401  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1402  	NullFields []string `json:"-"`
  1403  }
  1404  
  1405  func (s *GoogleCloudMlV1__ExplainRequest) MarshalJSON() ([]byte, error) {
  1406  	type NoMethod GoogleCloudMlV1__ExplainRequest
  1407  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1408  }
  1409  
  1410  // GoogleCloudMlV1__ExplanationConfig: Message holding configuration options
  1411  // for explaining model predictions. There are three feature attribution
  1412  // methods supported for TensorFlow models: integrated gradients, sampled
  1413  // Shapley, and XRAI. Learn more about feature attributions.
  1414  // (/ai-platform/prediction/docs/ai-explanations/overview)
  1415  type GoogleCloudMlV1__ExplanationConfig struct {
  1416  	// IntegratedGradientsAttribution: Attributes credit by computing the
  1417  	// Aumann-Shapley value taking advantage of the model's fully differentiable
  1418  	// structure. Refer to this paper for more details:
  1419  	// https://arxiv.org/abs/1703.01365
  1420  	IntegratedGradientsAttribution *GoogleCloudMlV1__IntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"`
  1421  	// SampledShapleyAttribution: An attribution method that approximates Shapley
  1422  	// values for features that contribute to the label being predicted. A sampling
  1423  	// strategy is used to approximate the value rather than considering all
  1424  	// subsets of features.
  1425  	SampledShapleyAttribution *GoogleCloudMlV1__SampledShapleyAttribution `json:"sampledShapleyAttribution,omitempty"`
  1426  	// XraiAttribution: Attributes credit by computing the XRAI taking advantage of
  1427  	// the model's fully differentiable structure. Refer to this paper for more
  1428  	// details: https://arxiv.org/abs/1906.02825 Currently only implemented for
  1429  	// models with natural image inputs.
  1430  	XraiAttribution *GoogleCloudMlV1__XraiAttribution `json:"xraiAttribution,omitempty"`
  1431  	// ForceSendFields is a list of field names (e.g.
  1432  	// "IntegratedGradientsAttribution") to unconditionally include in API
  1433  	// requests. By default, fields with empty or default values are omitted from
  1434  	// API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1436  	// details.
  1437  	ForceSendFields []string `json:"-"`
  1438  	// NullFields is a list of field names (e.g. "IntegratedGradientsAttribution")
  1439  	// to include in API requests with the JSON null value. By default, fields with
  1440  	// empty values are omitted from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1442  	NullFields []string `json:"-"`
  1443  }
  1444  
  1445  func (s *GoogleCloudMlV1__ExplanationConfig) MarshalJSON() ([]byte, error) {
  1446  	type NoMethod GoogleCloudMlV1__ExplanationConfig
  1447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  // GoogleCloudMlV1__GetConfigResponse: Returns service account information
  1451  // associated with a project.
  1452  type GoogleCloudMlV1__GetConfigResponse struct {
  1453  	Config *GoogleCloudMlV1__Config `json:"config,omitempty"`
  1454  	// ServiceAccount: The service account Cloud ML uses to access resources in the
  1455  	// project.
  1456  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1457  	// ServiceAccountProject: The project number for `service_account`.
  1458  	ServiceAccountProject int64 `json:"serviceAccountProject,omitempty,string"`
  1459  
  1460  	// ServerResponse contains the HTTP response code and headers from the server.
  1461  	googleapi.ServerResponse `json:"-"`
  1462  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
  1463  	// include in API requests. By default, fields with empty or default values are
  1464  	// omitted from API requests. See
  1465  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1466  	// details.
  1467  	ForceSendFields []string `json:"-"`
  1468  	// NullFields is a list of field names (e.g. "Config") to include in API
  1469  	// requests with the JSON null value. By default, fields with empty values are
  1470  	// omitted from API requests. See
  1471  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1472  	NullFields []string `json:"-"`
  1473  }
  1474  
  1475  func (s *GoogleCloudMlV1__GetConfigResponse) MarshalJSON() ([]byte, error) {
  1476  	type NoMethod GoogleCloudMlV1__GetConfigResponse
  1477  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1478  }
  1479  
  1480  // GoogleCloudMlV1__HyperparameterOutput: Represents the result of a single
  1481  // hyperparameter tuning trial from a training job. The TrainingOutput object
  1482  // that is returned on successful completion of a training job with
  1483  // hyperparameter tuning includes a list of HyperparameterOutput objects, one
  1484  // for each successful trial.
  1485  type GoogleCloudMlV1__HyperparameterOutput struct {
  1486  	// AllMetrics: All recorded object metrics for this trial. This field is not
  1487  	// currently populated.
  1488  	AllMetrics []*GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"allMetrics,omitempty"`
  1489  	// BuiltInAlgorithmOutput: Details related to built-in algorithms jobs. Only
  1490  	// set for trials of built-in algorithms jobs that have succeeded.
  1491  	BuiltInAlgorithmOutput *GoogleCloudMlV1__BuiltInAlgorithmOutput `json:"builtInAlgorithmOutput,omitempty"`
  1492  	// EndTime: Output only. End time for the trial.
  1493  	EndTime string `json:"endTime,omitempty"`
  1494  	// FinalMetric: The final objective metric seen for this trial.
  1495  	FinalMetric *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"finalMetric,omitempty"`
  1496  	// Hyperparameters: The hyperparameters given to this trial.
  1497  	Hyperparameters map[string]string `json:"hyperparameters,omitempty"`
  1498  	// IsTrialStoppedEarly: True if the trial is stopped early.
  1499  	IsTrialStoppedEarly bool `json:"isTrialStoppedEarly,omitempty"`
  1500  	// StartTime: Output only. Start time for the trial.
  1501  	StartTime string `json:"startTime,omitempty"`
  1502  	// State: Output only. The detailed state of the trial.
  1503  	//
  1504  	// Possible values:
  1505  	//   "STATE_UNSPECIFIED" - The job state is unspecified.
  1506  	//   "QUEUED" - The job has been just created and processing has not yet begun.
  1507  	//   "PREPARING" - The service is preparing to run the job.
  1508  	//   "RUNNING" - The job is in progress.
  1509  	//   "SUCCEEDED" - The job completed successfully.
  1510  	//   "FAILED" - The job failed. `error_message` should contain the details of
  1511  	// the failure.
  1512  	//   "CANCELLING" - The job is being cancelled. `error_message` should describe
  1513  	// the reason for the cancellation.
  1514  	//   "CANCELLED" - The job has been cancelled. `error_message` should describe
  1515  	// the reason for the cancellation.
  1516  	State string `json:"state,omitempty"`
  1517  	// TrialId: The trial id for these results.
  1518  	TrialId string `json:"trialId,omitempty"`
  1519  	// WebAccessUris: URIs for accessing interactive shells
  1520  	// (https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell)
  1521  	// (one URI for each training node). Only available if this trial is part of a
  1522  	// hyperparameter tuning job and the job's training_input.enable_web_access is
  1523  	// `true`. The keys are names of each node in the training job; for example,
  1524  	// `master-replica-0` for the master node, `worker-replica-0` for the first
  1525  	// worker, and `ps-replica-0` for the first parameter server. The values are
  1526  	// the URIs for each node's interactive shell.
  1527  	WebAccessUris map[string]string `json:"webAccessUris,omitempty"`
  1528  	// ForceSendFields is a list of field names (e.g. "AllMetrics") to
  1529  	// unconditionally include in API requests. By default, fields with empty or
  1530  	// default values are omitted from API requests. See
  1531  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1532  	// details.
  1533  	ForceSendFields []string `json:"-"`
  1534  	// NullFields is a list of field names (e.g. "AllMetrics") to include in API
  1535  	// requests with the JSON null value. By default, fields with empty values are
  1536  	// omitted from API requests. See
  1537  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1538  	NullFields []string `json:"-"`
  1539  }
  1540  
  1541  func (s *GoogleCloudMlV1__HyperparameterOutput) MarshalJSON() ([]byte, error) {
  1542  	type NoMethod GoogleCloudMlV1__HyperparameterOutput
  1543  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1544  }
  1545  
  1546  // GoogleCloudMlV1__HyperparameterSpec: Represents a set of hyperparameters to
  1547  // optimize.
  1548  type GoogleCloudMlV1__HyperparameterSpec struct {
  1549  	// Algorithm: Optional. The search algorithm specified for the hyperparameter
  1550  	// tuning job. Uses the default AI Platform hyperparameter tuning algorithm if
  1551  	// unspecified.
  1552  	//
  1553  	// Possible values:
  1554  	//   "ALGORITHM_UNSPECIFIED" - The default algorithm used by the hyperparameter
  1555  	// tuning service. This is a Bayesian optimization algorithm.
  1556  	//   "GRID_SEARCH" - Simple grid search within the feasible space. To use grid
  1557  	// search, all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
  1558  	//   "RANDOM_SEARCH" - Simple random search within the feasible space.
  1559  	Algorithm string `json:"algorithm,omitempty"`
  1560  	// EnableTrialEarlyStopping: Optional. Indicates if the hyperparameter tuning
  1561  	// job enables auto trial early stopping.
  1562  	EnableTrialEarlyStopping bool `json:"enableTrialEarlyStopping,omitempty"`
  1563  	// Goal: Required. The type of goal to use for tuning. Available types are
  1564  	// `MAXIMIZE` and `MINIMIZE`. Defaults to `MAXIMIZE`.
  1565  	//
  1566  	// Possible values:
  1567  	//   "GOAL_TYPE_UNSPECIFIED" - Goal Type will default to maximize.
  1568  	//   "MAXIMIZE" - Maximize the goal metric.
  1569  	//   "MINIMIZE" - Minimize the goal metric.
  1570  	Goal string `json:"goal,omitempty"`
  1571  	// HyperparameterMetricTag: Optional. The TensorFlow summary tag name to use
  1572  	// for optimizing trials. For current versions of TensorFlow, this tag name
  1573  	// should exactly match what is shown in TensorBoard, including all scopes. For
  1574  	// versions of TensorFlow prior to 0.12, this should be only the tag passed to
  1575  	// tf.Summary. By default, "training/hptuning/metric" will be used.
  1576  	HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"`
  1577  	// MaxFailedTrials: Optional. The number of failed trials that need to be seen
  1578  	// before failing the hyperparameter tuning job. You can specify this field to
  1579  	// override the default failing criteria for AI Platform hyperparameter tuning
  1580  	// jobs. Defaults to zero, which means the service decides when a
  1581  	// hyperparameter job should fail.
  1582  	MaxFailedTrials int64 `json:"maxFailedTrials,omitempty"`
  1583  	// MaxParallelTrials: Optional. The number of training trials to run
  1584  	// concurrently. You can reduce the time it takes to perform hyperparameter
  1585  	// tuning by adding trials in parallel. However, each trail only benefits from
  1586  	// the information gained in completed trials. That means that a trial does not
  1587  	// get access to the results of trials running at the same time, which could
  1588  	// reduce the quality of the overall optimization. Each trial will use the same
  1589  	// scale tier and machine types. Defaults to one.
  1590  	MaxParallelTrials int64 `json:"maxParallelTrials,omitempty"`
  1591  	// MaxTrials: Optional. How many training trials should be attempted to
  1592  	// optimize the specified hyperparameters. Defaults to one.
  1593  	MaxTrials int64 `json:"maxTrials,omitempty"`
  1594  	// Params: Required. The set of parameters to tune.
  1595  	Params []*GoogleCloudMlV1__ParameterSpec `json:"params,omitempty"`
  1596  	// ResumePreviousJobId: Optional. The prior hyperparameter tuning job id that
  1597  	// users hope to continue with. The job id will be used to find the
  1598  	// corresponding vizier study guid and resume the study.
  1599  	ResumePreviousJobId string `json:"resumePreviousJobId,omitempty"`
  1600  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
  1601  	// unconditionally include in API requests. By default, fields with empty or
  1602  	// default values are omitted from API requests. See
  1603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1604  	// details.
  1605  	ForceSendFields []string `json:"-"`
  1606  	// NullFields is a list of field names (e.g. "Algorithm") to include in API
  1607  	// requests with the JSON null value. By default, fields with empty values are
  1608  	// omitted from API requests. See
  1609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1610  	NullFields []string `json:"-"`
  1611  }
  1612  
  1613  func (s *GoogleCloudMlV1__HyperparameterSpec) MarshalJSON() ([]byte, error) {
  1614  	type NoMethod GoogleCloudMlV1__HyperparameterSpec
  1615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1616  }
  1617  
  1618  // GoogleCloudMlV1__IntegratedGradientsAttribution: Attributes credit by
  1619  // computing the Aumann-Shapley value taking advantage of the model's fully
  1620  // differentiable structure. Refer to this paper for more details:
  1621  // https://arxiv.org/abs/1703.01365
  1622  type GoogleCloudMlV1__IntegratedGradientsAttribution struct {
  1623  	// NumIntegralSteps: Number of steps for approximating the path integral. A
  1624  	// good value to start is 50 and gradually increase until the sum to diff
  1625  	// property is met within the desired error range.
  1626  	NumIntegralSteps int64 `json:"numIntegralSteps,omitempty"`
  1627  	// ForceSendFields is a list of field names (e.g. "NumIntegralSteps") to
  1628  	// unconditionally include in API requests. By default, fields with empty or
  1629  	// default values are omitted from API requests. See
  1630  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1631  	// details.
  1632  	ForceSendFields []string `json:"-"`
  1633  	// NullFields is a list of field names (e.g. "NumIntegralSteps") to include in
  1634  	// API requests with the JSON null value. By default, fields with empty values
  1635  	// are omitted from API requests. See
  1636  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1637  	NullFields []string `json:"-"`
  1638  }
  1639  
  1640  func (s *GoogleCloudMlV1__IntegratedGradientsAttribution) MarshalJSON() ([]byte, error) {
  1641  	type NoMethod GoogleCloudMlV1__IntegratedGradientsAttribution
  1642  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1643  }
  1644  
  1645  // GoogleCloudMlV1__Job: Represents a training or prediction job.
  1646  type GoogleCloudMlV1__Job struct {
  1647  	// CreateTime: Output only. When the job was created.
  1648  	CreateTime string `json:"createTime,omitempty"`
  1649  	// EndTime: Output only. When the job processing was completed.
  1650  	EndTime string `json:"endTime,omitempty"`
  1651  	// ErrorMessage: Output only. The details of a failure or a cancellation.
  1652  	ErrorMessage string `json:"errorMessage,omitempty"`
  1653  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1654  	// prevent simultaneous updates of a job from overwriting each other. It is
  1655  	// strongly suggested that systems make use of the `etag` in the
  1656  	// read-modify-write cycle to perform job updates in order to avoid race
  1657  	// conditions: An `etag` is returned in the response to `GetJob`, and systems
  1658  	// are expected to put that etag in the request to `UpdateJob` to ensure that
  1659  	// their change will be applied to the same version of the job.
  1660  	Etag string `json:"etag,omitempty"`
  1661  	// JobId: Required. The user-specified id of the job.
  1662  	JobId string `json:"jobId,omitempty"`
  1663  	// JobPosition: Output only. It's only effect when the job is in QUEUED state.
  1664  	// If it's positive, it indicates the job's position in the job scheduler. It's
  1665  	// 0 when the job is already scheduled.
  1666  	JobPosition int64 `json:"jobPosition,omitempty,string"`
  1667  	// Labels: Optional. One or more labels that you can add, to organize your
  1668  	// jobs. Each label is a key-value pair, where both the key and the value are
  1669  	// arbitrary strings that you supply. For more information, see the
  1670  	// documentation on using labels.
  1671  	Labels map[string]string `json:"labels,omitempty"`
  1672  	// PredictionInput: Input parameters to create a prediction job.
  1673  	PredictionInput *GoogleCloudMlV1__PredictionInput `json:"predictionInput,omitempty"`
  1674  	// PredictionOutput: The current prediction job result.
  1675  	PredictionOutput *GoogleCloudMlV1__PredictionOutput `json:"predictionOutput,omitempty"`
  1676  	// StartTime: Output only. When the job processing was started.
  1677  	StartTime string `json:"startTime,omitempty"`
  1678  	// State: Output only. The detailed state of a job.
  1679  	//
  1680  	// Possible values:
  1681  	//   "STATE_UNSPECIFIED" - The job state is unspecified.
  1682  	//   "QUEUED" - The job has been just created and processing has not yet begun.
  1683  	//   "PREPARING" - The service is preparing to run the job.
  1684  	//   "RUNNING" - The job is in progress.
  1685  	//   "SUCCEEDED" - The job completed successfully.
  1686  	//   "FAILED" - The job failed. `error_message` should contain the details of
  1687  	// the failure.
  1688  	//   "CANCELLING" - The job is being cancelled. `error_message` should describe
  1689  	// the reason for the cancellation.
  1690  	//   "CANCELLED" - The job has been cancelled. `error_message` should describe
  1691  	// the reason for the cancellation.
  1692  	State string `json:"state,omitempty"`
  1693  	// TrainingInput: Input parameters to create a training job.
  1694  	TrainingInput *GoogleCloudMlV1__TrainingInput `json:"trainingInput,omitempty"`
  1695  	// TrainingOutput: The current training job result.
  1696  	TrainingOutput *GoogleCloudMlV1__TrainingOutput `json:"trainingOutput,omitempty"`
  1697  
  1698  	// ServerResponse contains the HTTP response code and headers from the server.
  1699  	googleapi.ServerResponse `json:"-"`
  1700  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1701  	// unconditionally include in API requests. By default, fields with empty or
  1702  	// default values are omitted from API requests. See
  1703  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1704  	// details.
  1705  	ForceSendFields []string `json:"-"`
  1706  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1707  	// requests with the JSON null value. By default, fields with empty values are
  1708  	// omitted from API requests. See
  1709  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1710  	NullFields []string `json:"-"`
  1711  }
  1712  
  1713  func (s *GoogleCloudMlV1__Job) MarshalJSON() ([]byte, error) {
  1714  	type NoMethod GoogleCloudMlV1__Job
  1715  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1716  }
  1717  
  1718  // GoogleCloudMlV1__ListJobsResponse: Response message for the ListJobs method.
  1719  type GoogleCloudMlV1__ListJobsResponse struct {
  1720  	// Jobs: The list of jobs.
  1721  	Jobs []*GoogleCloudMlV1__Job `json:"jobs,omitempty"`
  1722  	// NextPageToken: Optional. Pass this token as the `page_token` field of the
  1723  	// request for a subsequent call.
  1724  	NextPageToken string `json:"nextPageToken,omitempty"`
  1725  
  1726  	// ServerResponse contains the HTTP response code and headers from the server.
  1727  	googleapi.ServerResponse `json:"-"`
  1728  	// ForceSendFields is a list of field names (e.g. "Jobs") to unconditionally
  1729  	// include in API requests. By default, fields with empty or default values are
  1730  	// omitted from API requests. See
  1731  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1732  	// details.
  1733  	ForceSendFields []string `json:"-"`
  1734  	// NullFields is a list of field names (e.g. "Jobs") to include in API requests
  1735  	// with the JSON null value. By default, fields with empty values are omitted
  1736  	// from API requests. See
  1737  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1738  	NullFields []string `json:"-"`
  1739  }
  1740  
  1741  func (s *GoogleCloudMlV1__ListJobsResponse) MarshalJSON() ([]byte, error) {
  1742  	type NoMethod GoogleCloudMlV1__ListJobsResponse
  1743  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1744  }
  1745  
  1746  type GoogleCloudMlV1__ListLocationsResponse struct {
  1747  	// Locations: Locations where at least one type of CMLE capability is
  1748  	// available.
  1749  	Locations []*GoogleCloudMlV1__Location `json:"locations,omitempty"`
  1750  	// NextPageToken: Optional. Pass this token as the `page_token` field of the
  1751  	// request for a subsequent call.
  1752  	NextPageToken string `json:"nextPageToken,omitempty"`
  1753  
  1754  	// ServerResponse contains the HTTP response code and headers from the server.
  1755  	googleapi.ServerResponse `json:"-"`
  1756  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1757  	// unconditionally include in API requests. By default, fields with empty or
  1758  	// default values are omitted from API requests. See
  1759  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1760  	// details.
  1761  	ForceSendFields []string `json:"-"`
  1762  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1763  	// requests with the JSON null value. By default, fields with empty values are
  1764  	// omitted from API requests. See
  1765  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1766  	NullFields []string `json:"-"`
  1767  }
  1768  
  1769  func (s *GoogleCloudMlV1__ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1770  	type NoMethod GoogleCloudMlV1__ListLocationsResponse
  1771  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1772  }
  1773  
  1774  // GoogleCloudMlV1__ListModelsResponse: Response message for the ListModels
  1775  // method.
  1776  type GoogleCloudMlV1__ListModelsResponse struct {
  1777  	// Models: The list of models.
  1778  	Models []*GoogleCloudMlV1__Model `json:"models,omitempty"`
  1779  	// NextPageToken: Optional. Pass this token as the `page_token` field of the
  1780  	// request for a subsequent call.
  1781  	NextPageToken string `json:"nextPageToken,omitempty"`
  1782  
  1783  	// ServerResponse contains the HTTP response code and headers from the server.
  1784  	googleapi.ServerResponse `json:"-"`
  1785  	// ForceSendFields is a list of field names (e.g. "Models") to unconditionally
  1786  	// include in API requests. By default, fields with empty or default values are
  1787  	// omitted from API requests. See
  1788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1789  	// details.
  1790  	ForceSendFields []string `json:"-"`
  1791  	// NullFields is a list of field names (e.g. "Models") to include in API
  1792  	// requests with the JSON null value. By default, fields with empty values are
  1793  	// omitted from API requests. See
  1794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1795  	NullFields []string `json:"-"`
  1796  }
  1797  
  1798  func (s *GoogleCloudMlV1__ListModelsResponse) MarshalJSON() ([]byte, error) {
  1799  	type NoMethod GoogleCloudMlV1__ListModelsResponse
  1800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1801  }
  1802  
  1803  // GoogleCloudMlV1__ListOptimalTrialsRequest: The request message for the
  1804  // ListTrials service method.
  1805  type GoogleCloudMlV1__ListOptimalTrialsRequest struct {
  1806  }
  1807  
  1808  // GoogleCloudMlV1__ListOptimalTrialsResponse: The response message for the
  1809  // ListOptimalTrials method.
  1810  type GoogleCloudMlV1__ListOptimalTrialsResponse struct {
  1811  	// Trials: The pareto-optimal trials for multiple objective study or the
  1812  	// optimal trial for single objective study. The definition of pareto-optimal
  1813  	// can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
  1814  	Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
  1815  
  1816  	// ServerResponse contains the HTTP response code and headers from the server.
  1817  	googleapi.ServerResponse `json:"-"`
  1818  	// ForceSendFields is a list of field names (e.g. "Trials") to unconditionally
  1819  	// include in API requests. By default, fields with empty or default values are
  1820  	// omitted from API requests. See
  1821  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1822  	// details.
  1823  	ForceSendFields []string `json:"-"`
  1824  	// NullFields is a list of field names (e.g. "Trials") to include in API
  1825  	// requests with the JSON null value. By default, fields with empty values are
  1826  	// omitted from API requests. See
  1827  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1828  	NullFields []string `json:"-"`
  1829  }
  1830  
  1831  func (s *GoogleCloudMlV1__ListOptimalTrialsResponse) MarshalJSON() ([]byte, error) {
  1832  	type NoMethod GoogleCloudMlV1__ListOptimalTrialsResponse
  1833  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1834  }
  1835  
  1836  type GoogleCloudMlV1__ListStudiesResponse struct {
  1837  	// Studies: The studies associated with the project.
  1838  	Studies []*GoogleCloudMlV1__Study `json:"studies,omitempty"`
  1839  
  1840  	// ServerResponse contains the HTTP response code and headers from the server.
  1841  	googleapi.ServerResponse `json:"-"`
  1842  	// ForceSendFields is a list of field names (e.g. "Studies") to unconditionally
  1843  	// include in API requests. By default, fields with empty or default values are
  1844  	// omitted from API requests. See
  1845  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1846  	// details.
  1847  	ForceSendFields []string `json:"-"`
  1848  	// NullFields is a list of field names (e.g. "Studies") to include in API
  1849  	// requests with the JSON null value. By default, fields with empty values are
  1850  	// omitted from API requests. See
  1851  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1852  	NullFields []string `json:"-"`
  1853  }
  1854  
  1855  func (s *GoogleCloudMlV1__ListStudiesResponse) MarshalJSON() ([]byte, error) {
  1856  	type NoMethod GoogleCloudMlV1__ListStudiesResponse
  1857  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1858  }
  1859  
  1860  // GoogleCloudMlV1__ListTrialsResponse: The response message for the ListTrials
  1861  // method.
  1862  type GoogleCloudMlV1__ListTrialsResponse struct {
  1863  	// Trials: The trials associated with the study.
  1864  	Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
  1865  
  1866  	// ServerResponse contains the HTTP response code and headers from the server.
  1867  	googleapi.ServerResponse `json:"-"`
  1868  	// ForceSendFields is a list of field names (e.g. "Trials") to unconditionally
  1869  	// include in API requests. By default, fields with empty or default values are
  1870  	// omitted from API requests. See
  1871  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1872  	// details.
  1873  	ForceSendFields []string `json:"-"`
  1874  	// NullFields is a list of field names (e.g. "Trials") to include in API
  1875  	// requests with the JSON null value. By default, fields with empty values are
  1876  	// omitted from API requests. See
  1877  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1878  	NullFields []string `json:"-"`
  1879  }
  1880  
  1881  func (s *GoogleCloudMlV1__ListTrialsResponse) MarshalJSON() ([]byte, error) {
  1882  	type NoMethod GoogleCloudMlV1__ListTrialsResponse
  1883  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1884  }
  1885  
  1886  // GoogleCloudMlV1__ListVersionsResponse: Response message for the ListVersions
  1887  // method.
  1888  type GoogleCloudMlV1__ListVersionsResponse struct {
  1889  	// NextPageToken: Optional. Pass this token as the `page_token` field of the
  1890  	// request for a subsequent call.
  1891  	NextPageToken string `json:"nextPageToken,omitempty"`
  1892  	// Versions: The list of versions.
  1893  	Versions []*GoogleCloudMlV1__Version `json:"versions,omitempty"`
  1894  
  1895  	// ServerResponse contains the HTTP response code and headers from the server.
  1896  	googleapi.ServerResponse `json:"-"`
  1897  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1898  	// unconditionally include in API requests. By default, fields with empty or
  1899  	// default values are omitted from API requests. See
  1900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1901  	// details.
  1902  	ForceSendFields []string `json:"-"`
  1903  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1904  	// requests with the JSON null value. By default, fields with empty values are
  1905  	// omitted from API requests. See
  1906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1907  	NullFields []string `json:"-"`
  1908  }
  1909  
  1910  func (s *GoogleCloudMlV1__ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1911  	type NoMethod GoogleCloudMlV1__ListVersionsResponse
  1912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1913  }
  1914  
  1915  type GoogleCloudMlV1__Location struct {
  1916  	// Capabilities: Capabilities available in the location.
  1917  	Capabilities []*GoogleCloudMlV1__Capability `json:"capabilities,omitempty"`
  1918  	Name         string                         `json:"name,omitempty"`
  1919  
  1920  	// ServerResponse contains the HTTP response code and headers from the server.
  1921  	googleapi.ServerResponse `json:"-"`
  1922  	// ForceSendFields is a list of field names (e.g. "Capabilities") to
  1923  	// unconditionally include in API requests. By default, fields with empty or
  1924  	// default values are omitted from API requests. See
  1925  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1926  	// details.
  1927  	ForceSendFields []string `json:"-"`
  1928  	// NullFields is a list of field names (e.g. "Capabilities") to include in API
  1929  	// requests with the JSON null value. By default, fields with empty values are
  1930  	// omitted from API requests. See
  1931  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1932  	NullFields []string `json:"-"`
  1933  }
  1934  
  1935  func (s *GoogleCloudMlV1__Location) MarshalJSON() ([]byte, error) {
  1936  	type NoMethod GoogleCloudMlV1__Location
  1937  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1938  }
  1939  
  1940  // GoogleCloudMlV1__ManualScaling: Options for manually scaling a model.
  1941  type GoogleCloudMlV1__ManualScaling struct {
  1942  	// Nodes: The number of nodes to allocate for this model. These nodes are
  1943  	// always up, starting from the time the model is deployed, so the cost of
  1944  	// operating this model will be proportional to `nodes` * number of hours since
  1945  	// last billing cycle plus the cost for each prediction performed.
  1946  	Nodes int64 `json:"nodes,omitempty"`
  1947  	// ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally
  1948  	// include in API requests. By default, fields with empty or default values are
  1949  	// omitted from API requests. See
  1950  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1951  	// details.
  1952  	ForceSendFields []string `json:"-"`
  1953  	// NullFields is a list of field names (e.g. "Nodes") to include in API
  1954  	// requests with the JSON null value. By default, fields with empty values are
  1955  	// omitted from API requests. See
  1956  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1957  	NullFields []string `json:"-"`
  1958  }
  1959  
  1960  func (s *GoogleCloudMlV1__ManualScaling) MarshalJSON() ([]byte, error) {
  1961  	type NoMethod GoogleCloudMlV1__ManualScaling
  1962  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1963  }
  1964  
  1965  // GoogleCloudMlV1__Measurement: A message representing a measurement.
  1966  type GoogleCloudMlV1__Measurement struct {
  1967  	// ElapsedTime: Output only. Time that the trial has been running at the point
  1968  	// of this measurement.
  1969  	ElapsedTime string `json:"elapsedTime,omitempty"`
  1970  	// Metrics: Provides a list of metrics that act as inputs into the objective
  1971  	// function.
  1972  	Metrics []*GoogleCloudMlV1MeasurementMetric `json:"metrics,omitempty"`
  1973  	// StepCount: The number of steps a machine learning model has been trained
  1974  	// for. Must be non-negative.
  1975  	StepCount int64 `json:"stepCount,omitempty,string"`
  1976  	// ForceSendFields is a list of field names (e.g. "ElapsedTime") to
  1977  	// unconditionally include in API requests. By default, fields with empty or
  1978  	// default values are omitted from API requests. See
  1979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1980  	// details.
  1981  	ForceSendFields []string `json:"-"`
  1982  	// NullFields is a list of field names (e.g. "ElapsedTime") to include in API
  1983  	// requests with the JSON null value. By default, fields with empty values are
  1984  	// omitted from API requests. See
  1985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1986  	NullFields []string `json:"-"`
  1987  }
  1988  
  1989  func (s *GoogleCloudMlV1__Measurement) MarshalJSON() ([]byte, error) {
  1990  	type NoMethod GoogleCloudMlV1__Measurement
  1991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1992  }
  1993  
  1994  // GoogleCloudMlV1__MetricSpec: MetricSpec contains the specifications to use
  1995  // to calculate the desired nodes count when autoscaling is enabled.
  1996  type GoogleCloudMlV1__MetricSpec struct {
  1997  	// Name: metric name.
  1998  	//
  1999  	// Possible values:
  2000  	//   "METRIC_NAME_UNSPECIFIED" - Unspecified MetricName.
  2001  	//   "CPU_USAGE" - CPU usage.
  2002  	//   "GPU_DUTY_CYCLE" - GPU duty cycle.
  2003  	Name string `json:"name,omitempty"`
  2004  	// Target: Target specifies the target value for the given metric; once real
  2005  	// metric deviates from the threshold by a certain percentage, the node count
  2006  	// changes.
  2007  	Target int64 `json:"target,omitempty"`
  2008  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2009  	// include in API requests. By default, fields with empty or default values are
  2010  	// omitted from API requests. See
  2011  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2012  	// details.
  2013  	ForceSendFields []string `json:"-"`
  2014  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2015  	// with the JSON null value. By default, fields with empty values are omitted
  2016  	// from API requests. See
  2017  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2018  	NullFields []string `json:"-"`
  2019  }
  2020  
  2021  func (s *GoogleCloudMlV1__MetricSpec) MarshalJSON() ([]byte, error) {
  2022  	type NoMethod GoogleCloudMlV1__MetricSpec
  2023  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2024  }
  2025  
  2026  // GoogleCloudMlV1__Model: Represents a machine learning solution. A model can
  2027  // have multiple versions, each of which is a deployed, trained model ready to
  2028  // receive prediction requests. The model itself is just a container.
  2029  type GoogleCloudMlV1__Model struct {
  2030  	// DefaultVersion: Output only. The default version of the model. This version
  2031  	// will be used to handle prediction requests that do not specify a version.
  2032  	// You can change the default version by calling
  2033  	// projects.models.versions.setDefault.
  2034  	DefaultVersion *GoogleCloudMlV1__Version `json:"defaultVersion,omitempty"`
  2035  	// Description: Optional. The description specified for the model when it was
  2036  	// created.
  2037  	Description string `json:"description,omitempty"`
  2038  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2039  	// prevent simultaneous updates of a model from overwriting each other. It is
  2040  	// strongly suggested that systems make use of the `etag` in the
  2041  	// read-modify-write cycle to perform model updates in order to avoid race
  2042  	// conditions: An `etag` is returned in the response to `GetModel`, and systems
  2043  	// are expected to put that etag in the request to `UpdateModel` to ensure that
  2044  	// their change will be applied to the model as intended.
  2045  	Etag string `json:"etag,omitempty"`
  2046  	// Labels: Optional. One or more labels that you can add, to organize your
  2047  	// models. Each label is a key-value pair, where both the key and the value are
  2048  	// arbitrary strings that you supply. For more information, see the
  2049  	// documentation on using labels. Note that this field is not updatable for
  2050  	// mls1* models.
  2051  	Labels map[string]string `json:"labels,omitempty"`
  2052  	// Name: Required. The name specified for the model when it was created. The
  2053  	// model name must be unique within the project it is created in.
  2054  	Name string `json:"name,omitempty"`
  2055  	// OnlinePredictionConsoleLogging: Optional. If true, online prediction nodes
  2056  	// send `stderr` and `stdout` streams to Cloud Logging. These can be more
  2057  	// verbose than the standard access logs (see `onlinePredictionLogging`) and
  2058  	// can incur higher cost. However, they are helpful for debugging. Note that
  2059  	// logs may incur a cost (/stackdriver/pricing), especially if your project
  2060  	// receives prediction requests at a high QPS. Estimate your costs before
  2061  	// enabling this option. Default is false.
  2062  	OnlinePredictionConsoleLogging bool `json:"onlinePredictionConsoleLogging,omitempty"`
  2063  	// OnlinePredictionLogging: Optional. If true, online prediction access logs
  2064  	// are sent to Cloud Logging. These logs are like standard server access logs,
  2065  	// containing information like timestamp and latency for each request. Note
  2066  	// that logs may incur a cost (/stackdriver/pricing), especially if your
  2067  	// project receives prediction requests at a high queries per second rate
  2068  	// (QPS). Estimate your costs before enabling this option. Default is false.
  2069  	OnlinePredictionLogging bool `json:"onlinePredictionLogging,omitempty"`
  2070  	// Regions: Optional. The list of regions where the model is going to be
  2071  	// deployed. Only one region per model is supported. Defaults to 'us-central1'
  2072  	// if nothing is set. See the available regions for AI Platform services. Note:
  2073  	// * No matter where a model is deployed, it can always be accessed by users
  2074  	// from anywhere, both for online and batch prediction. * The region for a
  2075  	// batch prediction job is set by the region field when submitting the batch
  2076  	// prediction job and does not take its value from this field.
  2077  	Regions []string `json:"regions,omitempty"`
  2078  
  2079  	// ServerResponse contains the HTTP response code and headers from the server.
  2080  	googleapi.ServerResponse `json:"-"`
  2081  	// ForceSendFields is a list of field names (e.g. "DefaultVersion") to
  2082  	// unconditionally include in API requests. By default, fields with empty or
  2083  	// default values are omitted from API requests. See
  2084  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2085  	// details.
  2086  	ForceSendFields []string `json:"-"`
  2087  	// NullFields is a list of field names (e.g. "DefaultVersion") to include in
  2088  	// API requests with the JSON null value. By default, fields with empty values
  2089  	// are omitted from API requests. See
  2090  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2091  	NullFields []string `json:"-"`
  2092  }
  2093  
  2094  func (s *GoogleCloudMlV1__Model) MarshalJSON() ([]byte, error) {
  2095  	type NoMethod GoogleCloudMlV1__Model
  2096  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2097  }
  2098  
  2099  // GoogleCloudMlV1__OperationMetadata: Represents the metadata of the
  2100  // long-running operation.
  2101  type GoogleCloudMlV1__OperationMetadata struct {
  2102  	// CreateTime: The time the operation was submitted.
  2103  	CreateTime string `json:"createTime,omitempty"`
  2104  	// EndTime: The time operation processing completed.
  2105  	EndTime string `json:"endTime,omitempty"`
  2106  	// IsCancellationRequested: Indicates whether a request to cancel this
  2107  	// operation has been made.
  2108  	IsCancellationRequested bool `json:"isCancellationRequested,omitempty"`
  2109  	// Labels: The user labels, inherited from the model or the model version being
  2110  	// operated on.
  2111  	Labels map[string]string `json:"labels,omitempty"`
  2112  	// ModelName: Contains the name of the model associated with the operation.
  2113  	ModelName string `json:"modelName,omitempty"`
  2114  	// OperationType: The operation type.
  2115  	//
  2116  	// Possible values:
  2117  	//   "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type.
  2118  	//   "CREATE_VERSION" - An operation to create a new version.
  2119  	//   "DELETE_VERSION" - An operation to delete an existing version.
  2120  	//   "DELETE_MODEL" - An operation to delete an existing model.
  2121  	//   "UPDATE_MODEL" - An operation to update an existing model.
  2122  	//   "UPDATE_VERSION" - An operation to update an existing version.
  2123  	//   "UPDATE_CONFIG" - An operation to update project configuration.
  2124  	OperationType string `json:"operationType,omitempty"`
  2125  	// ProjectNumber: Contains the project number associated with the operation.
  2126  	ProjectNumber int64 `json:"projectNumber,omitempty,string"`
  2127  	// StartTime: The time operation processing started.
  2128  	StartTime string `json:"startTime,omitempty"`
  2129  	// Version: Contains the version associated with the operation.
  2130  	Version *GoogleCloudMlV1__Version `json:"version,omitempty"`
  2131  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2132  	// unconditionally include in API requests. By default, fields with empty or
  2133  	// default values are omitted from API requests. See
  2134  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2135  	// details.
  2136  	ForceSendFields []string `json:"-"`
  2137  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2138  	// requests with the JSON null value. By default, fields with empty values are
  2139  	// omitted from API requests. See
  2140  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2141  	NullFields []string `json:"-"`
  2142  }
  2143  
  2144  func (s *GoogleCloudMlV1__OperationMetadata) MarshalJSON() ([]byte, error) {
  2145  	type NoMethod GoogleCloudMlV1__OperationMetadata
  2146  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2147  }
  2148  
  2149  // GoogleCloudMlV1__ParameterSpec: Represents a single hyperparameter to
  2150  // optimize.
  2151  type GoogleCloudMlV1__ParameterSpec struct {
  2152  	// CategoricalValues: Required if type is `CATEGORICAL`. The list of possible
  2153  	// categories.
  2154  	CategoricalValues []string `json:"categoricalValues,omitempty"`
  2155  	// DiscreteValues: Required if type is `DISCRETE`. A list of feasible points.
  2156  	// The list should be in strictly increasing order. For instance, this
  2157  	// parameter might have possible settings of 1.5, 2.5, and 4.0. This list
  2158  	// should not contain more than 1,000 values.
  2159  	DiscreteValues []float64 `json:"discreteValues,omitempty"`
  2160  	// MaxValue: Required if type is `DOUBLE` or `INTEGER`. This field should be
  2161  	// unset if type is `CATEGORICAL`. This value should be integers if type is
  2162  	// `INTEGER`.
  2163  	MaxValue float64 `json:"maxValue,omitempty"`
  2164  	// MinValue: Required if type is `DOUBLE` or `INTEGER`. This field should be
  2165  	// unset if type is `CATEGORICAL`. This value should be integers if type is
  2166  	// INTEGER.
  2167  	MinValue float64 `json:"minValue,omitempty"`
  2168  	// ParameterName: Required. The parameter name must be unique amongst all
  2169  	// ParameterConfigs in a HyperparameterSpec message. E.g., "learning_rate".
  2170  	ParameterName string `json:"parameterName,omitempty"`
  2171  	// ScaleType: Optional. How the parameter should be scaled to the hypercube.
  2172  	// Leave unset for categorical parameters. Some kind of scaling is strongly
  2173  	// recommended for real or integral parameters (e.g., `UNIT_LINEAR_SCALE`).
  2174  	//
  2175  	// Possible values:
  2176  	//   "NONE" - By default, no scaling is applied.
  2177  	//   "UNIT_LINEAR_SCALE" - Scales the feasible space to (0, 1) linearly.
  2178  	//   "UNIT_LOG_SCALE" - Scales the feasible space logarithmically to (0, 1).
  2179  	// The entire feasible space must be strictly positive.
  2180  	//   "UNIT_REVERSE_LOG_SCALE" - Scales the feasible space "reverse"
  2181  	// logarithmically to (0, 1). The result is that values close to the top of the
  2182  	// feasible space are spread out more than points near the bottom. The entire
  2183  	// feasible space must be strictly positive.
  2184  	ScaleType string `json:"scaleType,omitempty"`
  2185  	// Type: Required. The type of the parameter.
  2186  	//
  2187  	// Possible values:
  2188  	//   "PARAMETER_TYPE_UNSPECIFIED" - You must specify a valid type. Using this
  2189  	// unspecified type will result in an error.
  2190  	//   "DOUBLE" - Type for real-valued parameters.
  2191  	//   "INTEGER" - Type for integral parameters.
  2192  	//   "CATEGORICAL" - The parameter is categorical, with a value chosen from the
  2193  	// categories field.
  2194  	//   "DISCRETE" - The parameter is real valued, with a fixed set of feasible
  2195  	// points. If `type==DISCRETE`, feasible_points must be provided, and
  2196  	// {`min_value`, `max_value`} will be ignored.
  2197  	Type string `json:"type,omitempty"`
  2198  	// ForceSendFields is a list of field names (e.g. "CategoricalValues") 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. "CategoricalValues") to include in
  2205  	// API requests with the JSON null value. By default, fields with empty values
  2206  	// are 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 *GoogleCloudMlV1__ParameterSpec) MarshalJSON() ([]byte, error) {
  2212  	type NoMethod GoogleCloudMlV1__ParameterSpec
  2213  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2214  }
  2215  
  2216  func (s *GoogleCloudMlV1__ParameterSpec) UnmarshalJSON(data []byte) error {
  2217  	type NoMethod GoogleCloudMlV1__ParameterSpec
  2218  	var s1 struct {
  2219  		DiscreteValues []gensupport.JSONFloat64 `json:"discreteValues"`
  2220  		MaxValue       gensupport.JSONFloat64   `json:"maxValue"`
  2221  		MinValue       gensupport.JSONFloat64   `json:"minValue"`
  2222  		*NoMethod
  2223  	}
  2224  	s1.NoMethod = (*NoMethod)(s)
  2225  	if err := json.Unmarshal(data, &s1); err != nil {
  2226  		return err
  2227  	}
  2228  	s.DiscreteValues = make([]float64, len(s1.DiscreteValues))
  2229  	for i := range s1.DiscreteValues {
  2230  		s.DiscreteValues[i] = float64(s1.DiscreteValues[i])
  2231  	}
  2232  	s.MaxValue = float64(s1.MaxValue)
  2233  	s.MinValue = float64(s1.MinValue)
  2234  	return nil
  2235  }
  2236  
  2237  // GoogleCloudMlV1__PredictRequest: Request for predictions to be issued
  2238  // against a trained model.
  2239  type GoogleCloudMlV1__PredictRequest struct {
  2240  	// HttpBody:  Required. The prediction request body. Refer to the request body
  2241  	// details section (#request-body-details) for more information on how to
  2242  	// structure your request.
  2243  	HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"`
  2244  	// ForceSendFields is a list of field names (e.g. "HttpBody") to
  2245  	// unconditionally include in API requests. By default, fields with empty or
  2246  	// default values are omitted from API requests. See
  2247  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2248  	// details.
  2249  	ForceSendFields []string `json:"-"`
  2250  	// NullFields is a list of field names (e.g. "HttpBody") to include in API
  2251  	// requests with the JSON null value. By default, fields with empty values are
  2252  	// omitted from API requests. See
  2253  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2254  	NullFields []string `json:"-"`
  2255  }
  2256  
  2257  func (s *GoogleCloudMlV1__PredictRequest) MarshalJSON() ([]byte, error) {
  2258  	type NoMethod GoogleCloudMlV1__PredictRequest
  2259  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2260  }
  2261  
  2262  // GoogleCloudMlV1__PredictionInput: Represents input parameters for a
  2263  // prediction job.
  2264  type GoogleCloudMlV1__PredictionInput struct {
  2265  	// BatchSize: Optional. Number of records per batch, defaults to 64. The
  2266  	// service will buffer batch_size number of records in memory before invoking
  2267  	// one Tensorflow prediction call internally. So take the record size and
  2268  	// memory available into consideration when setting this parameter.
  2269  	BatchSize int64 `json:"batchSize,omitempty,string"`
  2270  	// DataFormat: Required. The format of the input data files.
  2271  	//
  2272  	// Possible values:
  2273  	//   "DATA_FORMAT_UNSPECIFIED" - Unspecified format.
  2274  	//   "JSON" - Each line of the file is a JSON dictionary representing one
  2275  	// record.
  2276  	//   "TEXT" - Deprecated. Use JSON instead.
  2277  	//   "TF_RECORD" - The source file is a TFRecord file. Currently available only
  2278  	// for input data.
  2279  	//   "TF_RECORD_GZIP" - The source file is a GZIP-compressed TFRecord file.
  2280  	// Currently available only for input data.
  2281  	//   "CSV" - Values are comma-separated rows, with keys in a separate file.
  2282  	// Currently available only for output data.
  2283  	DataFormat string `json:"dataFormat,omitempty"`
  2284  	// InputPaths: Required. The Cloud Storage location of the input data files.
  2285  	// May contain wildcards.
  2286  	InputPaths []string `json:"inputPaths,omitempty"`
  2287  	// MaxWorkerCount: Optional. The maximum number of workers to be used for
  2288  	// parallel processing. Defaults to 10 if not specified.
  2289  	MaxWorkerCount int64 `json:"maxWorkerCount,omitempty,string"`
  2290  	// ModelName: Use this field if you want to use the default version for the
  2291  	// specified model. The string must use the following format:
  2292  	// "projects/YOUR_PROJECT/models/YOUR_MODEL"
  2293  	ModelName string `json:"modelName,omitempty"`
  2294  	// OutputDataFormat: Optional. Format of the output data files, defaults to
  2295  	// JSON.
  2296  	//
  2297  	// Possible values:
  2298  	//   "DATA_FORMAT_UNSPECIFIED" - Unspecified format.
  2299  	//   "JSON" - Each line of the file is a JSON dictionary representing one
  2300  	// record.
  2301  	//   "TEXT" - Deprecated. Use JSON instead.
  2302  	//   "TF_RECORD" - The source file is a TFRecord file. Currently available only
  2303  	// for input data.
  2304  	//   "TF_RECORD_GZIP" - The source file is a GZIP-compressed TFRecord file.
  2305  	// Currently available only for input data.
  2306  	//   "CSV" - Values are comma-separated rows, with keys in a separate file.
  2307  	// Currently available only for output data.
  2308  	OutputDataFormat string `json:"outputDataFormat,omitempty"`
  2309  	// OutputPath: Required. The output Google Cloud Storage location.
  2310  	OutputPath string `json:"outputPath,omitempty"`
  2311  	// Region: Required. The Google Compute Engine region to run the prediction job
  2312  	// in. See the available regions for AI Platform services.
  2313  	Region string `json:"region,omitempty"`
  2314  	// RuntimeVersion: Optional. The AI Platform runtime version to use for this
  2315  	// batch prediction. If not set, AI Platform will pick the runtime version used
  2316  	// during the CreateVersion request for this model version, or choose the
  2317  	// latest stable version when model version information is not available such
  2318  	// as when the model is specified by uri.
  2319  	RuntimeVersion string `json:"runtimeVersion,omitempty"`
  2320  	// SignatureName: Optional. The name of the signature defined in the SavedModel
  2321  	// to use for this job. Please refer to SavedModel
  2322  	// (https://tensorflow.github.io/serving/serving_basic.html) for information
  2323  	// about how to use signatures. Defaults to DEFAULT_SERVING_SIGNATURE_DEF_KEY
  2324  	// (https://www.tensorflow.org/api_docs/python/tf/saved_model/signature_constants)
  2325  	// , which is "serving_default".
  2326  	SignatureName string `json:"signatureName,omitempty"`
  2327  	// Uri: Use this field if you want to specify a Google Cloud Storage path for
  2328  	// the model to use.
  2329  	Uri string `json:"uri,omitempty"`
  2330  	// VersionName: Use this field if you want to specify a version of the model to
  2331  	// use. The string is formatted the same way as `model_version`, with the
  2332  	// addition of the version information:
  2333  	// "projects/YOUR_PROJECT/models/YOUR_MODEL/versions/YOUR_VERSION"
  2334  	VersionName string `json:"versionName,omitempty"`
  2335  	// ForceSendFields is a list of field names (e.g. "BatchSize") to
  2336  	// unconditionally include in API requests. By default, fields with empty or
  2337  	// default values are omitted from API requests. See
  2338  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2339  	// details.
  2340  	ForceSendFields []string `json:"-"`
  2341  	// NullFields is a list of field names (e.g. "BatchSize") to include in API
  2342  	// requests with the JSON null value. By default, fields with empty values are
  2343  	// omitted from API requests. See
  2344  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2345  	NullFields []string `json:"-"`
  2346  }
  2347  
  2348  func (s *GoogleCloudMlV1__PredictionInput) MarshalJSON() ([]byte, error) {
  2349  	type NoMethod GoogleCloudMlV1__PredictionInput
  2350  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2351  }
  2352  
  2353  // GoogleCloudMlV1__PredictionOutput: Represents results of a prediction job.
  2354  type GoogleCloudMlV1__PredictionOutput struct {
  2355  	// ErrorCount: The number of data instances which resulted in errors.
  2356  	ErrorCount int64 `json:"errorCount,omitempty,string"`
  2357  	// NodeHours: Node hours used by the batch prediction job.
  2358  	NodeHours float64 `json:"nodeHours,omitempty"`
  2359  	// OutputPath: The output Google Cloud Storage location provided at the job
  2360  	// creation time.
  2361  	OutputPath string `json:"outputPath,omitempty"`
  2362  	// PredictionCount: The number of generated predictions.
  2363  	PredictionCount int64 `json:"predictionCount,omitempty,string"`
  2364  	// ForceSendFields is a list of field names (e.g. "ErrorCount") to
  2365  	// unconditionally include in API requests. By default, fields with empty or
  2366  	// default values are omitted from API requests. See
  2367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2368  	// details.
  2369  	ForceSendFields []string `json:"-"`
  2370  	// NullFields is a list of field names (e.g. "ErrorCount") to include in API
  2371  	// requests with the JSON null value. By default, fields with empty values are
  2372  	// omitted from API requests. See
  2373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2374  	NullFields []string `json:"-"`
  2375  }
  2376  
  2377  func (s *GoogleCloudMlV1__PredictionOutput) MarshalJSON() ([]byte, error) {
  2378  	type NoMethod GoogleCloudMlV1__PredictionOutput
  2379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2380  }
  2381  
  2382  func (s *GoogleCloudMlV1__PredictionOutput) UnmarshalJSON(data []byte) error {
  2383  	type NoMethod GoogleCloudMlV1__PredictionOutput
  2384  	var s1 struct {
  2385  		NodeHours gensupport.JSONFloat64 `json:"nodeHours"`
  2386  		*NoMethod
  2387  	}
  2388  	s1.NoMethod = (*NoMethod)(s)
  2389  	if err := json.Unmarshal(data, &s1); err != nil {
  2390  		return err
  2391  	}
  2392  	s.NodeHours = float64(s1.NodeHours)
  2393  	return nil
  2394  }
  2395  
  2396  // GoogleCloudMlV1__ReplicaConfig: Represents the configuration for a replica
  2397  // in a cluster.
  2398  type GoogleCloudMlV1__ReplicaConfig struct {
  2399  	// AcceleratorConfig: Represents the type and number of accelerators used by
  2400  	// the replica. Learn about restrictions on accelerator configurations for
  2401  	// training.
  2402  	// (/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)
  2403  	AcceleratorConfig *GoogleCloudMlV1__AcceleratorConfig `json:"acceleratorConfig,omitempty"`
  2404  	// ContainerArgs: Arguments to the entrypoint command. The following rules
  2405  	// apply for container_command and container_args: - If you do not supply
  2406  	// command or args: The defaults defined in the Docker image are used. - If you
  2407  	// supply a command but no args: The default EntryPoint and the default Cmd
  2408  	// defined in the Docker image are ignored. Your command is run without any
  2409  	// arguments. - If you supply only args: The default Entrypoint defined in the
  2410  	// Docker image is run with the args that you supplied. - If you supply a
  2411  	// command and args: The default Entrypoint and the default Cmd defined in the
  2412  	// Docker image are ignored. Your command is run with your args. It cannot be
  2413  	// set if custom container image is not provided. Note that this field and
  2414  	// [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the
  2415  	// same time.
  2416  	ContainerArgs []string `json:"containerArgs,omitempty"`
  2417  	// ContainerCommand: The command with which the replica's custom container is
  2418  	// run. If provided, it will override default ENTRYPOINT of the docker image.
  2419  	// If not provided, the docker image's ENTRYPOINT is used. It cannot be set if
  2420  	// custom container image is not provided. Note that this field and
  2421  	// [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the
  2422  	// same time.
  2423  	ContainerCommand []string `json:"containerCommand,omitempty"`
  2424  	// DiskConfig: Represents the configuration of disk options.
  2425  	DiskConfig *GoogleCloudMlV1__DiskConfig `json:"diskConfig,omitempty"`
  2426  	// ImageUri: The Docker image to run on the replica. This image must be in
  2427  	// Container Registry. Learn more about configuring custom containers
  2428  	// (/ai-platform/training/docs/distributed-training-containers).
  2429  	ImageUri string `json:"imageUri,omitempty"`
  2430  	// TpuTfVersion: The AI Platform runtime version that includes a TensorFlow
  2431  	// version matching the one used in the custom container. This field is
  2432  	// required if the replica is a TPU worker that uses a custom container.
  2433  	// Otherwise, do not specify this field. This must be a runtime version that
  2434  	// currently supports training with TPUs
  2435  	// (/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the
  2436  	// version of TensorFlow included in a runtime version may differ from the
  2437  	// numbering of the runtime version itself, because it may have a different
  2438  	// patch version
  2439  	// (https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In
  2440  	// this field, you must specify the runtime version (TensorFlow minor version).
  2441  	// For example, if your custom container runs TensorFlow `1.x.y`, specify
  2442  	// `1.x`.
  2443  	TpuTfVersion string `json:"tpuTfVersion,omitempty"`
  2444  	// ForceSendFields is a list of field names (e.g. "AcceleratorConfig") to
  2445  	// unconditionally include in API requests. By default, fields with empty or
  2446  	// default values are omitted from API requests. See
  2447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2448  	// details.
  2449  	ForceSendFields []string `json:"-"`
  2450  	// NullFields is a list of field names (e.g. "AcceleratorConfig") to include in
  2451  	// API requests with the JSON null value. By default, fields with empty values
  2452  	// are omitted from API requests. See
  2453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2454  	NullFields []string `json:"-"`
  2455  }
  2456  
  2457  func (s *GoogleCloudMlV1__ReplicaConfig) MarshalJSON() ([]byte, error) {
  2458  	type NoMethod GoogleCloudMlV1__ReplicaConfig
  2459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2460  }
  2461  
  2462  // GoogleCloudMlV1__RequestLoggingConfig: Configuration for logging
  2463  // request-response pairs to a BigQuery table. Online prediction requests to a
  2464  // model version and the responses to these requests are converted to raw
  2465  // strings and saved to the specified BigQuery table. Logging is constrained by
  2466  // BigQuery quotas and limits (/bigquery/quotas). If your project exceeds
  2467  // BigQuery quotas or limits, AI Platform Prediction does not log
  2468  // request-response pairs, but it continues to serve predictions. If you are
  2469  // using continuous evaluation (/ml-engine/docs/continuous-evaluation/), you do
  2470  // not need to specify this configuration manually. Setting up continuous
  2471  // evaluation automatically enables logging of request-response pairs.
  2472  type GoogleCloudMlV1__RequestLoggingConfig struct {
  2473  	// BigqueryTableName: Required. Fully qualified BigQuery table name in the
  2474  	// following format: " project_id.dataset_name.table_name" The specified table
  2475  	// must already exist, and the "Cloud ML Service Agent" for your project must
  2476  	// have permission to write to it. The table must have the following schema
  2477  	// (/bigquery/docs/schemas): Field nameType Mode model STRING REQUIRED
  2478  	// model_version STRING REQUIRED time TIMESTAMP REQUIRED raw_data STRING
  2479  	// REQUIRED raw_prediction STRING NULLABLE groundtruth STRING NULLABLE
  2480  	BigqueryTableName string `json:"bigqueryTableName,omitempty"`
  2481  	// SamplingPercentage: Percentage of requests to be logged, expressed as a
  2482  	// fraction from 0 to 1. For example, if you want to log 10% of requests, enter
  2483  	// `0.1`. The sampling window is the lifetime of the model version. Defaults to
  2484  	// 0.
  2485  	SamplingPercentage float64 `json:"samplingPercentage,omitempty"`
  2486  	// ForceSendFields is a list of field names (e.g. "BigqueryTableName") to
  2487  	// unconditionally include in API requests. By default, fields with empty or
  2488  	// default values are omitted from API requests. See
  2489  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2490  	// details.
  2491  	ForceSendFields []string `json:"-"`
  2492  	// NullFields is a list of field names (e.g. "BigqueryTableName") to include in
  2493  	// API requests with the JSON null value. By default, fields with empty values
  2494  	// are omitted from API requests. See
  2495  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2496  	NullFields []string `json:"-"`
  2497  }
  2498  
  2499  func (s *GoogleCloudMlV1__RequestLoggingConfig) MarshalJSON() ([]byte, error) {
  2500  	type NoMethod GoogleCloudMlV1__RequestLoggingConfig
  2501  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2502  }
  2503  
  2504  func (s *GoogleCloudMlV1__RequestLoggingConfig) UnmarshalJSON(data []byte) error {
  2505  	type NoMethod GoogleCloudMlV1__RequestLoggingConfig
  2506  	var s1 struct {
  2507  		SamplingPercentage gensupport.JSONFloat64 `json:"samplingPercentage"`
  2508  		*NoMethod
  2509  	}
  2510  	s1.NoMethod = (*NoMethod)(s)
  2511  	if err := json.Unmarshal(data, &s1); err != nil {
  2512  		return err
  2513  	}
  2514  	s.SamplingPercentage = float64(s1.SamplingPercentage)
  2515  	return nil
  2516  }
  2517  
  2518  // GoogleCloudMlV1__RouteMap: Specifies HTTP paths served by a custom
  2519  // container. AI Platform Prediction sends requests to these paths on the
  2520  // container; the custom container must run an HTTP server that responds to
  2521  // these requests with appropriate responses. Read Custom container
  2522  // requirements (/ai-platform/prediction/docs/custom-container-requirements)
  2523  // for details on how to create your container image to meet these
  2524  // requirements.
  2525  type GoogleCloudMlV1__RouteMap struct {
  2526  	// Health: HTTP path on the container to send health checkss to. AI Platform
  2527  	// Prediction intermittently sends GET requests to this path on the container's
  2528  	// IP address and port to check that the container is healthy. Read more about
  2529  	// health checks
  2530  	// (/ai-platform/prediction/docs/custom-container-requirements#checks). For
  2531  	// example, if you set this field to `/bar`, then AI Platform Prediction
  2532  	// intermittently sends a GET request to the `/bar` path on the port of your
  2533  	// container specified by the first value of Version.container.ports. If you
  2534  	// don't specify this field, it defaults to the following value: /v1/models/
  2535  	// MODEL/versions/VERSION The placeholders in this value are replaced as
  2536  	// follows: * MODEL: The name of the parent Model. This does not include the
  2537  	// "projects/PROJECT_ID/models/" prefix that the API returns in output; it is
  2538  	// the bare model name, as provided to projects.models.create. * VERSION: The
  2539  	// name of the model version. This does not include the "projects/PROJECT_ID
  2540  	// /models/MODEL/versions/" prefix that the API returns in output; it is the
  2541  	// bare version name, as provided to projects.models.versions.create.
  2542  	Health string `json:"health,omitempty"`
  2543  	// Predict: HTTP path on the container to send prediction requests to. AI
  2544  	// Platform Prediction forwards requests sent using projects.predict to this
  2545  	// path on the container's IP address and port. AI Platform Prediction then
  2546  	// returns the container's response in the API response. For example, if you
  2547  	// set this field to `/foo`, then when AI Platform Prediction receives a
  2548  	// prediction request, it forwards the request body in a POST request to the
  2549  	// `/foo` path on the port of your container specified by the first value of
  2550  	// Version.container.ports. If you don't specify this field, it defaults to the
  2551  	// following value: /v1/models/MODEL/versions/VERSION:predict The placeholders
  2552  	// in this value are replaced as follows: * MODEL: The name of the parent
  2553  	// Model. This does not include the "projects/PROJECT_ID/models/" prefix that
  2554  	// the API returns in output; it is the bare model name, as provided to
  2555  	// projects.models.create. * VERSION: The name of the model version. This does
  2556  	// not include the "projects/PROJECT_ID/models/MODEL/versions/" prefix that the
  2557  	// API returns in output; it is the bare version name, as provided to
  2558  	// projects.models.versions.create.
  2559  	Predict string `json:"predict,omitempty"`
  2560  	// ForceSendFields is a list of field names (e.g. "Health") to unconditionally
  2561  	// include in API requests. By default, fields with empty or default values are
  2562  	// omitted from API requests. See
  2563  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2564  	// details.
  2565  	ForceSendFields []string `json:"-"`
  2566  	// NullFields is a list of field names (e.g. "Health") to include in API
  2567  	// requests with the JSON null value. By default, fields with empty values are
  2568  	// omitted from API requests. See
  2569  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2570  	NullFields []string `json:"-"`
  2571  }
  2572  
  2573  func (s *GoogleCloudMlV1__RouteMap) MarshalJSON() ([]byte, error) {
  2574  	type NoMethod GoogleCloudMlV1__RouteMap
  2575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2576  }
  2577  
  2578  // GoogleCloudMlV1__SampledShapleyAttribution: An attribution method that
  2579  // approximates Shapley values for features that contribute to the label being
  2580  // predicted. A sampling strategy is used to approximate the value rather than
  2581  // considering all subsets of features.
  2582  type GoogleCloudMlV1__SampledShapleyAttribution struct {
  2583  	// NumPaths: The number of feature permutations to consider when approximating
  2584  	// the Shapley values.
  2585  	NumPaths int64 `json:"numPaths,omitempty"`
  2586  	// ForceSendFields is a list of field names (e.g. "NumPaths") to
  2587  	// unconditionally include in API requests. By default, fields with empty or
  2588  	// default values are omitted from API requests. See
  2589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2590  	// details.
  2591  	ForceSendFields []string `json:"-"`
  2592  	// NullFields is a list of field names (e.g. "NumPaths") to include in API
  2593  	// requests with the JSON null value. By default, fields with empty values are
  2594  	// omitted from API requests. See
  2595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2596  	NullFields []string `json:"-"`
  2597  }
  2598  
  2599  func (s *GoogleCloudMlV1__SampledShapleyAttribution) MarshalJSON() ([]byte, error) {
  2600  	type NoMethod GoogleCloudMlV1__SampledShapleyAttribution
  2601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2602  }
  2603  
  2604  // GoogleCloudMlV1__Scheduling: All parameters related to scheduling of
  2605  // training jobs.
  2606  type GoogleCloudMlV1__Scheduling struct {
  2607  	// MaxRunningTime: Optional. The maximum job running time, expressed in
  2608  	// seconds. The field can contain up to nine fractional digits, terminated by
  2609  	// `s`. If not specified, this field defaults to `604800s` (seven days). If the
  2610  	// training job is still running after this duration, AI Platform Training
  2611  	// cancels it. The duration is measured from when the job enters the `RUNNING`
  2612  	// state; therefore it does not overlap with the duration limited by
  2613  	// Scheduling.max_wait_time. For example, if you want to ensure your job runs
  2614  	// for no more than 2 hours, set this field to `7200s` (2 hours * 60 minutes /
  2615  	// hour * 60 seconds / minute). If you submit your training job using the
  2616  	// `gcloud` tool, you can specify this field in a `config.yaml` file
  2617  	// (/ai-platform/training/docs/training-jobs#formatting_your_configuration_param
  2618  	// eters). For example: ```yaml trainingInput: scheduling: maxRunningTime:
  2619  	// 7200s ```
  2620  	MaxRunningTime string `json:"maxRunningTime,omitempty"`
  2621  	// MaxWaitTime: Optional. The maximum job wait time, expressed in seconds. The
  2622  	// field can contain up to nine fractional digits, terminated by `s`. If not
  2623  	// specified, there is no limit to the wait time. The minimum for this field is
  2624  	// `1800s` (30 minutes). If the training job has not entered the `RUNNING`
  2625  	// state after this duration, AI Platform Training cancels it. After the job
  2626  	// begins running, it can no longer be cancelled due to the maximum wait time.
  2627  	// Therefore the duration limited by this field does not overlap with the
  2628  	// duration limited by Scheduling.max_running_time. For example, if the job
  2629  	// temporarily stops running and retries due to a VM restart
  2630  	// (/ai-platform/training/docs/overview#restarts), this cannot lead to a
  2631  	// maximum wait time cancellation. However, independently of this constraint,
  2632  	// AI Platform Training might stop a job if there are too many retries due to
  2633  	// exhausted resources in a region. The following example describes how you
  2634  	// might use this field: To cancel your job if it doesn't start running within
  2635  	// 1 hour, set this field to `3600s` (1 hour * 60 minutes / hour * 60 seconds /
  2636  	// minute). If the job is still in the `QUEUED` or `PREPARING` state after an
  2637  	// hour of waiting, AI Platform Training cancels the job. If you submit your
  2638  	// training job using the `gcloud` tool, you can specify this field in a
  2639  	// `config.yaml` file
  2640  	// (/ai-platform/training/docs/training-jobs#formatting_your_configuration_param
  2641  	// eters). For example: ```yaml trainingInput: scheduling: maxWaitTime: 3600s
  2642  	// ```
  2643  	MaxWaitTime string `json:"maxWaitTime,omitempty"`
  2644  	// Priority: Optional. Job scheduling will be based on this priority, which in
  2645  	// the range [0, 1000]. The bigger the number, the higher the priority. Default
  2646  	// to 0 if not set. If there are multiple jobs requesting same type of
  2647  	// accelerators, the high priority job will be scheduled prior to ones with low
  2648  	// priority.
  2649  	Priority int64 `json:"priority,omitempty"`
  2650  	// ForceSendFields is a list of field names (e.g. "MaxRunningTime") to
  2651  	// unconditionally include in API requests. By default, fields with empty or
  2652  	// default values are omitted from API requests. See
  2653  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2654  	// details.
  2655  	ForceSendFields []string `json:"-"`
  2656  	// NullFields is a list of field names (e.g. "MaxRunningTime") to include in
  2657  	// API requests with the JSON null value. By default, fields with empty values
  2658  	// are omitted from API requests. See
  2659  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2660  	NullFields []string `json:"-"`
  2661  }
  2662  
  2663  func (s *GoogleCloudMlV1__Scheduling) MarshalJSON() ([]byte, error) {
  2664  	type NoMethod GoogleCloudMlV1__Scheduling
  2665  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2666  }
  2667  
  2668  // GoogleCloudMlV1__SetDefaultVersionRequest: Request message for the
  2669  // SetDefaultVersion request.
  2670  type GoogleCloudMlV1__SetDefaultVersionRequest struct {
  2671  }
  2672  
  2673  type GoogleCloudMlV1__StopTrialRequest struct {
  2674  }
  2675  
  2676  // GoogleCloudMlV1__Study: A message representing a Study.
  2677  type GoogleCloudMlV1__Study struct {
  2678  	// CreateTime: Output only. Time at which the study was created.
  2679  	CreateTime string `json:"createTime,omitempty"`
  2680  	// InactiveReason: Output only. A human readable reason why the Study is
  2681  	// inactive. This should be empty if a study is ACTIVE or COMPLETED.
  2682  	InactiveReason string `json:"inactiveReason,omitempty"`
  2683  	// Name: Output only. The name of a study.
  2684  	Name string `json:"name,omitempty"`
  2685  	// State: Output only. The detailed state of a study.
  2686  	//
  2687  	// Possible values:
  2688  	//   "STATE_UNSPECIFIED" - The study state is unspecified.
  2689  	//   "ACTIVE" - The study is active.
  2690  	//   "INACTIVE" - The study is stopped due to an internal error.
  2691  	//   "COMPLETED" - The study is done when the service exhausts the parameter
  2692  	// search space or max_trial_count is reached.
  2693  	State string `json:"state,omitempty"`
  2694  	// StudyConfig: Required. Configuration of the study.
  2695  	StudyConfig *GoogleCloudMlV1__StudyConfig `json:"studyConfig,omitempty"`
  2696  
  2697  	// ServerResponse contains the HTTP response code and headers from the server.
  2698  	googleapi.ServerResponse `json:"-"`
  2699  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2700  	// unconditionally include in API requests. By default, fields with empty or
  2701  	// default values are omitted from API requests. See
  2702  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2703  	// details.
  2704  	ForceSendFields []string `json:"-"`
  2705  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2706  	// requests with the JSON null value. By default, fields with empty values are
  2707  	// omitted from API requests. See
  2708  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2709  	NullFields []string `json:"-"`
  2710  }
  2711  
  2712  func (s *GoogleCloudMlV1__Study) MarshalJSON() ([]byte, error) {
  2713  	type NoMethod GoogleCloudMlV1__Study
  2714  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2715  }
  2716  
  2717  // GoogleCloudMlV1__StudyConfig: Represents configuration of a study.
  2718  type GoogleCloudMlV1__StudyConfig struct {
  2719  	// Algorithm: The search algorithm specified for the study.
  2720  	//
  2721  	// Possible values:
  2722  	//   "ALGORITHM_UNSPECIFIED" - The default algorithm used by the Cloud AI
  2723  	// Platform Vizier service.
  2724  	//   "GAUSSIAN_PROCESS_BANDIT" - Gaussian Process Bandit.
  2725  	//   "GRID_SEARCH" - Simple grid search within the feasible space. To use grid
  2726  	// search, all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
  2727  	//   "RANDOM_SEARCH" - Simple random search within the feasible space.
  2728  	Algorithm string `json:"algorithm,omitempty"`
  2729  	// AutomatedStoppingConfig: Configuration for automated stopping of unpromising
  2730  	// Trials.
  2731  	AutomatedStoppingConfig *GoogleCloudMlV1__AutomatedStoppingConfig `json:"automatedStoppingConfig,omitempty"`
  2732  	// Metrics: Metric specs for the study.
  2733  	Metrics []*GoogleCloudMlV1StudyConfigMetricSpec `json:"metrics,omitempty"`
  2734  	// Parameters: Required. The set of parameters to tune.
  2735  	Parameters []*GoogleCloudMlV1StudyConfigParameterSpec `json:"parameters,omitempty"`
  2736  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
  2737  	// unconditionally include in API requests. By default, fields with empty or
  2738  	// default values are omitted from API requests. See
  2739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2740  	// details.
  2741  	ForceSendFields []string `json:"-"`
  2742  	// NullFields is a list of field names (e.g. "Algorithm") to include in API
  2743  	// requests with the JSON null value. By default, fields with empty values are
  2744  	// omitted from API requests. See
  2745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2746  	NullFields []string `json:"-"`
  2747  }
  2748  
  2749  func (s *GoogleCloudMlV1__StudyConfig) MarshalJSON() ([]byte, error) {
  2750  	type NoMethod GoogleCloudMlV1__StudyConfig
  2751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2752  }
  2753  
  2754  // GoogleCloudMlV1__SuggestTrialsMetadata: Metadata field of a
  2755  // google.longrunning.Operation associated with a SuggestTrialsRequest.
  2756  type GoogleCloudMlV1__SuggestTrialsMetadata struct {
  2757  	// ClientId: The identifier of the client that is requesting the suggestion.
  2758  	ClientId string `json:"clientId,omitempty"`
  2759  	// CreateTime: The time operation was submitted.
  2760  	CreateTime string `json:"createTime,omitempty"`
  2761  	// Study: The name of the study that the trial belongs to.
  2762  	Study string `json:"study,omitempty"`
  2763  	// SuggestionCount: The number of suggestions requested.
  2764  	SuggestionCount int64 `json:"suggestionCount,omitempty"`
  2765  	// ForceSendFields is a list of field names (e.g. "ClientId") to
  2766  	// unconditionally include in API requests. By default, fields with empty or
  2767  	// default values are omitted from API requests. See
  2768  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2769  	// details.
  2770  	ForceSendFields []string `json:"-"`
  2771  	// NullFields is a list of field names (e.g. "ClientId") to include in API
  2772  	// requests with the JSON null value. By default, fields with empty values are
  2773  	// omitted from API requests. See
  2774  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2775  	NullFields []string `json:"-"`
  2776  }
  2777  
  2778  func (s *GoogleCloudMlV1__SuggestTrialsMetadata) MarshalJSON() ([]byte, error) {
  2779  	type NoMethod GoogleCloudMlV1__SuggestTrialsMetadata
  2780  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2781  }
  2782  
  2783  // GoogleCloudMlV1__SuggestTrialsRequest: The request message for the
  2784  // SuggestTrial service method.
  2785  type GoogleCloudMlV1__SuggestTrialsRequest struct {
  2786  	// ClientId: Required. The identifier of the client that is requesting the
  2787  	// suggestion. If multiple SuggestTrialsRequests have the same `client_id`, the
  2788  	// service will return the identical suggested trial if the trial is pending,
  2789  	// and provide a new trial if the last suggested trial was completed.
  2790  	ClientId string `json:"clientId,omitempty"`
  2791  	// SuggestionCount: Required. The number of suggestions requested.
  2792  	SuggestionCount int64 `json:"suggestionCount,omitempty"`
  2793  	// ForceSendFields is a list of field names (e.g. "ClientId") to
  2794  	// unconditionally include in API requests. By default, fields with empty or
  2795  	// default values are omitted from API requests. See
  2796  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2797  	// details.
  2798  	ForceSendFields []string `json:"-"`
  2799  	// NullFields is a list of field names (e.g. "ClientId") to include in API
  2800  	// requests with the JSON null value. By default, fields with empty values are
  2801  	// omitted from API requests. See
  2802  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2803  	NullFields []string `json:"-"`
  2804  }
  2805  
  2806  func (s *GoogleCloudMlV1__SuggestTrialsRequest) MarshalJSON() ([]byte, error) {
  2807  	type NoMethod GoogleCloudMlV1__SuggestTrialsRequest
  2808  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2809  }
  2810  
  2811  // GoogleCloudMlV1__SuggestTrialsResponse: This message will be placed in the
  2812  // response field of a completed google.longrunning.Operation associated with a
  2813  // SuggestTrials request.
  2814  type GoogleCloudMlV1__SuggestTrialsResponse struct {
  2815  	// EndTime: The time at which operation processing completed.
  2816  	EndTime string `json:"endTime,omitempty"`
  2817  	// StartTime: The time at which the operation was started.
  2818  	StartTime string `json:"startTime,omitempty"`
  2819  	// StudyState: The state of the study.
  2820  	//
  2821  	// Possible values:
  2822  	//   "STATE_UNSPECIFIED" - The study state is unspecified.
  2823  	//   "ACTIVE" - The study is active.
  2824  	//   "INACTIVE" - The study is stopped due to an internal error.
  2825  	//   "COMPLETED" - The study is done when the service exhausts the parameter
  2826  	// search space or max_trial_count is reached.
  2827  	StudyState string `json:"studyState,omitempty"`
  2828  	// Trials: A list of trials.
  2829  	Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
  2830  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  2831  	// include in API requests. By default, fields with empty or default values are
  2832  	// omitted from API requests. See
  2833  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2834  	// details.
  2835  	ForceSendFields []string `json:"-"`
  2836  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  2837  	// requests with the JSON null value. By default, fields with empty values are
  2838  	// omitted from API requests. See
  2839  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2840  	NullFields []string `json:"-"`
  2841  }
  2842  
  2843  func (s *GoogleCloudMlV1__SuggestTrialsResponse) MarshalJSON() ([]byte, error) {
  2844  	type NoMethod GoogleCloudMlV1__SuggestTrialsResponse
  2845  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2846  }
  2847  
  2848  // GoogleCloudMlV1__TrainingInput: Represents input parameters for a training
  2849  // job. When using the gcloud command to submit your training job, you can
  2850  // specify the input parameters as command-line arguments and/or in a YAML
  2851  // configuration file referenced from the --config command-line argument. For
  2852  // details, see the guide to submitting a training job
  2853  // (/ai-platform/training/docs/training-jobs).
  2854  type GoogleCloudMlV1__TrainingInput struct {
  2855  	// Args: Optional. Command-line arguments passed to the training application
  2856  	// when it starts. If your job uses a custom container, then the arguments are
  2857  	// passed to the container's `ENTRYPOINT` command.
  2858  	Args []string `json:"args,omitempty"`
  2859  	// EnableWebAccess: Optional. Whether you want AI Platform Training to enable
  2860  	// interactive shell access
  2861  	// (https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell)
  2862  	// to training containers. If set to `true`, you can access interactive shells
  2863  	// at the URIs given by TrainingOutput.web_access_uris or
  2864  	// HyperparameterOutput.web_access_uris (within TrainingOutput.trials).
  2865  	EnableWebAccess bool `json:"enableWebAccess,omitempty"`
  2866  	// EncryptionConfig: Optional. Options for using customer-managed encryption
  2867  	// keys (CMEK) to protect resources created by a training job, instead of using
  2868  	// Google's default encryption. If this is set, then all resources created by
  2869  	// the training job will be encrypted with the customer-managed encryption key
  2870  	// that you specify. Learn how and when to use CMEK with AI Platform Training
  2871  	// (/ai-platform/training/docs/cmek).
  2872  	EncryptionConfig *GoogleCloudMlV1__EncryptionConfig `json:"encryptionConfig,omitempty"`
  2873  	// EvaluatorConfig: Optional. The configuration for evaluators. You should only
  2874  	// set `evaluatorConfig.acceleratorConfig` if `evaluatorType` is set to a
  2875  	// Compute Engine machine type. Learn about restrictions on accelerator
  2876  	// configurations for training.
  2877  	// (/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)
  2878  	//  Set `evaluatorConfig.imageUri` only if you build a custom image for your
  2879  	// evaluator. If `evaluatorConfig.imageUri` has not been set, AI Platform uses
  2880  	// the value of `masterConfig.imageUri`. Learn more about configuring custom
  2881  	// containers (/ai-platform/training/docs/distributed-training-containers).
  2882  	EvaluatorConfig *GoogleCloudMlV1__ReplicaConfig `json:"evaluatorConfig,omitempty"`
  2883  	// EvaluatorCount: Optional. The number of evaluator replicas to use for the
  2884  	// training job. Each replica in the cluster will be of the type specified in
  2885  	// `evaluator_type`. This value can only be used when `scale_tier` is set to
  2886  	// `CUSTOM`. If you set this value, you must also set `evaluator_type`. The
  2887  	// default value is zero.
  2888  	EvaluatorCount int64 `json:"evaluatorCount,omitempty,string"`
  2889  	// EvaluatorType: Optional. Specifies the type of virtual machine to use for
  2890  	// your training job's evaluator nodes. The supported values are the same as
  2891  	// those described in the entry for `masterType`. This value must be consistent
  2892  	// with the category of machine type that `masterType` uses. In other words,
  2893  	// both must be Compute Engine machine types or both must be legacy machine
  2894  	// types. This value must be present when `scaleTier` is set to `CUSTOM` and
  2895  	// `evaluatorCount` is greater than zero.
  2896  	EvaluatorType string `json:"evaluatorType,omitempty"`
  2897  	// Hyperparameters: Optional. The set of Hyperparameters to tune.
  2898  	Hyperparameters *GoogleCloudMlV1__HyperparameterSpec `json:"hyperparameters,omitempty"`
  2899  	// JobDir: Optional. A Google Cloud Storage path in which to store training
  2900  	// outputs and other data needed for training. This path is passed to your
  2901  	// TensorFlow program as the '--job-dir' command-line argument. The benefit of
  2902  	// specifying this field is that Cloud ML validates the path for use in
  2903  	// training.
  2904  	JobDir string `json:"jobDir,omitempty"`
  2905  	// MasterConfig: Optional. The configuration for your master worker. You should
  2906  	// only set `masterConfig.acceleratorConfig` if `masterType` is set to a
  2907  	// Compute Engine machine type. Learn about restrictions on accelerator
  2908  	// configurations for training.
  2909  	// (/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)
  2910  	//  Set `masterConfig.imageUri` only if you build a custom image. Only one of
  2911  	// `masterConfig.imageUri` and `runtimeVersion` should be set. Learn more about
  2912  	// configuring custom containers
  2913  	// (/ai-platform/training/docs/distributed-training-containers).
  2914  	MasterConfig *GoogleCloudMlV1__ReplicaConfig `json:"masterConfig,omitempty"`
  2915  	// MasterType: Optional. Specifies the type of virtual machine to use for your
  2916  	// training job's master worker. You must specify this field when `scaleTier`
  2917  	// is set to `CUSTOM`. You can use certain Compute Engine machine types
  2918  	// directly in this field. See the list of compatible Compute Engine machine
  2919  	// types
  2920  	// (/ai-platform/training/docs/machine-types#compute-engine-machine-types).
  2921  	// Alternatively, you can use the certain legacy machine types in this field.
  2922  	// See the list of legacy machine types
  2923  	// (/ai-platform/training/docs/machine-types#legacy-machine-types). Finally, if
  2924  	// you want to use a TPU for training, specify `cloud_tpu` in this field. Learn
  2925  	// more about the special configuration options for training with TPUs
  2926  	// (/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
  2927  	MasterType string `json:"masterType,omitempty"`
  2928  	// Network: Optional. The full name of the Compute Engine network
  2929  	// (/vpc/docs/vpc) to which the Job is peered. For example,
  2930  	// `projects/12345/global/networks/myVPC`. The format of this field is
  2931  	// `projects/{project}/global/networks/{network}`, where {project} is a project
  2932  	// number (like `12345`) and {network} is network name. Private services access
  2933  	// must already be configured for the network. If left unspecified, the Job is
  2934  	// not peered with any network. Learn about using VPC Network Peering.
  2935  	// (/ai-platform/training/docs/vpc-peering).
  2936  	Network string `json:"network,omitempty"`
  2937  	// PackageUris: Required. The Google Cloud Storage location of the packages
  2938  	// with the training program and any additional dependencies. The maximum
  2939  	// number of package URIs is 100.
  2940  	PackageUris []string `json:"packageUris,omitempty"`
  2941  	// ParameterServerConfig: Optional. The configuration for parameter servers.
  2942  	// You should only set `parameterServerConfig.acceleratorConfig` if
  2943  	// `parameterServerType` is set to a Compute Engine machine type. Learn about
  2944  	// restrictions on accelerator configurations for training.
  2945  	// (/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)
  2946  	//  Set `parameterServerConfig.imageUri` only if you build a custom image for
  2947  	// your parameter server. If `parameterServerConfig.imageUri` has not been set,
  2948  	// AI Platform uses the value of `masterConfig.imageUri`. Learn more about
  2949  	// configuring custom containers
  2950  	// (/ai-platform/training/docs/distributed-training-containers).
  2951  	ParameterServerConfig *GoogleCloudMlV1__ReplicaConfig `json:"parameterServerConfig,omitempty"`
  2952  	// ParameterServerCount: Optional. The number of parameter server replicas to
  2953  	// use for the training job. Each replica in the cluster will be of the type
  2954  	// specified in `parameter_server_type`. This value can only be used when
  2955  	// `scale_tier` is set to `CUSTOM`. If you set this value, you must also set
  2956  	// `parameter_server_type`. The default value is zero.
  2957  	ParameterServerCount int64 `json:"parameterServerCount,omitempty,string"`
  2958  	// ParameterServerType: Optional. Specifies the type of virtual machine to use
  2959  	// for your training job's parameter server. The supported values are the same
  2960  	// as those described in the entry for `master_type`. This value must be
  2961  	// consistent with the category of machine type that `masterType` uses. In
  2962  	// other words, both must be Compute Engine machine types or both must be
  2963  	// legacy machine types. This value must be present when `scaleTier` is set to
  2964  	// `CUSTOM` and `parameter_server_count` is greater than zero.
  2965  	ParameterServerType string `json:"parameterServerType,omitempty"`
  2966  	// PythonModule: Required. The Python module name to run after installing the
  2967  	// packages.
  2968  	PythonModule string `json:"pythonModule,omitempty"`
  2969  	// PythonVersion: Optional. The version of Python used in training. You must
  2970  	// either specify this field or specify `masterConfig.imageUri`. The following
  2971  	// Python versions are available: * Python '3.7' is available when
  2972  	// `runtime_version` is set to '1.15' or later. * Python '3.5' is available
  2973  	// when `runtime_version` is set to a version from '1.4' to '1.14'. * Python
  2974  	// '2.7' is available when `runtime_version` is set to '1.15' or earlier. Read
  2975  	// more about the Python versions available for each runtime version
  2976  	// (/ml-engine/docs/runtime-version-list).
  2977  	PythonVersion string `json:"pythonVersion,omitempty"`
  2978  	// Region: Required. The region to run the training job in. See the available
  2979  	// regions (/ai-platform/training/docs/regions) for AI Platform Training.
  2980  	Region string `json:"region,omitempty"`
  2981  	// RuntimeVersion: Optional. The AI Platform runtime version to use for
  2982  	// training. You must either specify this field or specify
  2983  	// `masterConfig.imageUri`. For more information, see the runtime version list
  2984  	// (/ai-platform/training/docs/runtime-version-list) and learn how to manage
  2985  	// runtime versions (/ai-platform/training/docs/versioning).
  2986  	RuntimeVersion string `json:"runtimeVersion,omitempty"`
  2987  	// ScaleTier: Required. Specifies the machine types, the number of replicas for
  2988  	// workers and parameter servers.
  2989  	//
  2990  	// Possible values:
  2991  	//   "BASIC" - A single worker instance. This tier is suitable for learning how
  2992  	// to use Cloud ML, and for experimenting with new models using small datasets.
  2993  	//   "STANDARD_1" - Many workers and a few parameter servers.
  2994  	//   "PREMIUM_1" - A large number of workers with many parameter servers.
  2995  	//   "BASIC_GPU" - A single worker instance [with a
  2996  	// GPU](/ai-platform/training/docs/using-gpus).
  2997  	//   "BASIC_TPU" - A single worker instance with a [Cloud
  2998  	// TPU](/ml-engine/docs/tensorflow/using-tpus).
  2999  	//   "CUSTOM" - The CUSTOM tier is not a set tier, but rather enables you to
  3000  	// use your own cluster specification. When you use this tier, set values to
  3001  	// configure your processing cluster according to these guidelines: * You
  3002  	// _must_ set `TrainingInput.masterType` to specify the type of machine to use
  3003  	// for your master node. This is the only required setting. * You _may_ set
  3004  	// `TrainingInput.workerCount` to specify the number of workers to use. If you
  3005  	// specify one or more workers, you _must_ also set `TrainingInput.workerType`
  3006  	// to specify the type of machine to use for your worker nodes. * You _may_ set
  3007  	// `TrainingInput.parameterServerCount` to specify the number of parameter
  3008  	// servers to use. If you specify one or more parameter servers, you _must_
  3009  	// also set `TrainingInput.parameterServerType` to specify the type of machine
  3010  	// to use for your parameter servers. Note that all of your workers must use
  3011  	// the same machine type, which can be different from your parameter server
  3012  	// type and master type. Your parameter servers must likewise use the same
  3013  	// machine type, which can be different from your worker type and master type.
  3014  	ScaleTier string `json:"scaleTier,omitempty"`
  3015  	// Scheduling: Optional. Scheduling options for a training job.
  3016  	Scheduling *GoogleCloudMlV1__Scheduling `json:"scheduling,omitempty"`
  3017  	// ServiceAccount: Optional. The email address of a service account to use when
  3018  	// running the training appplication. You must have the
  3019  	// `iam.serviceAccounts.actAs` permission for the specified service account. In
  3020  	// addition, the AI Platform Training Google-managed service account must have
  3021  	// the `roles/iam.serviceAccountAdmin` role for the specified service account.
  3022  	// Learn more about configuring a service account.
  3023  	// (/ai-platform/training/docs/custom-service-account) If not specified, the AI
  3024  	// Platform Training Google-managed service account is used by default.
  3025  	ServiceAccount string `json:"serviceAccount,omitempty"`
  3026  	// UseChiefInTfConfig: Optional. Use `chief` instead of `master` in the
  3027  	// `TF_CONFIG` environment variable when training with a custom container.
  3028  	// Defaults to `false`. Learn more about this field.
  3029  	// (/ai-platform/training/docs/distributed-training-details#chief-versus-master)
  3030  	//  This field has no effect for training jobs that don't use a custom
  3031  	// container.
  3032  	UseChiefInTfConfig bool `json:"useChiefInTfConfig,omitempty"`
  3033  	// WorkerConfig: Optional. The configuration for workers. You should only set
  3034  	// `workerConfig.acceleratorConfig` if `workerType` is set to a Compute Engine
  3035  	// machine type. Learn about restrictions on accelerator configurations for
  3036  	// training.
  3037  	// (/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)
  3038  	//  Set `workerConfig.imageUri` only if you build a custom image for your
  3039  	// worker. If `workerConfig.imageUri` has not been set, AI Platform uses the
  3040  	// value of `masterConfig.imageUri`. Learn more about configuring custom
  3041  	// containers (/ai-platform/training/docs/distributed-training-containers).
  3042  	WorkerConfig *GoogleCloudMlV1__ReplicaConfig `json:"workerConfig,omitempty"`
  3043  	// WorkerCount: Optional. The number of worker replicas to use for the training
  3044  	// job. Each replica in the cluster will be of the type specified in
  3045  	// `worker_type`. This value can only be used when `scale_tier` is set to
  3046  	// `CUSTOM`. If you set this value, you must also set `worker_type`. The
  3047  	// default value is zero.
  3048  	WorkerCount int64 `json:"workerCount,omitempty,string"`
  3049  	// WorkerType: Optional. Specifies the type of virtual machine to use for your
  3050  	// training job's worker nodes. The supported values are the same as those
  3051  	// described in the entry for `masterType`. This value must be consistent with
  3052  	// the category of machine type that `masterType` uses. In other words, both
  3053  	// must be Compute Engine machine types or both must be legacy machine types.
  3054  	// If you use `cloud_tpu` for this value, see special instructions for
  3055  	// configuring a custom TPU machine
  3056  	// (/ml-engine/docs/tensorflow/using-tpus#configuring_a_custom_tpu_machine).
  3057  	// This value must be present when `scaleTier` is set to `CUSTOM` and
  3058  	// `workerCount` is greater than zero.
  3059  	WorkerType string `json:"workerType,omitempty"`
  3060  	// ForceSendFields is a list of field names (e.g. "Args") to unconditionally
  3061  	// include in API requests. By default, fields with empty or default values are
  3062  	// omitted from API requests. See
  3063  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3064  	// details.
  3065  	ForceSendFields []string `json:"-"`
  3066  	// NullFields is a list of field names (e.g. "Args") to include in API requests
  3067  	// with the JSON null value. By default, fields with empty values are omitted
  3068  	// from API requests. See
  3069  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3070  	NullFields []string `json:"-"`
  3071  }
  3072  
  3073  func (s *GoogleCloudMlV1__TrainingInput) MarshalJSON() ([]byte, error) {
  3074  	type NoMethod GoogleCloudMlV1__TrainingInput
  3075  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3076  }
  3077  
  3078  // GoogleCloudMlV1__TrainingOutput: Represents results of a training job.
  3079  // Output only.
  3080  type GoogleCloudMlV1__TrainingOutput struct {
  3081  	// BuiltInAlgorithmOutput: Details related to built-in algorithms jobs. Only
  3082  	// set for built-in algorithms jobs.
  3083  	BuiltInAlgorithmOutput *GoogleCloudMlV1__BuiltInAlgorithmOutput `json:"builtInAlgorithmOutput,omitempty"`
  3084  	// CompletedTrialCount: The number of hyperparameter tuning trials that
  3085  	// completed successfully. Only set for hyperparameter tuning jobs.
  3086  	CompletedTrialCount int64 `json:"completedTrialCount,omitempty,string"`
  3087  	// ConsumedMLUnits: The amount of ML units consumed by the job.
  3088  	ConsumedMLUnits float64 `json:"consumedMLUnits,omitempty"`
  3089  	// HyperparameterMetricTag: The TensorFlow summary tag name used for optimizing
  3090  	// hyperparameter tuning trials. See
  3091  	// `HyperparameterSpec.hyperparameterMetricTag`
  3092  	// (#HyperparameterSpec.FIELDS.hyperparameter_metric_tag) for more information.
  3093  	// Only set for hyperparameter tuning jobs.
  3094  	HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"`
  3095  	// IsBuiltInAlgorithmJob: Whether this job is a built-in Algorithm job.
  3096  	IsBuiltInAlgorithmJob bool `json:"isBuiltInAlgorithmJob,omitempty"`
  3097  	// IsHyperparameterTuningJob: Whether this job is a hyperparameter tuning job.
  3098  	IsHyperparameterTuningJob bool `json:"isHyperparameterTuningJob,omitempty"`
  3099  	// Trials: Results for individual Hyperparameter trials. Only set for
  3100  	// hyperparameter tuning jobs.
  3101  	Trials []*GoogleCloudMlV1__HyperparameterOutput `json:"trials,omitempty"`
  3102  	// WebAccessUris: Output only. URIs for accessing interactive shells
  3103  	// (https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell)
  3104  	// (one URI for each training node). Only available if
  3105  	// training_input.enable_web_access is `true`. The keys are names of each node
  3106  	// in the training job; for example, `master-replica-0` for the master node,
  3107  	// `worker-replica-0` for the first worker, and `ps-replica-0` for the first
  3108  	// parameter server. The values are the URIs for each node's interactive shell.
  3109  	WebAccessUris map[string]string `json:"webAccessUris,omitempty"`
  3110  	// ForceSendFields is a list of field names (e.g. "BuiltInAlgorithmOutput") to
  3111  	// unconditionally include in API requests. By default, fields with empty or
  3112  	// default values are omitted from API requests. See
  3113  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3114  	// details.
  3115  	ForceSendFields []string `json:"-"`
  3116  	// NullFields is a list of field names (e.g. "BuiltInAlgorithmOutput") to
  3117  	// include in API requests with the JSON null value. By default, fields with
  3118  	// empty values are omitted from API requests. See
  3119  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3120  	NullFields []string `json:"-"`
  3121  }
  3122  
  3123  func (s *GoogleCloudMlV1__TrainingOutput) MarshalJSON() ([]byte, error) {
  3124  	type NoMethod GoogleCloudMlV1__TrainingOutput
  3125  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3126  }
  3127  
  3128  func (s *GoogleCloudMlV1__TrainingOutput) UnmarshalJSON(data []byte) error {
  3129  	type NoMethod GoogleCloudMlV1__TrainingOutput
  3130  	var s1 struct {
  3131  		ConsumedMLUnits gensupport.JSONFloat64 `json:"consumedMLUnits"`
  3132  		*NoMethod
  3133  	}
  3134  	s1.NoMethod = (*NoMethod)(s)
  3135  	if err := json.Unmarshal(data, &s1); err != nil {
  3136  		return err
  3137  	}
  3138  	s.ConsumedMLUnits = float64(s1.ConsumedMLUnits)
  3139  	return nil
  3140  }
  3141  
  3142  // GoogleCloudMlV1__Trial: A message representing a trial.
  3143  type GoogleCloudMlV1__Trial struct {
  3144  	// ClientId: Output only. The identifier of the client that originally
  3145  	// requested this trial.
  3146  	ClientId string `json:"clientId,omitempty"`
  3147  	// EndTime: Output only. Time at which the trial's status changed to COMPLETED.
  3148  	EndTime string `json:"endTime,omitempty"`
  3149  	// FinalMeasurement: The final measurement containing the objective value.
  3150  	FinalMeasurement *GoogleCloudMlV1__Measurement `json:"finalMeasurement,omitempty"`
  3151  	// InfeasibleReason: Output only. A human readable string describing why the
  3152  	// trial is infeasible. This should only be set if trial_infeasible is true.
  3153  	InfeasibleReason string `json:"infeasibleReason,omitempty"`
  3154  	// Measurements: A list of measurements that are strictly lexicographically
  3155  	// ordered by their induced tuples (steps, elapsed_time). These are used for
  3156  	// early stopping computations.
  3157  	Measurements []*GoogleCloudMlV1__Measurement `json:"measurements,omitempty"`
  3158  	// Name: Output only. Name of the trial assigned by the service.
  3159  	Name string `json:"name,omitempty"`
  3160  	// Parameters: The parameters of the trial.
  3161  	Parameters []*GoogleCloudMlV1TrialParameter `json:"parameters,omitempty"`
  3162  	// StartTime: Output only. Time at which the trial was started.
  3163  	StartTime string `json:"startTime,omitempty"`
  3164  	// State: The detailed state of a trial.
  3165  	//
  3166  	// Possible values:
  3167  	//   "STATE_UNSPECIFIED" - The trial state is unspecified.
  3168  	//   "REQUESTED" - Indicates that a specific trial has been requested, but it
  3169  	// has not yet been suggested by the service.
  3170  	//   "ACTIVE" - Indicates that the trial has been suggested.
  3171  	//   "COMPLETED" - Indicates that the trial is done, and either has a
  3172  	// final_measurement set, or is marked as trial_infeasible.
  3173  	//   "STOPPING" - Indicates that the trial should stop according to the
  3174  	// service.
  3175  	State string `json:"state,omitempty"`
  3176  	// TrialInfeasible: Output only. If true, the parameters in this trial are not
  3177  	// attempted again.
  3178  	TrialInfeasible bool `json:"trialInfeasible,omitempty"`
  3179  
  3180  	// ServerResponse contains the HTTP response code and headers from the server.
  3181  	googleapi.ServerResponse `json:"-"`
  3182  	// ForceSendFields is a list of field names (e.g. "ClientId") to
  3183  	// unconditionally include in API requests. By default, fields with empty or
  3184  	// default values are omitted from API requests. See
  3185  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3186  	// details.
  3187  	ForceSendFields []string `json:"-"`
  3188  	// NullFields is a list of field names (e.g. "ClientId") to include in API
  3189  	// requests with the JSON null value. By default, fields with empty values are
  3190  	// omitted from API requests. See
  3191  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3192  	NullFields []string `json:"-"`
  3193  }
  3194  
  3195  func (s *GoogleCloudMlV1__Trial) MarshalJSON() ([]byte, error) {
  3196  	type NoMethod GoogleCloudMlV1__Trial
  3197  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3198  }
  3199  
  3200  // GoogleCloudMlV1__Version: Represents a version of the model. Each version is
  3201  // a trained model deployed in the cloud, ready to handle prediction requests.
  3202  // A model can have multiple versions. You can get information about all of the
  3203  // versions of a given model by calling projects.models.versions.list.
  3204  type GoogleCloudMlV1__Version struct {
  3205  	// AcceleratorConfig: Optional. Accelerator config for using GPUs for online
  3206  	// prediction (beta). Only specify this field if you have specified a Compute
  3207  	// Engine (N1) machine type in the `machineType` field. Learn more about using
  3208  	// GPUs for online prediction
  3209  	// (/ml-engine/docs/machine-types-online-prediction#gpus).
  3210  	AcceleratorConfig *GoogleCloudMlV1__AcceleratorConfig `json:"acceleratorConfig,omitempty"`
  3211  	// AutoScaling: Automatically scale the number of nodes used to serve the model
  3212  	// in response to increases and decreases in traffic. Care should be taken to
  3213  	// ramp up traffic according to the model's ability to scale or you will start
  3214  	// seeing increases in latency and 429 response codes.
  3215  	AutoScaling *GoogleCloudMlV1__AutoScaling `json:"autoScaling,omitempty"`
  3216  	// Container: Optional. Specifies a custom container to use for serving
  3217  	// predictions. If you specify this field, then `machineType` is required. If
  3218  	// you specify this field, then `deploymentUri` is optional. If you specify
  3219  	// this field, then you must not specify `runtimeVersion`, `packageUris`,
  3220  	// `framework`, `pythonVersion`, or `predictionClass`.
  3221  	Container *GoogleCloudMlV1__ContainerSpec `json:"container,omitempty"`
  3222  	// CreateTime: Output only. The time the version was created.
  3223  	CreateTime string `json:"createTime,omitempty"`
  3224  	// DeploymentUri: The Cloud Storage URI of a directory containing trained model
  3225  	// artifacts to be used to create the model version. See the guide to deploying
  3226  	// models (/ai-platform/prediction/docs/deploying-models) for more information.
  3227  	// The total number of files under this directory must not exceed 1000. During
  3228  	// projects.models.versions.create, AI Platform Prediction copies all files
  3229  	// from the specified directory to a location managed by the service. From then
  3230  	// on, AI Platform Prediction uses these copies of the model artifacts to serve
  3231  	// predictions, not the original files in Cloud Storage, so this location is
  3232  	// useful only as a historical record. If you specify container, then this
  3233  	// field is optional. Otherwise, it is required. Learn how to use this field
  3234  	// with a custom container
  3235  	// (/ai-platform/prediction/docs/custom-container-requirements#artifacts).
  3236  	DeploymentUri string `json:"deploymentUri,omitempty"`
  3237  	// Description: Optional. The description specified for the version when it was
  3238  	// created.
  3239  	Description string `json:"description,omitempty"`
  3240  	// ErrorMessage: Output only. The details of a failure or a cancellation.
  3241  	ErrorMessage string `json:"errorMessage,omitempty"`
  3242  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  3243  	// prevent simultaneous updates of a model from overwriting each other. It is
  3244  	// strongly suggested that systems make use of the `etag` in the
  3245  	// read-modify-write cycle to perform model updates in order to avoid race
  3246  	// conditions: An `etag` is returned in the response to `GetVersion`, and
  3247  	// systems are expected to put that etag in the request to `UpdateVersion` to
  3248  	// ensure that their change will be applied to the model as intended.
  3249  	Etag string `json:"etag,omitempty"`
  3250  	// ExplanationConfig: Optional. Configures explainability features on the
  3251  	// model's version. Some explanation features require additional metadata to be
  3252  	// loaded as part of the model payload.
  3253  	ExplanationConfig *GoogleCloudMlV1__ExplanationConfig `json:"explanationConfig,omitempty"`
  3254  	// Framework: Optional. The machine learning framework AI Platform uses to
  3255  	// train this version of the model. Valid values are `TENSORFLOW`,
  3256  	// `SCIKIT_LEARN`, `XGBOOST`. If you do not specify a framework, AI Platform
  3257  	// will analyze files in the deployment_uri to determine a framework. If you
  3258  	// choose `SCIKIT_LEARN` or `XGBOOST`, you must also set the runtime version of
  3259  	// the model to 1.4 or greater. Do **not** specify a framework if you're
  3260  	// deploying a custom prediction routine
  3261  	// (/ai-platform/prediction/docs/custom-prediction-routines) or if you're using
  3262  	// a custom container (/ai-platform/prediction/docs/use-custom-container).
  3263  	//
  3264  	// Possible values:
  3265  	//   "FRAMEWORK_UNSPECIFIED" - Unspecified framework. Assigns a value based on
  3266  	// the file suffix.
  3267  	//   "TENSORFLOW" - Tensorflow framework.
  3268  	//   "SCIKIT_LEARN" - Scikit-learn framework.
  3269  	//   "XGBOOST" - XGBoost framework.
  3270  	Framework string `json:"framework,omitempty"`
  3271  	// IsDefault: Output only. If true, this version will be used to handle
  3272  	// prediction requests that do not specify a version. You can change the
  3273  	// default version by calling projects.methods.versions.setDefault.
  3274  	IsDefault bool `json:"isDefault,omitempty"`
  3275  	// Labels: Optional. One or more labels that you can add, to organize your
  3276  	// model versions. Each label is a key-value pair, where both the key and the
  3277  	// value are arbitrary strings that you supply. For more information, see the
  3278  	// documentation on using labels. Note that this field is not updatable for
  3279  	// mls1* models.
  3280  	Labels map[string]string `json:"labels,omitempty"`
  3281  	// LastMigrationModelId: Output only. The AI Platform (Unified) `Model`
  3282  	// (https://cloud.google.com/ai-platform-unified/docs/reference/rest/v1beta1/projects.locations.models)
  3283  	// ID for the last model migration
  3284  	// (https://cloud.google.com/ai-platform-unified/docs/start/migrating-to-ai-platform-unified).
  3285  	LastMigrationModelId string `json:"lastMigrationModelId,omitempty"`
  3286  	// LastMigrationTime: Output only. The last time this version was successfully
  3287  	// migrated to AI Platform (Unified)
  3288  	// (https://cloud.google.com/ai-platform-unified/docs/start/migrating-to-ai-platform-unified).
  3289  	LastMigrationTime string `json:"lastMigrationTime,omitempty"`
  3290  	// LastUseTime: Output only. The time the version was last used for prediction.
  3291  	LastUseTime string `json:"lastUseTime,omitempty"`
  3292  	// MachineType: Optional. The type of machine on which to serve the model.
  3293  	// Currently only applies to online prediction service. To learn about valid
  3294  	// values for this field, read Choosing a machine type for online prediction
  3295  	// (/ai-platform/prediction/docs/machine-types-online-prediction). If this
  3296  	// field is not specified and you are using a regional endpoint
  3297  	// (/ai-platform/prediction/docs/regional-endpoints), then the machine type
  3298  	// defaults to `n1-standard-2`. If this field is not specified and you are
  3299  	// using the global endpoint (`ml.googleapis.com`), then the machine type
  3300  	// defaults to `mls1-c1-m2`.
  3301  	MachineType string `json:"machineType,omitempty"`
  3302  	// ManualScaling: Manually select the number of nodes to use for serving the
  3303  	// model. You should generally use `auto_scaling` with an appropriate
  3304  	// `min_nodes` instead, but this option is available if you want more
  3305  	// predictable billing. Beware that latency and error rates will increase if
  3306  	// the traffic exceeds that capability of the system to serve it based on the
  3307  	// selected number of nodes.
  3308  	ManualScaling *GoogleCloudMlV1__ManualScaling `json:"manualScaling,omitempty"`
  3309  	// Name: Required. The name specified for the version when it was created. The
  3310  	// version name must be unique within the model it is created in.
  3311  	Name string `json:"name,omitempty"`
  3312  	// PackageUris: Optional. Cloud Storage paths (`gs://…`) of packages for
  3313  	// custom prediction routines
  3314  	// (/ml-engine/docs/tensorflow/custom-prediction-routines) or scikit-learn
  3315  	// pipelines with custom code
  3316  	// (/ml-engine/docs/scikit/exporting-for-prediction#custom-pipeline-code). For
  3317  	// a custom prediction routine, one of these packages must contain your
  3318  	// Predictor class (see `predictionClass` (#Version.FIELDS.prediction_class)).
  3319  	// Additionally, include any dependencies used by your Predictor or
  3320  	// scikit-learn pipeline uses that are not already included in your selected
  3321  	// runtime version (/ml-engine/docs/tensorflow/runtime-version-list). If you
  3322  	// specify this field, you must also set `runtimeVersion`
  3323  	// (#Version.FIELDS.runtime_version) to 1.4 or greater.
  3324  	PackageUris []string `json:"packageUris,omitempty"`
  3325  	// PredictionClass: Optional. The fully qualified name (module_name.class_name)
  3326  	// of a class that implements the Predictor interface described in this
  3327  	// reference field. The module containing this class should be included in a
  3328  	// package provided to the `packageUris` field (#Version.FIELDS.package_uris).
  3329  	// Specify this field if and only if you are deploying a custom prediction
  3330  	// routine (beta) (/ml-engine/docs/tensorflow/custom-prediction-routines). If
  3331  	// you specify this field, you must set `runtimeVersion`
  3332  	// (#Version.FIELDS.runtime_version) to 1.4 or greater and you must set
  3333  	// `machineType` to a legacy (MLS1) machine type
  3334  	// (/ml-engine/docs/machine-types-online-prediction). The following code sample
  3335  	// provides the Predictor interface: class Predictor(object): """Interface for
  3336  	// constructing custom predictors.""" def predict(self, instances, **kwargs):
  3337  	// """Performs custom prediction. Instances are the decoded values from the
  3338  	// request. They have already been deserialized from JSON. Args: instances: A
  3339  	// list of prediction input instances. **kwargs: A dictionary of keyword args
  3340  	// provided as additional fields on the predict request body. Returns: A list
  3341  	// of outputs containing the prediction results. This list must be JSON
  3342  	// serializable. """ raise NotImplementedError() @classmethod def
  3343  	// from_path(cls, model_dir): """Creates an instance of Predictor using the
  3344  	// given path. Loading of the predictor should be done in this method. Args:
  3345  	// model_dir: The local directory that contains the exported model file along
  3346  	// with any additional files uploaded when creating the version resource.
  3347  	// Returns: An instance implementing this Predictor class. """ raise
  3348  	// NotImplementedError() Learn more about the Predictor interface and custom
  3349  	// prediction routines (/ml-engine/docs/tensorflow/custom-prediction-routines).
  3350  	PredictionClass string `json:"predictionClass,omitempty"`
  3351  	// PythonVersion: Required. The version of Python used in prediction. The
  3352  	// following Python versions are available: * Python '3.7' is available when
  3353  	// `runtime_version` is set to '1.15' or later. * Python '3.5' is available
  3354  	// when `runtime_version` is set to a version from '1.4' to '1.14'. * Python
  3355  	// '2.7' is available when `runtime_version` is set to '1.15' or earlier. Read
  3356  	// more about the Python versions available for each runtime version
  3357  	// (/ml-engine/docs/runtime-version-list).
  3358  	PythonVersion string `json:"pythonVersion,omitempty"`
  3359  	// RequestLoggingConfig: Optional. *Only* specify this field in a
  3360  	// projects.models.versions.patch request. Specifying it in a
  3361  	// projects.models.versions.create request has no effect. Configures the
  3362  	// request-response pair logging on predictions from this Version.
  3363  	RequestLoggingConfig *GoogleCloudMlV1__RequestLoggingConfig `json:"requestLoggingConfig,omitempty"`
  3364  	// Routes: Optional. Specifies paths on a custom container's HTTP server where
  3365  	// AI Platform Prediction sends certain requests. If you specify this field,
  3366  	// then you must also specify the `container` field. If you specify the
  3367  	// `container` field and do not specify this field, it defaults to the
  3368  	// following: ```json { "predict": "/v1/models/MODEL/versions/VERSION:predict",
  3369  	// "health": "/v1/models/MODEL/versions/VERSION" } ``` See RouteMap for more
  3370  	// details about these default values.
  3371  	Routes *GoogleCloudMlV1__RouteMap `json:"routes,omitempty"`
  3372  	// RuntimeVersion: Required. The AI Platform runtime version to use for this
  3373  	// deployment. For more information, see the runtime version list
  3374  	// (/ml-engine/docs/runtime-version-list) and how to manage runtime versions
  3375  	// (/ml-engine/docs/versioning).
  3376  	RuntimeVersion string `json:"runtimeVersion,omitempty"`
  3377  	// ServiceAccount: Optional. Specifies the service account for resource access
  3378  	// control. If you specify this field, then you must also specify either the
  3379  	// `containerSpec` or the `predictionClass` field. Learn more about using a
  3380  	// custom service account
  3381  	// (/ai-platform/prediction/docs/custom-service-account).
  3382  	ServiceAccount string `json:"serviceAccount,omitempty"`
  3383  	// State: Output only. The state of a version.
  3384  	//
  3385  	// Possible values:
  3386  	//   "UNKNOWN" - The version state is unspecified.
  3387  	//   "READY" - The version is ready for prediction.
  3388  	//   "CREATING" - The version is being created. New UpdateVersion and
  3389  	// DeleteVersion requests will fail if a version is in the CREATING state.
  3390  	//   "FAILED" - The version failed to be created, possibly cancelled.
  3391  	// `error_message` should contain the details of the failure.
  3392  	//   "DELETING" - The version is being deleted. New UpdateVersion and
  3393  	// DeleteVersion requests will fail if a version is in the DELETING state.
  3394  	//   "UPDATING" - The version is being updated. New UpdateVersion and
  3395  	// DeleteVersion requests will fail if a version is in the UPDATING state.
  3396  	State string `json:"state,omitempty"`
  3397  
  3398  	// ServerResponse contains the HTTP response code and headers from the server.
  3399  	googleapi.ServerResponse `json:"-"`
  3400  	// ForceSendFields is a list of field names (e.g. "AcceleratorConfig") to
  3401  	// unconditionally include in API requests. By default, fields with empty or
  3402  	// default values are omitted from API requests. See
  3403  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3404  	// details.
  3405  	ForceSendFields []string `json:"-"`
  3406  	// NullFields is a list of field names (e.g. "AcceleratorConfig") to include in
  3407  	// API requests with the JSON null value. By default, fields with empty values
  3408  	// are omitted from API requests. See
  3409  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3410  	NullFields []string `json:"-"`
  3411  }
  3412  
  3413  func (s *GoogleCloudMlV1__Version) MarshalJSON() ([]byte, error) {
  3414  	type NoMethod GoogleCloudMlV1__Version
  3415  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3416  }
  3417  
  3418  // GoogleCloudMlV1__XraiAttribution: Attributes credit by computing the XRAI
  3419  // taking advantage of the model's fully differentiable structure. Refer to
  3420  // this paper for more details: https://arxiv.org/abs/1906.02825 Currently only
  3421  // implemented for models with natural image inputs.
  3422  type GoogleCloudMlV1__XraiAttribution struct {
  3423  	// NumIntegralSteps: Number of steps for approximating the path integral. A
  3424  	// good value to start is 50 and gradually increase until the sum to diff
  3425  	// property is met within the desired error range.
  3426  	NumIntegralSteps int64 `json:"numIntegralSteps,omitempty"`
  3427  	// ForceSendFields is a list of field names (e.g. "NumIntegralSteps") to
  3428  	// unconditionally include in API requests. By default, fields with empty or
  3429  	// default values are omitted from API requests. See
  3430  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3431  	// details.
  3432  	ForceSendFields []string `json:"-"`
  3433  	// NullFields is a list of field names (e.g. "NumIntegralSteps") to include in
  3434  	// API requests with the JSON null value. By default, fields with empty values
  3435  	// are omitted from API requests. See
  3436  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3437  	NullFields []string `json:"-"`
  3438  }
  3439  
  3440  func (s *GoogleCloudMlV1__XraiAttribution) MarshalJSON() ([]byte, error) {
  3441  	type NoMethod GoogleCloudMlV1__XraiAttribution
  3442  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3443  }
  3444  
  3445  // GoogleIamV1__AuditConfig: Specifies the audit configuration for a service.
  3446  // The configuration determines which permission types are logged, and what
  3447  // identities, if any, are exempted from logging. An AuditConfig must have one
  3448  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
  3449  // and a specific service, the union of the two AuditConfigs is used for that
  3450  // service: the log_types specified in each AuditConfig are enabled, and the
  3451  // exempted_members in each AuditLogConfig are exempted. Example Policy with
  3452  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
  3453  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
  3454  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
  3455  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
  3456  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
  3457  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
  3458  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
  3459  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
  3460  // `aliya@example.com` from DATA_WRITE logging.
  3461  type GoogleIamV1__AuditConfig struct {
  3462  	// AuditLogConfigs: The configuration for logging of each type of permission.
  3463  	AuditLogConfigs []*GoogleIamV1__AuditLogConfig `json:"auditLogConfigs,omitempty"`
  3464  	// Service: Specifies a service that will be enabled for audit logging. For
  3465  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
  3466  	// is a special value that covers all services.
  3467  	Service string `json:"service,omitempty"`
  3468  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  3469  	// unconditionally include in API requests. By default, fields with empty or
  3470  	// default values are omitted from API requests. See
  3471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3472  	// details.
  3473  	ForceSendFields []string `json:"-"`
  3474  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
  3475  	// API requests with the JSON null value. By default, fields with empty values
  3476  	// are omitted from API requests. See
  3477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3478  	NullFields []string `json:"-"`
  3479  }
  3480  
  3481  func (s *GoogleIamV1__AuditConfig) MarshalJSON() ([]byte, error) {
  3482  	type NoMethod GoogleIamV1__AuditConfig
  3483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3484  }
  3485  
  3486  // GoogleIamV1__AuditLogConfig: Provides the configuration for logging a type
  3487  // of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
  3488  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
  3489  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  3490  // exempting jose@example.com from DATA_READ logging.
  3491  type GoogleIamV1__AuditLogConfig struct {
  3492  	// ExemptedMembers: Specifies the identities that do not cause logging for this
  3493  	// type of permission. Follows the same format of Binding.members.
  3494  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  3495  	// LogType: The log type that this config enables.
  3496  	//
  3497  	// Possible values:
  3498  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  3499  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  3500  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  3501  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
  3502  	LogType string `json:"logType,omitempty"`
  3503  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  3504  	// unconditionally include in API requests. By default, fields with empty or
  3505  	// default values are omitted from API requests. See
  3506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3507  	// details.
  3508  	ForceSendFields []string `json:"-"`
  3509  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
  3510  	// API requests with the JSON null value. By default, fields with empty values
  3511  	// are omitted from API requests. See
  3512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3513  	NullFields []string `json:"-"`
  3514  }
  3515  
  3516  func (s *GoogleIamV1__AuditLogConfig) MarshalJSON() ([]byte, error) {
  3517  	type NoMethod GoogleIamV1__AuditLogConfig
  3518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3519  }
  3520  
  3521  // GoogleIamV1__Binding: Associates `members`, or principals, with a `role`.
  3522  type GoogleIamV1__Binding struct {
  3523  	// Condition: The condition that is associated with this binding. If the
  3524  	// condition evaluates to `true`, then this binding applies to the current
  3525  	// request. If the condition evaluates to `false`, then this binding does not
  3526  	// apply to the current request. However, a different role binding might grant
  3527  	// the same role to one or more of the principals in this binding. To learn
  3528  	// which resources support conditions in their IAM policies, see the IAM
  3529  	// documentation
  3530  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  3531  	Condition *GoogleType__Expr `json:"condition,omitempty"`
  3532  	// Members: Specifies the principals requesting access for a Google Cloud
  3533  	// resource. `members` can have the following values: * `allUsers`: A special
  3534  	// identifier that represents anyone who is on the internet; with or without a
  3535  	// Google account. * `allAuthenticatedUsers`: A special identifier that
  3536  	// represents anyone who is authenticated with a Google account or a service
  3537  	// account. Does not include identities that come from external identity
  3538  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
  3539  	// address that represents a specific Google account. For example,
  3540  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
  3541  	// represents a Google service account. For example,
  3542  	// `my-other-app@appspot.gserviceaccount.com`. *
  3543  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
  3544  	// identifier for a Kubernetes service account
  3545  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
  3546  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
  3547  	// `group:{emailid}`: An email address that represents a Google group. For
  3548  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
  3549  	// (primary) that represents all the users of that domain. For example,
  3550  	// `google.com` or `example.com`. *
  3551  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
  3552  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
  3553  	// pool. *
  3554  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  3555  	// group/{group_id}`: All workforce identities in a group. *
  3556  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  3557  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
  3558  	// a specific attribute value. *
  3559  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  3560  	// *`: All identities in a workforce identity pool. *
  3561  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
  3562  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
  3563  	// identity in a workload identity pool. *
  3564  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  3565  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
  3566  	// group. *
  3567  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  3568  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
  3569  	// `: All identities in a workload identity pool with a certain attribute. *
  3570  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  3571  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
  3572  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
  3573  	// unique identifier) representing a user that has been recently deleted. For
  3574  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
  3575  	// recovered, this value reverts to `user:{emailid}` and the recovered user
  3576  	// retains the role in the binding. *
  3577  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
  3578  	// unique identifier) representing a service account that has been recently
  3579  	// deleted. For example,
  3580  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
  3581  	// service account is undeleted, this value reverts to
  3582  	// `serviceAccount:{emailid}` and the undeleted service account retains the
  3583  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
  3584  	// address (plus unique identifier) representing a Google group that has been
  3585  	// recently deleted. For example,
  3586  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
  3587  	// this value reverts to `group:{emailid}` and the recovered group retains the
  3588  	// role in the binding. *
  3589  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
  3590  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
  3591  	// workforce identity pool. For example,
  3592  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
  3593  	// ol-id/subject/my-subject-attribute-value`.
  3594  	Members []string `json:"members,omitempty"`
  3595  	// Role: Role that is assigned to the list of `members`, or principals. For
  3596  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
  3597  	// of the IAM roles and permissions, see the IAM documentation
  3598  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
  3599  	// available pre-defined roles, see here
  3600  	// (https://cloud.google.com/iam/docs/understanding-roles).
  3601  	Role string `json:"role,omitempty"`
  3602  	// ForceSendFields is a list of field names (e.g. "Condition") to
  3603  	// unconditionally include in API requests. By default, fields with empty or
  3604  	// default values are omitted from API requests. See
  3605  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3606  	// details.
  3607  	ForceSendFields []string `json:"-"`
  3608  	// NullFields is a list of field names (e.g. "Condition") to include in API
  3609  	// requests with the JSON null value. By default, fields with empty values are
  3610  	// omitted from API requests. See
  3611  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3612  	NullFields []string `json:"-"`
  3613  }
  3614  
  3615  func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) {
  3616  	type NoMethod GoogleIamV1__Binding
  3617  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3618  }
  3619  
  3620  // GoogleIamV1__Policy: An Identity and Access Management (IAM) policy, which
  3621  // specifies access controls for Google Cloud resources. A `Policy` is a
  3622  // collection of `bindings`. A `binding` binds one or more `members`, or
  3623  // principals, to a single `role`. Principals can be user accounts, service
  3624  // accounts, Google groups, and domains (such as G Suite). A `role` is a named
  3625  // list of permissions; each `role` can be an IAM predefined role or a
  3626  // user-created custom role. For some types of Google Cloud resources, a
  3627  // `binding` can also specify a `condition`, which is a logical expression that
  3628  // allows access to a resource only if the expression evaluates to `true`. A
  3629  // condition can add constraints based on attributes of the request, the
  3630  // resource, or both. To learn which resources support conditions in their IAM
  3631  // policies, see the IAM documentation
  3632  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  3633  // example:** ``` { "bindings": [ { "role":
  3634  // "roles/resourcemanager.organizationAdmin", "members": [
  3635  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  3636  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  3637  // "roles/resourcemanager.organizationViewer", "members": [
  3638  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  3639  // "description": "Does not grant access after Sep 2020", "expression":
  3640  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  3641  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  3642  // members: - user:mike@example.com - group:admins@example.com -
  3643  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  3644  // role: roles/resourcemanager.organizationAdmin - members: -
  3645  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  3646  // condition: title: expirable access description: Does not grant access after
  3647  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  3648  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  3649  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  3650  type GoogleIamV1__Policy struct {
  3651  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  3652  	AuditConfigs []*GoogleIamV1__AuditConfig `json:"auditConfigs,omitempty"`
  3653  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  3654  	// Optionally, may specify a `condition` that determines how and when the
  3655  	// `bindings` are applied. Each of the `bindings` must contain at least one
  3656  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  3657  	// up to 250 of these principals can be Google groups. Each occurrence of a
  3658  	// principal counts towards these limits. For example, if the `bindings` grant
  3659  	// 50 different roles to `user:alice@example.com`, and not to any other
  3660  	// principal, then you can add another 1,450 principals to the `bindings` in
  3661  	// the `Policy`.
  3662  	Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"`
  3663  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  3664  	// prevent simultaneous updates of a policy from overwriting each other. It is
  3665  	// strongly suggested that systems make use of the `etag` in the
  3666  	// read-modify-write cycle to perform policy updates in order to avoid race
  3667  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  3668  	// systems are expected to put that etag in the request to `setIamPolicy` to
  3669  	// ensure that their change will be applied to the same version of the policy.
  3670  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  3671  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  3672  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  3673  	// the conditions in the version `3` policy are lost.
  3674  	Etag string `json:"etag,omitempty"`
  3675  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  3676  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  3677  	// affects conditional role bindings must specify version `3`. This requirement
  3678  	// applies to the following operations: * Getting a policy that includes a
  3679  	// conditional role binding * Adding a conditional role binding to a policy *
  3680  	// Changing a conditional role binding in a policy * Removing any role binding,
  3681  	// with or without a condition, from a policy that includes conditions
  3682  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  3683  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  3684  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  3685  	// the conditions in the version `3` policy are lost. If a policy does not
  3686  	// include any conditions, operations on that policy may specify any valid
  3687  	// version or leave the field unset. To learn which resources support
  3688  	// conditions in their IAM policies, see the IAM documentation
  3689  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  3690  	Version int64 `json:"version,omitempty"`
  3691  
  3692  	// ServerResponse contains the HTTP response code and headers from the server.
  3693  	googleapi.ServerResponse `json:"-"`
  3694  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  3695  	// unconditionally include in API requests. By default, fields with empty or
  3696  	// default values are omitted from API requests. See
  3697  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3698  	// details.
  3699  	ForceSendFields []string `json:"-"`
  3700  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  3701  	// requests with the JSON null value. By default, fields with empty values are
  3702  	// omitted from API requests. See
  3703  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3704  	NullFields []string `json:"-"`
  3705  }
  3706  
  3707  func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) {
  3708  	type NoMethod GoogleIamV1__Policy
  3709  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3710  }
  3711  
  3712  // GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  3713  type GoogleIamV1__SetIamPolicyRequest struct {
  3714  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  3715  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  3716  	// policy but certain Google Cloud services (such as Projects) might reject
  3717  	// them.
  3718  	Policy *GoogleIamV1__Policy `json:"policy,omitempty"`
  3719  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  3720  	// modify. Only the fields in the mask will be modified. If no mask is
  3721  	// provided, the following default mask is used: `paths: "bindings, etag"
  3722  	UpdateMask string `json:"updateMask,omitempty"`
  3723  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  3724  	// include in API requests. By default, fields with empty or default values are
  3725  	// omitted from API requests. See
  3726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3727  	// details.
  3728  	ForceSendFields []string `json:"-"`
  3729  	// NullFields is a list of field names (e.g. "Policy") to include in API
  3730  	// requests with the JSON null value. By default, fields with empty values are
  3731  	// omitted from API requests. See
  3732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3733  	NullFields []string `json:"-"`
  3734  }
  3735  
  3736  func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  3737  	type NoMethod GoogleIamV1__SetIamPolicyRequest
  3738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3739  }
  3740  
  3741  // GoogleIamV1__TestIamPermissionsRequest: Request message for
  3742  // `TestIamPermissions` method.
  3743  type GoogleIamV1__TestIamPermissionsRequest struct {
  3744  	// Permissions: The set of permissions to check for the `resource`. Permissions
  3745  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  3746  	// information see IAM Overview
  3747  	// (https://cloud.google.com/iam/docs/overview#permissions).
  3748  	Permissions []string `json:"permissions,omitempty"`
  3749  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3750  	// unconditionally include in API requests. By default, fields with empty or
  3751  	// default values are omitted from API requests. See
  3752  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3753  	// details.
  3754  	ForceSendFields []string `json:"-"`
  3755  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3756  	// requests with the JSON null value. By default, fields with empty values are
  3757  	// omitted from API requests. See
  3758  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3759  	NullFields []string `json:"-"`
  3760  }
  3761  
  3762  func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3763  	type NoMethod GoogleIamV1__TestIamPermissionsRequest
  3764  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3765  }
  3766  
  3767  // GoogleIamV1__TestIamPermissionsResponse: Response message for
  3768  // `TestIamPermissions` method.
  3769  type GoogleIamV1__TestIamPermissionsResponse struct {
  3770  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  3771  	// caller is allowed.
  3772  	Permissions []string `json:"permissions,omitempty"`
  3773  
  3774  	// ServerResponse contains the HTTP response code and headers from the server.
  3775  	googleapi.ServerResponse `json:"-"`
  3776  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3777  	// unconditionally include in API requests. By default, fields with empty or
  3778  	// default values are omitted from API requests. See
  3779  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3780  	// details.
  3781  	ForceSendFields []string `json:"-"`
  3782  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3783  	// requests with the JSON null value. By default, fields with empty values are
  3784  	// omitted from API requests. See
  3785  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3786  	NullFields []string `json:"-"`
  3787  }
  3788  
  3789  func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3790  	type NoMethod GoogleIamV1__TestIamPermissionsResponse
  3791  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3792  }
  3793  
  3794  // GoogleLongrunning__ListOperationsResponse: The response message for
  3795  // Operations.ListOperations.
  3796  type GoogleLongrunning__ListOperationsResponse struct {
  3797  	// NextPageToken: The standard List next-page token.
  3798  	NextPageToken string `json:"nextPageToken,omitempty"`
  3799  	// Operations: A list of operations that matches the specified filter in the
  3800  	// request.
  3801  	Operations []*GoogleLongrunning__Operation `json:"operations,omitempty"`
  3802  
  3803  	// ServerResponse contains the HTTP response code and headers from the server.
  3804  	googleapi.ServerResponse `json:"-"`
  3805  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3806  	// unconditionally include in API requests. By default, fields with empty or
  3807  	// default values are omitted from API requests. See
  3808  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3809  	// details.
  3810  	ForceSendFields []string `json:"-"`
  3811  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3812  	// requests with the JSON null value. By default, fields with empty values are
  3813  	// omitted from API requests. See
  3814  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3815  	NullFields []string `json:"-"`
  3816  }
  3817  
  3818  func (s *GoogleLongrunning__ListOperationsResponse) MarshalJSON() ([]byte, error) {
  3819  	type NoMethod GoogleLongrunning__ListOperationsResponse
  3820  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3821  }
  3822  
  3823  // GoogleLongrunning__Operation: This resource represents a long-running
  3824  // operation that is the result of a network API call.
  3825  type GoogleLongrunning__Operation struct {
  3826  	// Done: If the value is `false`, it means the operation is still in progress.
  3827  	// If `true`, the operation is completed, and either `error` or `response` is
  3828  	// available.
  3829  	Done bool `json:"done,omitempty"`
  3830  	// Error: The error result of the operation in case of failure or cancellation.
  3831  	Error *GoogleRpc__Status `json:"error,omitempty"`
  3832  	// Metadata: Service-specific metadata associated with the operation. It
  3833  	// typically contains progress information and common metadata such as create
  3834  	// time. Some services might not provide such metadata. Any method that returns
  3835  	// a long-running operation should document the metadata type, if any.
  3836  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3837  	// Name: The server-assigned name, which is only unique within the same service
  3838  	// that originally returns it. If you use the default HTTP mapping, the `name`
  3839  	// should be a resource name ending with `operations/{unique_id}`.
  3840  	Name string `json:"name,omitempty"`
  3841  	// Response: The normal, successful response of the operation. If the original
  3842  	// method returns no data on success, such as `Delete`, the response is
  3843  	// `google.protobuf.Empty`. If the original method is standard
  3844  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  3845  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  3846  	// original method name. For example, if the original method name is
  3847  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  3848  	Response googleapi.RawMessage `json:"response,omitempty"`
  3849  
  3850  	// ServerResponse contains the HTTP response code and headers from the server.
  3851  	googleapi.ServerResponse `json:"-"`
  3852  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  3853  	// include in API requests. By default, fields with empty or default values are
  3854  	// omitted from API requests. See
  3855  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3856  	// details.
  3857  	ForceSendFields []string `json:"-"`
  3858  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  3859  	// with the JSON null value. By default, fields with empty values are omitted
  3860  	// from API requests. See
  3861  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3862  	NullFields []string `json:"-"`
  3863  }
  3864  
  3865  func (s *GoogleLongrunning__Operation) MarshalJSON() ([]byte, error) {
  3866  	type NoMethod GoogleLongrunning__Operation
  3867  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3868  }
  3869  
  3870  // GoogleProtobuf__Empty: A generic empty message that you can re-use to avoid
  3871  // defining duplicated empty messages in your APIs. A typical example is to use
  3872  // it as the request or the response type of an API method. For instance:
  3873  // service Foo { rpc Bar(google.protobuf.Empty) returns
  3874  // (google.protobuf.Empty); }
  3875  type GoogleProtobuf__Empty struct {
  3876  	// ServerResponse contains the HTTP response code and headers from the server.
  3877  	googleapi.ServerResponse `json:"-"`
  3878  }
  3879  
  3880  // GoogleRpc__Status: The `Status` type defines a logical error model that is
  3881  // suitable for different programming environments, including REST APIs and RPC
  3882  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  3883  // contains three pieces of data: error code, error message, and error details.
  3884  // You can find out more about this error model and how to work with it in the
  3885  // API Design Guide (https://cloud.google.com/apis/design/errors).
  3886  type GoogleRpc__Status struct {
  3887  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3888  	Code int64 `json:"code,omitempty"`
  3889  	// Details: A list of messages that carry the error details. There is a common
  3890  	// set of message types for APIs to use.
  3891  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3892  	// Message: A developer-facing error message, which should be in English. Any
  3893  	// user-facing error message should be localized and sent in the
  3894  	// google.rpc.Status.details field, or localized by the client.
  3895  	Message string `json:"message,omitempty"`
  3896  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3897  	// include in API requests. By default, fields with empty or default values are
  3898  	// omitted from API requests. See
  3899  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3900  	// details.
  3901  	ForceSendFields []string `json:"-"`
  3902  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3903  	// with the JSON null value. By default, fields with empty values are omitted
  3904  	// from API requests. See
  3905  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3906  	NullFields []string `json:"-"`
  3907  }
  3908  
  3909  func (s *GoogleRpc__Status) MarshalJSON() ([]byte, error) {
  3910  	type NoMethod GoogleRpc__Status
  3911  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3912  }
  3913  
  3914  // GoogleType__Expr: Represents a textual expression in the Common Expression
  3915  // Language (CEL) syntax. CEL is a C-like expression language. The syntax and
  3916  // semantics of CEL are documented at https://github.com/google/cel-spec.
  3917  // Example (Comparison): title: "Summary size limit" description: "Determines
  3918  // if a summary is less than 100 chars" expression: "document.summary.size() <
  3919  // 100" Example (Equality): title: "Requestor is owner" description:
  3920  // "Determines if requestor is the document owner" expression: "document.owner
  3921  // == request.auth.claims.email" Example (Logic): title: "Public documents"
  3922  // description: "Determine whether the document should be publicly visible"
  3923  // expression: "document.type != 'private' && document.type != 'internal'"
  3924  // Example (Data Manipulation): title: "Notification string" description:
  3925  // "Create a notification string with a timestamp." expression: "'New message
  3926  // received at ' + string(document.create_time)" The exact variables and
  3927  // functions that may be referenced within an expression are determined by the
  3928  // service that evaluates it. See the service documentation for additional
  3929  // information.
  3930  type GoogleType__Expr struct {
  3931  	// Description: Optional. Description of the expression. This is a longer text
  3932  	// which describes the expression, e.g. when hovered over it in a UI.
  3933  	Description string `json:"description,omitempty"`
  3934  	// Expression: Textual representation of an expression in Common Expression
  3935  	// Language syntax.
  3936  	Expression string `json:"expression,omitempty"`
  3937  	// Location: Optional. String indicating the location of the expression for
  3938  	// error reporting, e.g. a file name and a position in the file.
  3939  	Location string `json:"location,omitempty"`
  3940  	// Title: Optional. Title for the expression, i.e. a short string describing
  3941  	// its purpose. This can be used e.g. in UIs which allow to enter the
  3942  	// expression.
  3943  	Title string `json:"title,omitempty"`
  3944  	// ForceSendFields is a list of field names (e.g. "Description") to
  3945  	// unconditionally include in API requests. By default, fields with empty or
  3946  	// default values are omitted from API requests. See
  3947  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3948  	// details.
  3949  	ForceSendFields []string `json:"-"`
  3950  	// NullFields is a list of field names (e.g. "Description") to include in API
  3951  	// requests with the JSON null value. By default, fields with empty values are
  3952  	// omitted from API requests. See
  3953  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3954  	NullFields []string `json:"-"`
  3955  }
  3956  
  3957  func (s *GoogleType__Expr) MarshalJSON() ([]byte, error) {
  3958  	type NoMethod GoogleType__Expr
  3959  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3960  }
  3961  
  3962  type ProjectsExplainCall struct {
  3963  	s                               *Service
  3964  	name                            string
  3965  	googlecloudmlv1__explainrequest *GoogleCloudMlV1__ExplainRequest
  3966  	urlParams_                      gensupport.URLParams
  3967  	ctx_                            context.Context
  3968  	header_                         http.Header
  3969  }
  3970  
  3971  // Explain: Performs explanation on the data in the request. {% dynamic include
  3972  // "/ai-platform/includes/___explain-request" %}
  3973  //
  3974  //   - name: The resource name of a model or a version. Authorization: requires
  3975  //     the `predict` permission on the specified resource.
  3976  func (r *ProjectsService) Explain(name string, googlecloudmlv1__explainrequest *GoogleCloudMlV1__ExplainRequest) *ProjectsExplainCall {
  3977  	c := &ProjectsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3978  	c.name = name
  3979  	c.googlecloudmlv1__explainrequest = googlecloudmlv1__explainrequest
  3980  	return c
  3981  }
  3982  
  3983  // Fields allows partial responses to be retrieved. See
  3984  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3985  // details.
  3986  func (c *ProjectsExplainCall) Fields(s ...googleapi.Field) *ProjectsExplainCall {
  3987  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3988  	return c
  3989  }
  3990  
  3991  // Context sets the context to be used in this call's Do method.
  3992  func (c *ProjectsExplainCall) Context(ctx context.Context) *ProjectsExplainCall {
  3993  	c.ctx_ = ctx
  3994  	return c
  3995  }
  3996  
  3997  // Header returns a http.Header that can be modified by the caller to add
  3998  // headers to the request.
  3999  func (c *ProjectsExplainCall) Header() http.Header {
  4000  	if c.header_ == nil {
  4001  		c.header_ = make(http.Header)
  4002  	}
  4003  	return c.header_
  4004  }
  4005  
  4006  func (c *ProjectsExplainCall) doRequest(alt string) (*http.Response, error) {
  4007  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4008  	var body io.Reader = nil
  4009  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__explainrequest)
  4010  	if err != nil {
  4011  		return nil, err
  4012  	}
  4013  	c.urlParams_.Set("alt", alt)
  4014  	c.urlParams_.Set("prettyPrint", "false")
  4015  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:explain")
  4016  	urls += "?" + c.urlParams_.Encode()
  4017  	req, err := http.NewRequest("POST", urls, body)
  4018  	if err != nil {
  4019  		return nil, err
  4020  	}
  4021  	req.Header = reqHeaders
  4022  	googleapi.Expand(req.URL, map[string]string{
  4023  		"name": c.name,
  4024  	})
  4025  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4026  }
  4027  
  4028  // Do executes the "ml.projects.explain" call.
  4029  // Any non-2xx status code is an error. Response headers are in either
  4030  // *GoogleApi__HttpBody.ServerResponse.Header or (if a response was returned at
  4031  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4032  // check whether the returned error was because http.StatusNotModified was
  4033  // returned.
  4034  func (c *ProjectsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, error) {
  4035  	gensupport.SetOptions(c.urlParams_, opts...)
  4036  	res, err := c.doRequest("json")
  4037  	if res != nil && res.StatusCode == http.StatusNotModified {
  4038  		if res.Body != nil {
  4039  			res.Body.Close()
  4040  		}
  4041  		return nil, gensupport.WrapError(&googleapi.Error{
  4042  			Code:   res.StatusCode,
  4043  			Header: res.Header,
  4044  		})
  4045  	}
  4046  	if err != nil {
  4047  		return nil, err
  4048  	}
  4049  	defer googleapi.CloseBody(res)
  4050  	if err := googleapi.CheckResponse(res); err != nil {
  4051  		return nil, gensupport.WrapError(err)
  4052  	}
  4053  	ret := &GoogleApi__HttpBody{
  4054  		ServerResponse: googleapi.ServerResponse{
  4055  			Header:         res.Header,
  4056  			HTTPStatusCode: res.StatusCode,
  4057  		},
  4058  	}
  4059  	target := &ret
  4060  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4061  		return nil, err
  4062  	}
  4063  	return ret, nil
  4064  }
  4065  
  4066  type ProjectsGetConfigCall struct {
  4067  	s            *Service
  4068  	name         string
  4069  	urlParams_   gensupport.URLParams
  4070  	ifNoneMatch_ string
  4071  	ctx_         context.Context
  4072  	header_      http.Header
  4073  }
  4074  
  4075  // GetConfig: Get the service account information associated with your project.
  4076  // You need this information in order to grant the service account permissions
  4077  // for the Google Cloud Storage location where you put your model training code
  4078  // for training the model with Google Cloud Machine Learning.
  4079  //
  4080  // - name: The project name.
  4081  func (r *ProjectsService) GetConfig(name string) *ProjectsGetConfigCall {
  4082  	c := &ProjectsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4083  	c.name = name
  4084  	return c
  4085  }
  4086  
  4087  // Fields allows partial responses to be retrieved. See
  4088  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4089  // details.
  4090  func (c *ProjectsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsGetConfigCall {
  4091  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4092  	return c
  4093  }
  4094  
  4095  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4096  // object's ETag matches the given value. This is useful for getting updates
  4097  // only after the object has changed since the last request.
  4098  func (c *ProjectsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsGetConfigCall {
  4099  	c.ifNoneMatch_ = entityTag
  4100  	return c
  4101  }
  4102  
  4103  // Context sets the context to be used in this call's Do method.
  4104  func (c *ProjectsGetConfigCall) Context(ctx context.Context) *ProjectsGetConfigCall {
  4105  	c.ctx_ = ctx
  4106  	return c
  4107  }
  4108  
  4109  // Header returns a http.Header that can be modified by the caller to add
  4110  // headers to the request.
  4111  func (c *ProjectsGetConfigCall) Header() http.Header {
  4112  	if c.header_ == nil {
  4113  		c.header_ = make(http.Header)
  4114  	}
  4115  	return c.header_
  4116  }
  4117  
  4118  func (c *ProjectsGetConfigCall) doRequest(alt string) (*http.Response, error) {
  4119  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4120  	if c.ifNoneMatch_ != "" {
  4121  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4122  	}
  4123  	var body io.Reader = nil
  4124  	c.urlParams_.Set("alt", alt)
  4125  	c.urlParams_.Set("prettyPrint", "false")
  4126  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getConfig")
  4127  	urls += "?" + c.urlParams_.Encode()
  4128  	req, err := http.NewRequest("GET", urls, body)
  4129  	if err != nil {
  4130  		return nil, err
  4131  	}
  4132  	req.Header = reqHeaders
  4133  	googleapi.Expand(req.URL, map[string]string{
  4134  		"name": c.name,
  4135  	})
  4136  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4137  }
  4138  
  4139  // Do executes the "ml.projects.getConfig" call.
  4140  // Any non-2xx status code is an error. Response headers are in either
  4141  // *GoogleCloudMlV1__GetConfigResponse.ServerResponse.Header or (if a response
  4142  // was returned at all) in error.(*googleapi.Error).Header. Use
  4143  // googleapi.IsNotModified to check whether the returned error was because
  4144  // http.StatusNotModified was returned.
  4145  func (c *ProjectsGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__GetConfigResponse, error) {
  4146  	gensupport.SetOptions(c.urlParams_, opts...)
  4147  	res, err := c.doRequest("json")
  4148  	if res != nil && res.StatusCode == http.StatusNotModified {
  4149  		if res.Body != nil {
  4150  			res.Body.Close()
  4151  		}
  4152  		return nil, gensupport.WrapError(&googleapi.Error{
  4153  			Code:   res.StatusCode,
  4154  			Header: res.Header,
  4155  		})
  4156  	}
  4157  	if err != nil {
  4158  		return nil, err
  4159  	}
  4160  	defer googleapi.CloseBody(res)
  4161  	if err := googleapi.CheckResponse(res); err != nil {
  4162  		return nil, gensupport.WrapError(err)
  4163  	}
  4164  	ret := &GoogleCloudMlV1__GetConfigResponse{
  4165  		ServerResponse: googleapi.ServerResponse{
  4166  			Header:         res.Header,
  4167  			HTTPStatusCode: res.StatusCode,
  4168  		},
  4169  	}
  4170  	target := &ret
  4171  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4172  		return nil, err
  4173  	}
  4174  	return ret, nil
  4175  }
  4176  
  4177  type ProjectsPredictCall struct {
  4178  	s                               *Service
  4179  	name                            string
  4180  	googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest
  4181  	urlParams_                      gensupport.URLParams
  4182  	ctx_                            context.Context
  4183  	header_                         http.Header
  4184  }
  4185  
  4186  // Predict: Performs online prediction on the data in the request. {% dynamic
  4187  // include "/ai-platform/includes/___predict-request" %}
  4188  //
  4189  //   - name: The resource name of a model or a version. Authorization: requires
  4190  //     the `predict` permission on the specified resource.
  4191  func (r *ProjectsService) Predict(name string, googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest) *ProjectsPredictCall {
  4192  	c := &ProjectsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4193  	c.name = name
  4194  	c.googlecloudmlv1__predictrequest = googlecloudmlv1__predictrequest
  4195  	return c
  4196  }
  4197  
  4198  // Fields allows partial responses to be retrieved. See
  4199  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4200  // details.
  4201  func (c *ProjectsPredictCall) Fields(s ...googleapi.Field) *ProjectsPredictCall {
  4202  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4203  	return c
  4204  }
  4205  
  4206  // Context sets the context to be used in this call's Do method.
  4207  func (c *ProjectsPredictCall) Context(ctx context.Context) *ProjectsPredictCall {
  4208  	c.ctx_ = ctx
  4209  	return c
  4210  }
  4211  
  4212  // Header returns a http.Header that can be modified by the caller to add
  4213  // headers to the request.
  4214  func (c *ProjectsPredictCall) Header() http.Header {
  4215  	if c.header_ == nil {
  4216  		c.header_ = make(http.Header)
  4217  	}
  4218  	return c.header_
  4219  }
  4220  
  4221  func (c *ProjectsPredictCall) doRequest(alt string) (*http.Response, error) {
  4222  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4223  	var body io.Reader = nil
  4224  	body = strings.NewReader(c.googlecloudmlv1__predictrequest.HttpBody.Data)
  4225  	c.urlParams_.Set("alt", alt)
  4226  	c.urlParams_.Set("prettyPrint", "false")
  4227  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:predict")
  4228  	urls += "?" + c.urlParams_.Encode()
  4229  	req, err := http.NewRequest("POST", urls, body)
  4230  	if err != nil {
  4231  		return nil, err
  4232  	}
  4233  	req.Header = reqHeaders
  4234  	googleapi.Expand(req.URL, map[string]string{
  4235  		"name": c.name,
  4236  	})
  4237  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4238  }
  4239  
  4240  // Do executes the "ml.projects.predict" call.
  4241  // Any non-2xx status code is an error. Response headers are in either
  4242  // *GoogleApi__HttpBody.ServerResponse.Header or (if a response was returned at
  4243  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4244  // check whether the returned error was because http.StatusNotModified was
  4245  // returned.
  4246  func (c *ProjectsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, error) {
  4247  	gensupport.SetOptions(c.urlParams_, opts...)
  4248  	res, err := c.doRequest("json")
  4249  	if res != nil && res.StatusCode == http.StatusNotModified {
  4250  		if res.Body != nil {
  4251  			res.Body.Close()
  4252  		}
  4253  		return nil, gensupport.WrapError(&googleapi.Error{
  4254  			Code:   res.StatusCode,
  4255  			Header: res.Header,
  4256  		})
  4257  	}
  4258  	if err != nil {
  4259  		return nil, err
  4260  	}
  4261  	defer googleapi.CloseBody(res)
  4262  	if err := googleapi.CheckResponse(res); err != nil {
  4263  		return nil, gensupport.WrapError(err)
  4264  	}
  4265  	ret := &GoogleApi__HttpBody{
  4266  		ServerResponse: googleapi.ServerResponse{
  4267  			Header:         res.Header,
  4268  			HTTPStatusCode: res.StatusCode,
  4269  		},
  4270  	}
  4271  	target := &ret
  4272  	var b bytes.Buffer
  4273  	if _, err := io.Copy(&b, res.Body); err != nil {
  4274  		return nil, err
  4275  	}
  4276  	if err := res.Body.Close(); err != nil {
  4277  		return nil, err
  4278  	}
  4279  	if err := json.NewDecoder(bytes.NewReader(b.Bytes())).Decode(target); err != nil {
  4280  		return nil, err
  4281  	}
  4282  	ret.Data = b.String()
  4283  	return ret, nil
  4284  }
  4285  
  4286  type ProjectsJobsCancelCall struct {
  4287  	s                                 *Service
  4288  	name                              string
  4289  	googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest
  4290  	urlParams_                        gensupport.URLParams
  4291  	ctx_                              context.Context
  4292  	header_                           http.Header
  4293  }
  4294  
  4295  // Cancel: Cancels a running job.
  4296  //
  4297  // - name: The name of the job to cancel.
  4298  func (r *ProjectsJobsService) Cancel(name string, googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest) *ProjectsJobsCancelCall {
  4299  	c := &ProjectsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4300  	c.name = name
  4301  	c.googlecloudmlv1__canceljobrequest = googlecloudmlv1__canceljobrequest
  4302  	return c
  4303  }
  4304  
  4305  // Fields allows partial responses to be retrieved. See
  4306  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4307  // details.
  4308  func (c *ProjectsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsJobsCancelCall {
  4309  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4310  	return c
  4311  }
  4312  
  4313  // Context sets the context to be used in this call's Do method.
  4314  func (c *ProjectsJobsCancelCall) Context(ctx context.Context) *ProjectsJobsCancelCall {
  4315  	c.ctx_ = ctx
  4316  	return c
  4317  }
  4318  
  4319  // Header returns a http.Header that can be modified by the caller to add
  4320  // headers to the request.
  4321  func (c *ProjectsJobsCancelCall) Header() http.Header {
  4322  	if c.header_ == nil {
  4323  		c.header_ = make(http.Header)
  4324  	}
  4325  	return c.header_
  4326  }
  4327  
  4328  func (c *ProjectsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  4329  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4330  	var body io.Reader = nil
  4331  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__canceljobrequest)
  4332  	if err != nil {
  4333  		return nil, err
  4334  	}
  4335  	c.urlParams_.Set("alt", alt)
  4336  	c.urlParams_.Set("prettyPrint", "false")
  4337  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  4338  	urls += "?" + c.urlParams_.Encode()
  4339  	req, err := http.NewRequest("POST", urls, body)
  4340  	if err != nil {
  4341  		return nil, err
  4342  	}
  4343  	req.Header = reqHeaders
  4344  	googleapi.Expand(req.URL, map[string]string{
  4345  		"name": c.name,
  4346  	})
  4347  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4348  }
  4349  
  4350  // Do executes the "ml.projects.jobs.cancel" call.
  4351  // Any non-2xx status code is an error. Response headers are in either
  4352  // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was returned
  4353  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4354  // check whether the returned error was because http.StatusNotModified was
  4355  // returned.
  4356  func (c *ProjectsJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  4357  	gensupport.SetOptions(c.urlParams_, opts...)
  4358  	res, err := c.doRequest("json")
  4359  	if res != nil && res.StatusCode == http.StatusNotModified {
  4360  		if res.Body != nil {
  4361  			res.Body.Close()
  4362  		}
  4363  		return nil, gensupport.WrapError(&googleapi.Error{
  4364  			Code:   res.StatusCode,
  4365  			Header: res.Header,
  4366  		})
  4367  	}
  4368  	if err != nil {
  4369  		return nil, err
  4370  	}
  4371  	defer googleapi.CloseBody(res)
  4372  	if err := googleapi.CheckResponse(res); err != nil {
  4373  		return nil, gensupport.WrapError(err)
  4374  	}
  4375  	ret := &GoogleProtobuf__Empty{
  4376  		ServerResponse: googleapi.ServerResponse{
  4377  			Header:         res.Header,
  4378  			HTTPStatusCode: res.StatusCode,
  4379  		},
  4380  	}
  4381  	target := &ret
  4382  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4383  		return nil, err
  4384  	}
  4385  	return ret, nil
  4386  }
  4387  
  4388  type ProjectsJobsCreateCall struct {
  4389  	s                    *Service
  4390  	parent               string
  4391  	googlecloudmlv1__job *GoogleCloudMlV1__Job
  4392  	urlParams_           gensupport.URLParams
  4393  	ctx_                 context.Context
  4394  	header_              http.Header
  4395  }
  4396  
  4397  // Create: Creates a training or a batch prediction job.
  4398  //
  4399  // - parent: The project name.
  4400  func (r *ProjectsJobsService) Create(parent string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsCreateCall {
  4401  	c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4402  	c.parent = parent
  4403  	c.googlecloudmlv1__job = googlecloudmlv1__job
  4404  	return c
  4405  }
  4406  
  4407  // Fields allows partial responses to be retrieved. See
  4408  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4409  // details.
  4410  func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
  4411  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4412  	return c
  4413  }
  4414  
  4415  // Context sets the context to be used in this call's Do method.
  4416  func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
  4417  	c.ctx_ = ctx
  4418  	return c
  4419  }
  4420  
  4421  // Header returns a http.Header that can be modified by the caller to add
  4422  // headers to the request.
  4423  func (c *ProjectsJobsCreateCall) Header() http.Header {
  4424  	if c.header_ == nil {
  4425  		c.header_ = make(http.Header)
  4426  	}
  4427  	return c.header_
  4428  }
  4429  
  4430  func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  4431  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4432  	var body io.Reader = nil
  4433  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
  4434  	if err != nil {
  4435  		return nil, err
  4436  	}
  4437  	c.urlParams_.Set("alt", alt)
  4438  	c.urlParams_.Set("prettyPrint", "false")
  4439  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
  4440  	urls += "?" + c.urlParams_.Encode()
  4441  	req, err := http.NewRequest("POST", urls, body)
  4442  	if err != nil {
  4443  		return nil, err
  4444  	}
  4445  	req.Header = reqHeaders
  4446  	googleapi.Expand(req.URL, map[string]string{
  4447  		"parent": c.parent,
  4448  	})
  4449  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4450  }
  4451  
  4452  // Do executes the "ml.projects.jobs.create" call.
  4453  // Any non-2xx status code is an error. Response headers are in either
  4454  // *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was returned
  4455  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4456  // check whether the returned error was because http.StatusNotModified was
  4457  // returned.
  4458  func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
  4459  	gensupport.SetOptions(c.urlParams_, opts...)
  4460  	res, err := c.doRequest("json")
  4461  	if res != nil && res.StatusCode == http.StatusNotModified {
  4462  		if res.Body != nil {
  4463  			res.Body.Close()
  4464  		}
  4465  		return nil, gensupport.WrapError(&googleapi.Error{
  4466  			Code:   res.StatusCode,
  4467  			Header: res.Header,
  4468  		})
  4469  	}
  4470  	if err != nil {
  4471  		return nil, err
  4472  	}
  4473  	defer googleapi.CloseBody(res)
  4474  	if err := googleapi.CheckResponse(res); err != nil {
  4475  		return nil, gensupport.WrapError(err)
  4476  	}
  4477  	ret := &GoogleCloudMlV1__Job{
  4478  		ServerResponse: googleapi.ServerResponse{
  4479  			Header:         res.Header,
  4480  			HTTPStatusCode: res.StatusCode,
  4481  		},
  4482  	}
  4483  	target := &ret
  4484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4485  		return nil, err
  4486  	}
  4487  	return ret, nil
  4488  }
  4489  
  4490  type ProjectsJobsGetCall struct {
  4491  	s            *Service
  4492  	name         string
  4493  	urlParams_   gensupport.URLParams
  4494  	ifNoneMatch_ string
  4495  	ctx_         context.Context
  4496  	header_      http.Header
  4497  }
  4498  
  4499  // Get: Describes a job.
  4500  //
  4501  // - name: The name of the job to get the description of.
  4502  func (r *ProjectsJobsService) Get(name string) *ProjectsJobsGetCall {
  4503  	c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4504  	c.name = name
  4505  	return c
  4506  }
  4507  
  4508  // Fields allows partial responses to be retrieved. See
  4509  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4510  // details.
  4511  func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
  4512  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4513  	return c
  4514  }
  4515  
  4516  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4517  // object's ETag matches the given value. This is useful for getting updates
  4518  // only after the object has changed since the last request.
  4519  func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
  4520  	c.ifNoneMatch_ = entityTag
  4521  	return c
  4522  }
  4523  
  4524  // Context sets the context to be used in this call's Do method.
  4525  func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
  4526  	c.ctx_ = ctx
  4527  	return c
  4528  }
  4529  
  4530  // Header returns a http.Header that can be modified by the caller to add
  4531  // headers to the request.
  4532  func (c *ProjectsJobsGetCall) Header() http.Header {
  4533  	if c.header_ == nil {
  4534  		c.header_ = make(http.Header)
  4535  	}
  4536  	return c.header_
  4537  }
  4538  
  4539  func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  4540  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4541  	if c.ifNoneMatch_ != "" {
  4542  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4543  	}
  4544  	var body io.Reader = nil
  4545  	c.urlParams_.Set("alt", alt)
  4546  	c.urlParams_.Set("prettyPrint", "false")
  4547  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4548  	urls += "?" + c.urlParams_.Encode()
  4549  	req, err := http.NewRequest("GET", urls, body)
  4550  	if err != nil {
  4551  		return nil, err
  4552  	}
  4553  	req.Header = reqHeaders
  4554  	googleapi.Expand(req.URL, map[string]string{
  4555  		"name": c.name,
  4556  	})
  4557  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4558  }
  4559  
  4560  // Do executes the "ml.projects.jobs.get" call.
  4561  // Any non-2xx status code is an error. Response headers are in either
  4562  // *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was returned
  4563  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4564  // check whether the returned error was because http.StatusNotModified was
  4565  // returned.
  4566  func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
  4567  	gensupport.SetOptions(c.urlParams_, opts...)
  4568  	res, err := c.doRequest("json")
  4569  	if res != nil && res.StatusCode == http.StatusNotModified {
  4570  		if res.Body != nil {
  4571  			res.Body.Close()
  4572  		}
  4573  		return nil, gensupport.WrapError(&googleapi.Error{
  4574  			Code:   res.StatusCode,
  4575  			Header: res.Header,
  4576  		})
  4577  	}
  4578  	if err != nil {
  4579  		return nil, err
  4580  	}
  4581  	defer googleapi.CloseBody(res)
  4582  	if err := googleapi.CheckResponse(res); err != nil {
  4583  		return nil, gensupport.WrapError(err)
  4584  	}
  4585  	ret := &GoogleCloudMlV1__Job{
  4586  		ServerResponse: googleapi.ServerResponse{
  4587  			Header:         res.Header,
  4588  			HTTPStatusCode: res.StatusCode,
  4589  		},
  4590  	}
  4591  	target := &ret
  4592  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4593  		return nil, err
  4594  	}
  4595  	return ret, nil
  4596  }
  4597  
  4598  type ProjectsJobsGetIamPolicyCall struct {
  4599  	s            *Service
  4600  	resource     string
  4601  	urlParams_   gensupport.URLParams
  4602  	ifNoneMatch_ string
  4603  	ctx_         context.Context
  4604  	header_      http.Header
  4605  }
  4606  
  4607  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4608  // empty policy if the resource exists and does not have a policy set.
  4609  //
  4610  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4611  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4612  //     for the appropriate value for this field.
  4613  func (r *ProjectsJobsService) GetIamPolicy(resource string) *ProjectsJobsGetIamPolicyCall {
  4614  	c := &ProjectsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4615  	c.resource = resource
  4616  	return c
  4617  }
  4618  
  4619  // OptionsRequestedPolicyVersion sets the optional parameter
  4620  // "options.requestedPolicyVersion": The maximum policy version that will be
  4621  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4622  // an invalid value will be rejected. Requests for policies with any
  4623  // conditional role bindings must specify version 3. Policies with no
  4624  // conditional role bindings may specify any valid value or leave the field
  4625  // unset. The policy in the response might use the policy version that you
  4626  // specified, or it might use a lower policy version. For example, if you
  4627  // specify version 3, but the policy has no conditional role bindings, the
  4628  // response uses version 1. To learn which resources support conditions in
  4629  // their IAM policies, see the IAM documentation
  4630  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4631  func (c *ProjectsJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsJobsGetIamPolicyCall {
  4632  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4633  	return c
  4634  }
  4635  
  4636  // Fields allows partial responses to be retrieved. See
  4637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4638  // details.
  4639  func (c *ProjectsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsGetIamPolicyCall {
  4640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4641  	return c
  4642  }
  4643  
  4644  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4645  // object's ETag matches the given value. This is useful for getting updates
  4646  // only after the object has changed since the last request.
  4647  func (c *ProjectsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsJobsGetIamPolicyCall {
  4648  	c.ifNoneMatch_ = entityTag
  4649  	return c
  4650  }
  4651  
  4652  // Context sets the context to be used in this call's Do method.
  4653  func (c *ProjectsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsGetIamPolicyCall {
  4654  	c.ctx_ = ctx
  4655  	return c
  4656  }
  4657  
  4658  // Header returns a http.Header that can be modified by the caller to add
  4659  // headers to the request.
  4660  func (c *ProjectsJobsGetIamPolicyCall) Header() http.Header {
  4661  	if c.header_ == nil {
  4662  		c.header_ = make(http.Header)
  4663  	}
  4664  	return c.header_
  4665  }
  4666  
  4667  func (c *ProjectsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4669  	if c.ifNoneMatch_ != "" {
  4670  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4671  	}
  4672  	var body io.Reader = nil
  4673  	c.urlParams_.Set("alt", alt)
  4674  	c.urlParams_.Set("prettyPrint", "false")
  4675  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4676  	urls += "?" + c.urlParams_.Encode()
  4677  	req, err := http.NewRequest("GET", urls, body)
  4678  	if err != nil {
  4679  		return nil, err
  4680  	}
  4681  	req.Header = reqHeaders
  4682  	googleapi.Expand(req.URL, map[string]string{
  4683  		"resource": c.resource,
  4684  	})
  4685  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4686  }
  4687  
  4688  // Do executes the "ml.projects.jobs.getIamPolicy" call.
  4689  // Any non-2xx status code is an error. Response headers are in either
  4690  // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was returned at
  4691  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4692  // check whether the returned error was because http.StatusNotModified was
  4693  // returned.
  4694  func (c *ProjectsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  4695  	gensupport.SetOptions(c.urlParams_, opts...)
  4696  	res, err := c.doRequest("json")
  4697  	if res != nil && res.StatusCode == http.StatusNotModified {
  4698  		if res.Body != nil {
  4699  			res.Body.Close()
  4700  		}
  4701  		return nil, gensupport.WrapError(&googleapi.Error{
  4702  			Code:   res.StatusCode,
  4703  			Header: res.Header,
  4704  		})
  4705  	}
  4706  	if err != nil {
  4707  		return nil, err
  4708  	}
  4709  	defer googleapi.CloseBody(res)
  4710  	if err := googleapi.CheckResponse(res); err != nil {
  4711  		return nil, gensupport.WrapError(err)
  4712  	}
  4713  	ret := &GoogleIamV1__Policy{
  4714  		ServerResponse: googleapi.ServerResponse{
  4715  			Header:         res.Header,
  4716  			HTTPStatusCode: res.StatusCode,
  4717  		},
  4718  	}
  4719  	target := &ret
  4720  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4721  		return nil, err
  4722  	}
  4723  	return ret, nil
  4724  }
  4725  
  4726  type ProjectsJobsListCall struct {
  4727  	s            *Service
  4728  	parent       string
  4729  	urlParams_   gensupport.URLParams
  4730  	ifNoneMatch_ string
  4731  	ctx_         context.Context
  4732  	header_      http.Header
  4733  }
  4734  
  4735  // List: Lists the jobs in the project. If there are no jobs that match the
  4736  // request parameters, the list request returns an empty response body: {}.
  4737  //
  4738  // - parent: The name of the project for which to list jobs.
  4739  func (r *ProjectsJobsService) List(parent string) *ProjectsJobsListCall {
  4740  	c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4741  	c.parent = parent
  4742  	return c
  4743  }
  4744  
  4745  // Filter sets the optional parameter "filter": Specifies the subset of jobs to
  4746  // retrieve. You can filter on the value of one or more attributes of the job
  4747  // object. For example, retrieve jobs with a job identifier that starts with
  4748  // 'census': gcloud ai-platform jobs list --filter='jobId:census*' List all
  4749  // failed jobs with names that start with 'rnn': gcloud ai-platform jobs list
  4750  // --filter='jobId:rnn* AND state:FAILED' For more examples, see the guide to
  4751  // monitoring jobs.
  4752  func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
  4753  	c.urlParams_.Set("filter", filter)
  4754  	return c
  4755  }
  4756  
  4757  // PageSize sets the optional parameter "pageSize": The number of jobs to
  4758  // retrieve per "page" of results. If there are more remaining results than
  4759  // this number, the response message will contain a valid value in the
  4760  // `next_page_token` field. The default value is 20, and the maximum page size
  4761  // is 100.
  4762  func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
  4763  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4764  	return c
  4765  }
  4766  
  4767  // PageToken sets the optional parameter "pageToken": A page token to request
  4768  // the next page of results. You get the token from the `next_page_token` field
  4769  // of the response from the previous call.
  4770  func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
  4771  	c.urlParams_.Set("pageToken", pageToken)
  4772  	return c
  4773  }
  4774  
  4775  // Fields allows partial responses to be retrieved. See
  4776  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4777  // details.
  4778  func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
  4779  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4780  	return c
  4781  }
  4782  
  4783  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4784  // object's ETag matches the given value. This is useful for getting updates
  4785  // only after the object has changed since the last request.
  4786  func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
  4787  	c.ifNoneMatch_ = entityTag
  4788  	return c
  4789  }
  4790  
  4791  // Context sets the context to be used in this call's Do method.
  4792  func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
  4793  	c.ctx_ = ctx
  4794  	return c
  4795  }
  4796  
  4797  // Header returns a http.Header that can be modified by the caller to add
  4798  // headers to the request.
  4799  func (c *ProjectsJobsListCall) Header() http.Header {
  4800  	if c.header_ == nil {
  4801  		c.header_ = make(http.Header)
  4802  	}
  4803  	return c.header_
  4804  }
  4805  
  4806  func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
  4807  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4808  	if c.ifNoneMatch_ != "" {
  4809  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4810  	}
  4811  	var body io.Reader = nil
  4812  	c.urlParams_.Set("alt", alt)
  4813  	c.urlParams_.Set("prettyPrint", "false")
  4814  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
  4815  	urls += "?" + c.urlParams_.Encode()
  4816  	req, err := http.NewRequest("GET", urls, body)
  4817  	if err != nil {
  4818  		return nil, err
  4819  	}
  4820  	req.Header = reqHeaders
  4821  	googleapi.Expand(req.URL, map[string]string{
  4822  		"parent": c.parent,
  4823  	})
  4824  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4825  }
  4826  
  4827  // Do executes the "ml.projects.jobs.list" call.
  4828  // Any non-2xx status code is an error. Response headers are in either
  4829  // *GoogleCloudMlV1__ListJobsResponse.ServerResponse.Header or (if a response
  4830  // was returned at all) in error.(*googleapi.Error).Header. Use
  4831  // googleapi.IsNotModified to check whether the returned error was because
  4832  // http.StatusNotModified was returned.
  4833  func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListJobsResponse, error) {
  4834  	gensupport.SetOptions(c.urlParams_, opts...)
  4835  	res, err := c.doRequest("json")
  4836  	if res != nil && res.StatusCode == http.StatusNotModified {
  4837  		if res.Body != nil {
  4838  			res.Body.Close()
  4839  		}
  4840  		return nil, gensupport.WrapError(&googleapi.Error{
  4841  			Code:   res.StatusCode,
  4842  			Header: res.Header,
  4843  		})
  4844  	}
  4845  	if err != nil {
  4846  		return nil, err
  4847  	}
  4848  	defer googleapi.CloseBody(res)
  4849  	if err := googleapi.CheckResponse(res); err != nil {
  4850  		return nil, gensupport.WrapError(err)
  4851  	}
  4852  	ret := &GoogleCloudMlV1__ListJobsResponse{
  4853  		ServerResponse: googleapi.ServerResponse{
  4854  			Header:         res.Header,
  4855  			HTTPStatusCode: res.StatusCode,
  4856  		},
  4857  	}
  4858  	target := &ret
  4859  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4860  		return nil, err
  4861  	}
  4862  	return ret, nil
  4863  }
  4864  
  4865  // Pages invokes f for each page of results.
  4866  // A non-nil error returned from f will halt the iteration.
  4867  // The provided context supersedes any context provided to the Context method.
  4868  func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListJobsResponse) error) error {
  4869  	c.ctx_ = ctx
  4870  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4871  	for {
  4872  		x, err := c.Do()
  4873  		if err != nil {
  4874  			return err
  4875  		}
  4876  		if err := f(x); err != nil {
  4877  			return err
  4878  		}
  4879  		if x.NextPageToken == "" {
  4880  			return nil
  4881  		}
  4882  		c.PageToken(x.NextPageToken)
  4883  	}
  4884  }
  4885  
  4886  type ProjectsJobsPatchCall struct {
  4887  	s                    *Service
  4888  	name                 string
  4889  	googlecloudmlv1__job *GoogleCloudMlV1__Job
  4890  	urlParams_           gensupport.URLParams
  4891  	ctx_                 context.Context
  4892  	header_              http.Header
  4893  }
  4894  
  4895  // Patch: Updates a specific job resource. Currently the only supported fields
  4896  // to update are `labels`.
  4897  //
  4898  // - name: The job name.
  4899  func (r *ProjectsJobsService) Patch(name string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsPatchCall {
  4900  	c := &ProjectsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4901  	c.name = name
  4902  	c.googlecloudmlv1__job = googlecloudmlv1__job
  4903  	return c
  4904  }
  4905  
  4906  // UpdateMask sets the optional parameter "updateMask": Required. Specifies the
  4907  // path, relative to `Job`, of the field to update. To adopt etag mechanism,
  4908  // include `etag` field in the mask, and include the `etag` value in your job
  4909  // resource. For example, to change the labels of a job, the `update_mask`
  4910  // parameter would be specified as `labels`, `etag`, and the `PATCH` request
  4911  // body would specify the new value, as follows: { "labels": { "owner":
  4912  // "Google", "color": "Blue" } "etag":
  4913  // "33a64df551425fcc55e4d42a148795d9f25f89d4" } If `etag` matches the one on
  4914  // the server, the labels of the job will be replaced with the given ones, and
  4915  // the server end `etag` will be recalculated. Currently the only supported
  4916  // update masks are `labels` and `etag`.
  4917  func (c *ProjectsJobsPatchCall) UpdateMask(updateMask string) *ProjectsJobsPatchCall {
  4918  	c.urlParams_.Set("updateMask", updateMask)
  4919  	return c
  4920  }
  4921  
  4922  // Fields allows partial responses to be retrieved. See
  4923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4924  // details.
  4925  func (c *ProjectsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsJobsPatchCall {
  4926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4927  	return c
  4928  }
  4929  
  4930  // Context sets the context to be used in this call's Do method.
  4931  func (c *ProjectsJobsPatchCall) Context(ctx context.Context) *ProjectsJobsPatchCall {
  4932  	c.ctx_ = ctx
  4933  	return c
  4934  }
  4935  
  4936  // Header returns a http.Header that can be modified by the caller to add
  4937  // headers to the request.
  4938  func (c *ProjectsJobsPatchCall) Header() http.Header {
  4939  	if c.header_ == nil {
  4940  		c.header_ = make(http.Header)
  4941  	}
  4942  	return c.header_
  4943  }
  4944  
  4945  func (c *ProjectsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
  4946  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4947  	var body io.Reader = nil
  4948  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
  4949  	if err != nil {
  4950  		return nil, err
  4951  	}
  4952  	c.urlParams_.Set("alt", alt)
  4953  	c.urlParams_.Set("prettyPrint", "false")
  4954  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4955  	urls += "?" + c.urlParams_.Encode()
  4956  	req, err := http.NewRequest("PATCH", urls, body)
  4957  	if err != nil {
  4958  		return nil, err
  4959  	}
  4960  	req.Header = reqHeaders
  4961  	googleapi.Expand(req.URL, map[string]string{
  4962  		"name": c.name,
  4963  	})
  4964  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4965  }
  4966  
  4967  // Do executes the "ml.projects.jobs.patch" call.
  4968  // Any non-2xx status code is an error. Response headers are in either
  4969  // *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was returned
  4970  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4971  // check whether the returned error was because http.StatusNotModified was
  4972  // returned.
  4973  func (c *ProjectsJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
  4974  	gensupport.SetOptions(c.urlParams_, opts...)
  4975  	res, err := c.doRequest("json")
  4976  	if res != nil && res.StatusCode == http.StatusNotModified {
  4977  		if res.Body != nil {
  4978  			res.Body.Close()
  4979  		}
  4980  		return nil, gensupport.WrapError(&googleapi.Error{
  4981  			Code:   res.StatusCode,
  4982  			Header: res.Header,
  4983  		})
  4984  	}
  4985  	if err != nil {
  4986  		return nil, err
  4987  	}
  4988  	defer googleapi.CloseBody(res)
  4989  	if err := googleapi.CheckResponse(res); err != nil {
  4990  		return nil, gensupport.WrapError(err)
  4991  	}
  4992  	ret := &GoogleCloudMlV1__Job{
  4993  		ServerResponse: googleapi.ServerResponse{
  4994  			Header:         res.Header,
  4995  			HTTPStatusCode: res.StatusCode,
  4996  		},
  4997  	}
  4998  	target := &ret
  4999  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5000  		return nil, err
  5001  	}
  5002  	return ret, nil
  5003  }
  5004  
  5005  type ProjectsJobsSetIamPolicyCall struct {
  5006  	s                                *Service
  5007  	resource                         string
  5008  	googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
  5009  	urlParams_                       gensupport.URLParams
  5010  	ctx_                             context.Context
  5011  	header_                          http.Header
  5012  }
  5013  
  5014  // SetIamPolicy: Sets the access control policy on the specified resource.
  5015  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5016  // and `PERMISSION_DENIED` errors.
  5017  //
  5018  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5019  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5020  //     for the appropriate value for this field.
  5021  func (r *ProjectsJobsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsJobsSetIamPolicyCall {
  5022  	c := &ProjectsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5023  	c.resource = resource
  5024  	c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
  5025  	return c
  5026  }
  5027  
  5028  // Fields allows partial responses to be retrieved. See
  5029  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5030  // details.
  5031  func (c *ProjectsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsSetIamPolicyCall {
  5032  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5033  	return c
  5034  }
  5035  
  5036  // Context sets the context to be used in this call's Do method.
  5037  func (c *ProjectsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsSetIamPolicyCall {
  5038  	c.ctx_ = ctx
  5039  	return c
  5040  }
  5041  
  5042  // Header returns a http.Header that can be modified by the caller to add
  5043  // headers to the request.
  5044  func (c *ProjectsJobsSetIamPolicyCall) Header() http.Header {
  5045  	if c.header_ == nil {
  5046  		c.header_ = make(http.Header)
  5047  	}
  5048  	return c.header_
  5049  }
  5050  
  5051  func (c *ProjectsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5052  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5053  	var body io.Reader = nil
  5054  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
  5055  	if err != nil {
  5056  		return nil, err
  5057  	}
  5058  	c.urlParams_.Set("alt", alt)
  5059  	c.urlParams_.Set("prettyPrint", "false")
  5060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5061  	urls += "?" + c.urlParams_.Encode()
  5062  	req, err := http.NewRequest("POST", urls, body)
  5063  	if err != nil {
  5064  		return nil, err
  5065  	}
  5066  	req.Header = reqHeaders
  5067  	googleapi.Expand(req.URL, map[string]string{
  5068  		"resource": c.resource,
  5069  	})
  5070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5071  }
  5072  
  5073  // Do executes the "ml.projects.jobs.setIamPolicy" call.
  5074  // Any non-2xx status code is an error. Response headers are in either
  5075  // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was returned at
  5076  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5077  // check whether the returned error was because http.StatusNotModified was
  5078  // returned.
  5079  func (c *ProjectsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  5080  	gensupport.SetOptions(c.urlParams_, opts...)
  5081  	res, err := c.doRequest("json")
  5082  	if res != nil && res.StatusCode == http.StatusNotModified {
  5083  		if res.Body != nil {
  5084  			res.Body.Close()
  5085  		}
  5086  		return nil, gensupport.WrapError(&googleapi.Error{
  5087  			Code:   res.StatusCode,
  5088  			Header: res.Header,
  5089  		})
  5090  	}
  5091  	if err != nil {
  5092  		return nil, err
  5093  	}
  5094  	defer googleapi.CloseBody(res)
  5095  	if err := googleapi.CheckResponse(res); err != nil {
  5096  		return nil, gensupport.WrapError(err)
  5097  	}
  5098  	ret := &GoogleIamV1__Policy{
  5099  		ServerResponse: googleapi.ServerResponse{
  5100  			Header:         res.Header,
  5101  			HTTPStatusCode: res.StatusCode,
  5102  		},
  5103  	}
  5104  	target := &ret
  5105  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5106  		return nil, err
  5107  	}
  5108  	return ret, nil
  5109  }
  5110  
  5111  type ProjectsJobsTestIamPermissionsCall struct {
  5112  	s                                      *Service
  5113  	resource                               string
  5114  	googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
  5115  	urlParams_                             gensupport.URLParams
  5116  	ctx_                                   context.Context
  5117  	header_                                http.Header
  5118  }
  5119  
  5120  // TestIamPermissions: Returns permissions that a caller has on the specified
  5121  // resource. If the resource does not exist, this will return an empty set of
  5122  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5123  // used for building permission-aware UIs and command-line tools, not for
  5124  // authorization checking. This operation may "fail open" without warning.
  5125  //
  5126  //   - resource: REQUIRED: The resource for which the policy detail is being
  5127  //     requested. See Resource names
  5128  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5129  //     value for this field.
  5130  func (r *ProjectsJobsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsJobsTestIamPermissionsCall {
  5131  	c := &ProjectsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5132  	c.resource = resource
  5133  	c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
  5134  	return c
  5135  }
  5136  
  5137  // Fields allows partial responses to be retrieved. See
  5138  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5139  // details.
  5140  func (c *ProjectsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsJobsTestIamPermissionsCall {
  5141  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5142  	return c
  5143  }
  5144  
  5145  // Context sets the context to be used in this call's Do method.
  5146  func (c *ProjectsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsJobsTestIamPermissionsCall {
  5147  	c.ctx_ = ctx
  5148  	return c
  5149  }
  5150  
  5151  // Header returns a http.Header that can be modified by the caller to add
  5152  // headers to the request.
  5153  func (c *ProjectsJobsTestIamPermissionsCall) Header() http.Header {
  5154  	if c.header_ == nil {
  5155  		c.header_ = make(http.Header)
  5156  	}
  5157  	return c.header_
  5158  }
  5159  
  5160  func (c *ProjectsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5161  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5162  	var body io.Reader = nil
  5163  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
  5164  	if err != nil {
  5165  		return nil, err
  5166  	}
  5167  	c.urlParams_.Set("alt", alt)
  5168  	c.urlParams_.Set("prettyPrint", "false")
  5169  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5170  	urls += "?" + c.urlParams_.Encode()
  5171  	req, err := http.NewRequest("POST", urls, body)
  5172  	if err != nil {
  5173  		return nil, err
  5174  	}
  5175  	req.Header = reqHeaders
  5176  	googleapi.Expand(req.URL, map[string]string{
  5177  		"resource": c.resource,
  5178  	})
  5179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5180  }
  5181  
  5182  // Do executes the "ml.projects.jobs.testIamPermissions" call.
  5183  // Any non-2xx status code is an error. Response headers are in either
  5184  // *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if a
  5185  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5186  // googleapi.IsNotModified to check whether the returned error was because
  5187  // http.StatusNotModified was returned.
  5188  func (c *ProjectsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
  5189  	gensupport.SetOptions(c.urlParams_, opts...)
  5190  	res, err := c.doRequest("json")
  5191  	if res != nil && res.StatusCode == http.StatusNotModified {
  5192  		if res.Body != nil {
  5193  			res.Body.Close()
  5194  		}
  5195  		return nil, gensupport.WrapError(&googleapi.Error{
  5196  			Code:   res.StatusCode,
  5197  			Header: res.Header,
  5198  		})
  5199  	}
  5200  	if err != nil {
  5201  		return nil, err
  5202  	}
  5203  	defer googleapi.CloseBody(res)
  5204  	if err := googleapi.CheckResponse(res); err != nil {
  5205  		return nil, gensupport.WrapError(err)
  5206  	}
  5207  	ret := &GoogleIamV1__TestIamPermissionsResponse{
  5208  		ServerResponse: googleapi.ServerResponse{
  5209  			Header:         res.Header,
  5210  			HTTPStatusCode: res.StatusCode,
  5211  		},
  5212  	}
  5213  	target := &ret
  5214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5215  		return nil, err
  5216  	}
  5217  	return ret, nil
  5218  }
  5219  
  5220  type ProjectsLocationsGetCall struct {
  5221  	s            *Service
  5222  	name         string
  5223  	urlParams_   gensupport.URLParams
  5224  	ifNoneMatch_ string
  5225  	ctx_         context.Context
  5226  	header_      http.Header
  5227  }
  5228  
  5229  // Get: Get the complete list of CMLE capabilities in a location, along with
  5230  // their location-specific properties.
  5231  //
  5232  // - name: The name of the location.
  5233  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  5234  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5235  	c.name = name
  5236  	return c
  5237  }
  5238  
  5239  // Fields allows partial responses to be retrieved. See
  5240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5241  // details.
  5242  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  5243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5244  	return c
  5245  }
  5246  
  5247  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5248  // object's ETag matches the given value. This is useful for getting updates
  5249  // only after the object has changed since the last request.
  5250  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  5251  	c.ifNoneMatch_ = entityTag
  5252  	return c
  5253  }
  5254  
  5255  // Context sets the context to be used in this call's Do method.
  5256  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  5257  	c.ctx_ = ctx
  5258  	return c
  5259  }
  5260  
  5261  // Header returns a http.Header that can be modified by the caller to add
  5262  // headers to the request.
  5263  func (c *ProjectsLocationsGetCall) Header() http.Header {
  5264  	if c.header_ == nil {
  5265  		c.header_ = make(http.Header)
  5266  	}
  5267  	return c.header_
  5268  }
  5269  
  5270  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  5271  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5272  	if c.ifNoneMatch_ != "" {
  5273  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5274  	}
  5275  	var body io.Reader = nil
  5276  	c.urlParams_.Set("alt", alt)
  5277  	c.urlParams_.Set("prettyPrint", "false")
  5278  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5279  	urls += "?" + c.urlParams_.Encode()
  5280  	req, err := http.NewRequest("GET", urls, body)
  5281  	if err != nil {
  5282  		return nil, err
  5283  	}
  5284  	req.Header = reqHeaders
  5285  	googleapi.Expand(req.URL, map[string]string{
  5286  		"name": c.name,
  5287  	})
  5288  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5289  }
  5290  
  5291  // Do executes the "ml.projects.locations.get" call.
  5292  // Any non-2xx status code is an error. Response headers are in either
  5293  // *GoogleCloudMlV1__Location.ServerResponse.Header or (if a response was
  5294  // returned at all) in error.(*googleapi.Error).Header. Use
  5295  // googleapi.IsNotModified to check whether the returned error was because
  5296  // http.StatusNotModified was returned.
  5297  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Location, error) {
  5298  	gensupport.SetOptions(c.urlParams_, opts...)
  5299  	res, err := c.doRequest("json")
  5300  	if res != nil && res.StatusCode == http.StatusNotModified {
  5301  		if res.Body != nil {
  5302  			res.Body.Close()
  5303  		}
  5304  		return nil, gensupport.WrapError(&googleapi.Error{
  5305  			Code:   res.StatusCode,
  5306  			Header: res.Header,
  5307  		})
  5308  	}
  5309  	if err != nil {
  5310  		return nil, err
  5311  	}
  5312  	defer googleapi.CloseBody(res)
  5313  	if err := googleapi.CheckResponse(res); err != nil {
  5314  		return nil, gensupport.WrapError(err)
  5315  	}
  5316  	ret := &GoogleCloudMlV1__Location{
  5317  		ServerResponse: googleapi.ServerResponse{
  5318  			Header:         res.Header,
  5319  			HTTPStatusCode: res.StatusCode,
  5320  		},
  5321  	}
  5322  	target := &ret
  5323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5324  		return nil, err
  5325  	}
  5326  	return ret, nil
  5327  }
  5328  
  5329  type ProjectsLocationsListCall struct {
  5330  	s            *Service
  5331  	parent       string
  5332  	urlParams_   gensupport.URLParams
  5333  	ifNoneMatch_ string
  5334  	ctx_         context.Context
  5335  	header_      http.Header
  5336  }
  5337  
  5338  // List: List all locations that provides at least one type of CMLE capability.
  5339  //
  5340  //   - parent: The name of the project for which available locations are to be
  5341  //     listed (since some locations might be whitelisted for specific projects).
  5342  func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall {
  5343  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5344  	c.parent = parent
  5345  	return c
  5346  }
  5347  
  5348  // PageSize sets the optional parameter "pageSize": The number of locations to
  5349  // retrieve per "page" of results. If there are more remaining results than
  5350  // this number, the response message will contain a valid value in the
  5351  // `next_page_token` field. The default value is 20, and the maximum page size
  5352  // is 100.
  5353  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  5354  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5355  	return c
  5356  }
  5357  
  5358  // PageToken sets the optional parameter "pageToken": A page token to request
  5359  // the next page of results. You get the token from the `next_page_token` field
  5360  // of the response from the previous call.
  5361  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  5362  	c.urlParams_.Set("pageToken", pageToken)
  5363  	return c
  5364  }
  5365  
  5366  // Fields allows partial responses to be retrieved. See
  5367  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5368  // details.
  5369  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  5370  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5371  	return c
  5372  }
  5373  
  5374  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5375  // object's ETag matches the given value. This is useful for getting updates
  5376  // only after the object has changed since the last request.
  5377  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  5378  	c.ifNoneMatch_ = entityTag
  5379  	return c
  5380  }
  5381  
  5382  // Context sets the context to be used in this call's Do method.
  5383  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  5384  	c.ctx_ = ctx
  5385  	return c
  5386  }
  5387  
  5388  // Header returns a http.Header that can be modified by the caller to add
  5389  // headers to the request.
  5390  func (c *ProjectsLocationsListCall) Header() http.Header {
  5391  	if c.header_ == nil {
  5392  		c.header_ = make(http.Header)
  5393  	}
  5394  	return c.header_
  5395  }
  5396  
  5397  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  5398  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5399  	if c.ifNoneMatch_ != "" {
  5400  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5401  	}
  5402  	var body io.Reader = nil
  5403  	c.urlParams_.Set("alt", alt)
  5404  	c.urlParams_.Set("prettyPrint", "false")
  5405  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/locations")
  5406  	urls += "?" + c.urlParams_.Encode()
  5407  	req, err := http.NewRequest("GET", urls, body)
  5408  	if err != nil {
  5409  		return nil, err
  5410  	}
  5411  	req.Header = reqHeaders
  5412  	googleapi.Expand(req.URL, map[string]string{
  5413  		"parent": c.parent,
  5414  	})
  5415  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5416  }
  5417  
  5418  // Do executes the "ml.projects.locations.list" call.
  5419  // Any non-2xx status code is an error. Response headers are in either
  5420  // *GoogleCloudMlV1__ListLocationsResponse.ServerResponse.Header or (if a
  5421  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5422  // googleapi.IsNotModified to check whether the returned error was because
  5423  // http.StatusNotModified was returned.
  5424  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListLocationsResponse, error) {
  5425  	gensupport.SetOptions(c.urlParams_, opts...)
  5426  	res, err := c.doRequest("json")
  5427  	if res != nil && res.StatusCode == http.StatusNotModified {
  5428  		if res.Body != nil {
  5429  			res.Body.Close()
  5430  		}
  5431  		return nil, gensupport.WrapError(&googleapi.Error{
  5432  			Code:   res.StatusCode,
  5433  			Header: res.Header,
  5434  		})
  5435  	}
  5436  	if err != nil {
  5437  		return nil, err
  5438  	}
  5439  	defer googleapi.CloseBody(res)
  5440  	if err := googleapi.CheckResponse(res); err != nil {
  5441  		return nil, gensupport.WrapError(err)
  5442  	}
  5443  	ret := &GoogleCloudMlV1__ListLocationsResponse{
  5444  		ServerResponse: googleapi.ServerResponse{
  5445  			Header:         res.Header,
  5446  			HTTPStatusCode: res.StatusCode,
  5447  		},
  5448  	}
  5449  	target := &ret
  5450  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5451  		return nil, err
  5452  	}
  5453  	return ret, nil
  5454  }
  5455  
  5456  // Pages invokes f for each page of results.
  5457  // A non-nil error returned from f will halt the iteration.
  5458  // The provided context supersedes any context provided to the Context method.
  5459  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListLocationsResponse) error) error {
  5460  	c.ctx_ = ctx
  5461  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5462  	for {
  5463  		x, err := c.Do()
  5464  		if err != nil {
  5465  			return err
  5466  		}
  5467  		if err := f(x); err != nil {
  5468  			return err
  5469  		}
  5470  		if x.NextPageToken == "" {
  5471  			return nil
  5472  		}
  5473  		c.PageToken(x.NextPageToken)
  5474  	}
  5475  }
  5476  
  5477  type ProjectsLocationsOperationsCancelCall struct {
  5478  	s          *Service
  5479  	name       string
  5480  	urlParams_ gensupport.URLParams
  5481  	ctx_       context.Context
  5482  	header_    http.Header
  5483  }
  5484  
  5485  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5486  // server makes a best effort to cancel the operation, but success is not
  5487  // guaranteed. If the server doesn't support this method, it returns
  5488  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5489  // other methods to check whether the cancellation succeeded or whether the
  5490  // operation completed despite cancellation. On successful cancellation, the
  5491  // operation is not deleted; instead, it becomes an operation with an
  5492  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5493  // `Code.CANCELLED`.
  5494  //
  5495  // - name: The name of the operation resource to be cancelled.
  5496  func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
  5497  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5498  	c.name = name
  5499  	return c
  5500  }
  5501  
  5502  // Fields allows partial responses to be retrieved. See
  5503  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5504  // details.
  5505  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  5506  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5507  	return c
  5508  }
  5509  
  5510  // Context sets the context to be used in this call's Do method.
  5511  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  5512  	c.ctx_ = ctx
  5513  	return c
  5514  }
  5515  
  5516  // Header returns a http.Header that can be modified by the caller to add
  5517  // headers to the request.
  5518  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  5519  	if c.header_ == nil {
  5520  		c.header_ = make(http.Header)
  5521  	}
  5522  	return c.header_
  5523  }
  5524  
  5525  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5526  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5527  	var body io.Reader = nil
  5528  	c.urlParams_.Set("alt", alt)
  5529  	c.urlParams_.Set("prettyPrint", "false")
  5530  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5531  	urls += "?" + c.urlParams_.Encode()
  5532  	req, err := http.NewRequest("POST", urls, body)
  5533  	if err != nil {
  5534  		return nil, err
  5535  	}
  5536  	req.Header = reqHeaders
  5537  	googleapi.Expand(req.URL, map[string]string{
  5538  		"name": c.name,
  5539  	})
  5540  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5541  }
  5542  
  5543  // Do executes the "ml.projects.locations.operations.cancel" call.
  5544  // Any non-2xx status code is an error. Response headers are in either
  5545  // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was returned
  5546  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5547  // check whether the returned error was because http.StatusNotModified was
  5548  // returned.
  5549  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  5550  	gensupport.SetOptions(c.urlParams_, opts...)
  5551  	res, err := c.doRequest("json")
  5552  	if res != nil && res.StatusCode == http.StatusNotModified {
  5553  		if res.Body != nil {
  5554  			res.Body.Close()
  5555  		}
  5556  		return nil, gensupport.WrapError(&googleapi.Error{
  5557  			Code:   res.StatusCode,
  5558  			Header: res.Header,
  5559  		})
  5560  	}
  5561  	if err != nil {
  5562  		return nil, err
  5563  	}
  5564  	defer googleapi.CloseBody(res)
  5565  	if err := googleapi.CheckResponse(res); err != nil {
  5566  		return nil, gensupport.WrapError(err)
  5567  	}
  5568  	ret := &GoogleProtobuf__Empty{
  5569  		ServerResponse: googleapi.ServerResponse{
  5570  			Header:         res.Header,
  5571  			HTTPStatusCode: res.StatusCode,
  5572  		},
  5573  	}
  5574  	target := &ret
  5575  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5576  		return nil, err
  5577  	}
  5578  	return ret, nil
  5579  }
  5580  
  5581  type ProjectsLocationsOperationsGetCall struct {
  5582  	s            *Service
  5583  	name         string
  5584  	urlParams_   gensupport.URLParams
  5585  	ifNoneMatch_ string
  5586  	ctx_         context.Context
  5587  	header_      http.Header
  5588  }
  5589  
  5590  // Get: Gets the latest state of a long-running operation. Clients can use this
  5591  // method to poll the operation result at intervals as recommended by the API
  5592  // service.
  5593  //
  5594  // - name: The name of the operation resource.
  5595  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5596  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5597  	c.name = name
  5598  	return c
  5599  }
  5600  
  5601  // Fields allows partial responses to be retrieved. See
  5602  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5603  // details.
  5604  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5605  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5606  	return c
  5607  }
  5608  
  5609  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5610  // object's ETag matches the given value. This is useful for getting updates
  5611  // only after the object has changed since the last request.
  5612  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5613  	c.ifNoneMatch_ = entityTag
  5614  	return c
  5615  }
  5616  
  5617  // Context sets the context to be used in this call's Do method.
  5618  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5619  	c.ctx_ = ctx
  5620  	return c
  5621  }
  5622  
  5623  // Header returns a http.Header that can be modified by the caller to add
  5624  // headers to the request.
  5625  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5626  	if c.header_ == nil {
  5627  		c.header_ = make(http.Header)
  5628  	}
  5629  	return c.header_
  5630  }
  5631  
  5632  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5633  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5634  	if c.ifNoneMatch_ != "" {
  5635  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5636  	}
  5637  	var body io.Reader = nil
  5638  	c.urlParams_.Set("alt", alt)
  5639  	c.urlParams_.Set("prettyPrint", "false")
  5640  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5641  	urls += "?" + c.urlParams_.Encode()
  5642  	req, err := http.NewRequest("GET", urls, body)
  5643  	if err != nil {
  5644  		return nil, err
  5645  	}
  5646  	req.Header = reqHeaders
  5647  	googleapi.Expand(req.URL, map[string]string{
  5648  		"name": c.name,
  5649  	})
  5650  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5651  }
  5652  
  5653  // Do executes the "ml.projects.locations.operations.get" call.
  5654  // Any non-2xx status code is an error. Response headers are in either
  5655  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  5656  // returned at all) in error.(*googleapi.Error).Header. Use
  5657  // googleapi.IsNotModified to check whether the returned error was because
  5658  // http.StatusNotModified was returned.
  5659  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  5660  	gensupport.SetOptions(c.urlParams_, opts...)
  5661  	res, err := c.doRequest("json")
  5662  	if res != nil && res.StatusCode == http.StatusNotModified {
  5663  		if res.Body != nil {
  5664  			res.Body.Close()
  5665  		}
  5666  		return nil, gensupport.WrapError(&googleapi.Error{
  5667  			Code:   res.StatusCode,
  5668  			Header: res.Header,
  5669  		})
  5670  	}
  5671  	if err != nil {
  5672  		return nil, err
  5673  	}
  5674  	defer googleapi.CloseBody(res)
  5675  	if err := googleapi.CheckResponse(res); err != nil {
  5676  		return nil, gensupport.WrapError(err)
  5677  	}
  5678  	ret := &GoogleLongrunning__Operation{
  5679  		ServerResponse: googleapi.ServerResponse{
  5680  			Header:         res.Header,
  5681  			HTTPStatusCode: res.StatusCode,
  5682  		},
  5683  	}
  5684  	target := &ret
  5685  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5686  		return nil, err
  5687  	}
  5688  	return ret, nil
  5689  }
  5690  
  5691  type ProjectsLocationsStudiesCreateCall struct {
  5692  	s                      *Service
  5693  	parent                 string
  5694  	googlecloudmlv1__study *GoogleCloudMlV1__Study
  5695  	urlParams_             gensupport.URLParams
  5696  	ctx_                   context.Context
  5697  	header_                http.Header
  5698  }
  5699  
  5700  // Create: Creates a study.
  5701  //
  5702  //   - parent: The project and location that the study belongs to. Format:
  5703  //     projects/{project}/locations/{location}.
  5704  func (r *ProjectsLocationsStudiesService) Create(parent string, googlecloudmlv1__study *GoogleCloudMlV1__Study) *ProjectsLocationsStudiesCreateCall {
  5705  	c := &ProjectsLocationsStudiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5706  	c.parent = parent
  5707  	c.googlecloudmlv1__study = googlecloudmlv1__study
  5708  	return c
  5709  }
  5710  
  5711  // StudyId sets the optional parameter "studyId": Required. The ID to use for
  5712  // the study, which will become the final component of the study's resource
  5713  // name.
  5714  func (c *ProjectsLocationsStudiesCreateCall) StudyId(studyId string) *ProjectsLocationsStudiesCreateCall {
  5715  	c.urlParams_.Set("studyId", studyId)
  5716  	return c
  5717  }
  5718  
  5719  // Fields allows partial responses to be retrieved. See
  5720  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5721  // details.
  5722  func (c *ProjectsLocationsStudiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesCreateCall {
  5723  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5724  	return c
  5725  }
  5726  
  5727  // Context sets the context to be used in this call's Do method.
  5728  func (c *ProjectsLocationsStudiesCreateCall) Context(ctx context.Context) *ProjectsLocationsStudiesCreateCall {
  5729  	c.ctx_ = ctx
  5730  	return c
  5731  }
  5732  
  5733  // Header returns a http.Header that can be modified by the caller to add
  5734  // headers to the request.
  5735  func (c *ProjectsLocationsStudiesCreateCall) Header() http.Header {
  5736  	if c.header_ == nil {
  5737  		c.header_ = make(http.Header)
  5738  	}
  5739  	return c.header_
  5740  }
  5741  
  5742  func (c *ProjectsLocationsStudiesCreateCall) doRequest(alt string) (*http.Response, error) {
  5743  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5744  	var body io.Reader = nil
  5745  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__study)
  5746  	if err != nil {
  5747  		return nil, err
  5748  	}
  5749  	c.urlParams_.Set("alt", alt)
  5750  	c.urlParams_.Set("prettyPrint", "false")
  5751  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/studies")
  5752  	urls += "?" + c.urlParams_.Encode()
  5753  	req, err := http.NewRequest("POST", urls, body)
  5754  	if err != nil {
  5755  		return nil, err
  5756  	}
  5757  	req.Header = reqHeaders
  5758  	googleapi.Expand(req.URL, map[string]string{
  5759  		"parent": c.parent,
  5760  	})
  5761  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5762  }
  5763  
  5764  // Do executes the "ml.projects.locations.studies.create" call.
  5765  // Any non-2xx status code is an error. Response headers are in either
  5766  // *GoogleCloudMlV1__Study.ServerResponse.Header or (if a response was returned
  5767  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5768  // check whether the returned error was because http.StatusNotModified was
  5769  // returned.
  5770  func (c *ProjectsLocationsStudiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Study, error) {
  5771  	gensupport.SetOptions(c.urlParams_, opts...)
  5772  	res, err := c.doRequest("json")
  5773  	if res != nil && res.StatusCode == http.StatusNotModified {
  5774  		if res.Body != nil {
  5775  			res.Body.Close()
  5776  		}
  5777  		return nil, gensupport.WrapError(&googleapi.Error{
  5778  			Code:   res.StatusCode,
  5779  			Header: res.Header,
  5780  		})
  5781  	}
  5782  	if err != nil {
  5783  		return nil, err
  5784  	}
  5785  	defer googleapi.CloseBody(res)
  5786  	if err := googleapi.CheckResponse(res); err != nil {
  5787  		return nil, gensupport.WrapError(err)
  5788  	}
  5789  	ret := &GoogleCloudMlV1__Study{
  5790  		ServerResponse: googleapi.ServerResponse{
  5791  			Header:         res.Header,
  5792  			HTTPStatusCode: res.StatusCode,
  5793  		},
  5794  	}
  5795  	target := &ret
  5796  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5797  		return nil, err
  5798  	}
  5799  	return ret, nil
  5800  }
  5801  
  5802  type ProjectsLocationsStudiesDeleteCall struct {
  5803  	s          *Service
  5804  	name       string
  5805  	urlParams_ gensupport.URLParams
  5806  	ctx_       context.Context
  5807  	header_    http.Header
  5808  }
  5809  
  5810  // Delete: Deletes a study.
  5811  //
  5812  // - name: The study name.
  5813  func (r *ProjectsLocationsStudiesService) Delete(name string) *ProjectsLocationsStudiesDeleteCall {
  5814  	c := &ProjectsLocationsStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5815  	c.name = name
  5816  	return c
  5817  }
  5818  
  5819  // Fields allows partial responses to be retrieved. See
  5820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5821  // details.
  5822  func (c *ProjectsLocationsStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesDeleteCall {
  5823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5824  	return c
  5825  }
  5826  
  5827  // Context sets the context to be used in this call's Do method.
  5828  func (c *ProjectsLocationsStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesDeleteCall {
  5829  	c.ctx_ = ctx
  5830  	return c
  5831  }
  5832  
  5833  // Header returns a http.Header that can be modified by the caller to add
  5834  // headers to the request.
  5835  func (c *ProjectsLocationsStudiesDeleteCall) Header() http.Header {
  5836  	if c.header_ == nil {
  5837  		c.header_ = make(http.Header)
  5838  	}
  5839  	return c.header_
  5840  }
  5841  
  5842  func (c *ProjectsLocationsStudiesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5843  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5844  	var body io.Reader = nil
  5845  	c.urlParams_.Set("alt", alt)
  5846  	c.urlParams_.Set("prettyPrint", "false")
  5847  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5848  	urls += "?" + c.urlParams_.Encode()
  5849  	req, err := http.NewRequest("DELETE", urls, body)
  5850  	if err != nil {
  5851  		return nil, err
  5852  	}
  5853  	req.Header = reqHeaders
  5854  	googleapi.Expand(req.URL, map[string]string{
  5855  		"name": c.name,
  5856  	})
  5857  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5858  }
  5859  
  5860  // Do executes the "ml.projects.locations.studies.delete" call.
  5861  // Any non-2xx status code is an error. Response headers are in either
  5862  // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was returned
  5863  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5864  // check whether the returned error was because http.StatusNotModified was
  5865  // returned.
  5866  func (c *ProjectsLocationsStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  5867  	gensupport.SetOptions(c.urlParams_, opts...)
  5868  	res, err := c.doRequest("json")
  5869  	if res != nil && res.StatusCode == http.StatusNotModified {
  5870  		if res.Body != nil {
  5871  			res.Body.Close()
  5872  		}
  5873  		return nil, gensupport.WrapError(&googleapi.Error{
  5874  			Code:   res.StatusCode,
  5875  			Header: res.Header,
  5876  		})
  5877  	}
  5878  	if err != nil {
  5879  		return nil, err
  5880  	}
  5881  	defer googleapi.CloseBody(res)
  5882  	if err := googleapi.CheckResponse(res); err != nil {
  5883  		return nil, gensupport.WrapError(err)
  5884  	}
  5885  	ret := &GoogleProtobuf__Empty{
  5886  		ServerResponse: googleapi.ServerResponse{
  5887  			Header:         res.Header,
  5888  			HTTPStatusCode: res.StatusCode,
  5889  		},
  5890  	}
  5891  	target := &ret
  5892  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5893  		return nil, err
  5894  	}
  5895  	return ret, nil
  5896  }
  5897  
  5898  type ProjectsLocationsStudiesGetCall struct {
  5899  	s            *Service
  5900  	name         string
  5901  	urlParams_   gensupport.URLParams
  5902  	ifNoneMatch_ string
  5903  	ctx_         context.Context
  5904  	header_      http.Header
  5905  }
  5906  
  5907  // Get: Gets a study.
  5908  //
  5909  // - name: The study name.
  5910  func (r *ProjectsLocationsStudiesService) Get(name string) *ProjectsLocationsStudiesGetCall {
  5911  	c := &ProjectsLocationsStudiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5912  	c.name = name
  5913  	return c
  5914  }
  5915  
  5916  // Fields allows partial responses to be retrieved. See
  5917  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5918  // details.
  5919  func (c *ProjectsLocationsStudiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesGetCall {
  5920  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5921  	return c
  5922  }
  5923  
  5924  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5925  // object's ETag matches the given value. This is useful for getting updates
  5926  // only after the object has changed since the last request.
  5927  func (c *ProjectsLocationsStudiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesGetCall {
  5928  	c.ifNoneMatch_ = entityTag
  5929  	return c
  5930  }
  5931  
  5932  // Context sets the context to be used in this call's Do method.
  5933  func (c *ProjectsLocationsStudiesGetCall) Context(ctx context.Context) *ProjectsLocationsStudiesGetCall {
  5934  	c.ctx_ = ctx
  5935  	return c
  5936  }
  5937  
  5938  // Header returns a http.Header that can be modified by the caller to add
  5939  // headers to the request.
  5940  func (c *ProjectsLocationsStudiesGetCall) Header() http.Header {
  5941  	if c.header_ == nil {
  5942  		c.header_ = make(http.Header)
  5943  	}
  5944  	return c.header_
  5945  }
  5946  
  5947  func (c *ProjectsLocationsStudiesGetCall) doRequest(alt string) (*http.Response, error) {
  5948  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5949  	if c.ifNoneMatch_ != "" {
  5950  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5951  	}
  5952  	var body io.Reader = nil
  5953  	c.urlParams_.Set("alt", alt)
  5954  	c.urlParams_.Set("prettyPrint", "false")
  5955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5956  	urls += "?" + c.urlParams_.Encode()
  5957  	req, err := http.NewRequest("GET", urls, body)
  5958  	if err != nil {
  5959  		return nil, err
  5960  	}
  5961  	req.Header = reqHeaders
  5962  	googleapi.Expand(req.URL, map[string]string{
  5963  		"name": c.name,
  5964  	})
  5965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5966  }
  5967  
  5968  // Do executes the "ml.projects.locations.studies.get" call.
  5969  // Any non-2xx status code is an error. Response headers are in either
  5970  // *GoogleCloudMlV1__Study.ServerResponse.Header or (if a response was returned
  5971  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5972  // check whether the returned error was because http.StatusNotModified was
  5973  // returned.
  5974  func (c *ProjectsLocationsStudiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Study, error) {
  5975  	gensupport.SetOptions(c.urlParams_, opts...)
  5976  	res, err := c.doRequest("json")
  5977  	if res != nil && res.StatusCode == http.StatusNotModified {
  5978  		if res.Body != nil {
  5979  			res.Body.Close()
  5980  		}
  5981  		return nil, gensupport.WrapError(&googleapi.Error{
  5982  			Code:   res.StatusCode,
  5983  			Header: res.Header,
  5984  		})
  5985  	}
  5986  	if err != nil {
  5987  		return nil, err
  5988  	}
  5989  	defer googleapi.CloseBody(res)
  5990  	if err := googleapi.CheckResponse(res); err != nil {
  5991  		return nil, gensupport.WrapError(err)
  5992  	}
  5993  	ret := &GoogleCloudMlV1__Study{
  5994  		ServerResponse: googleapi.ServerResponse{
  5995  			Header:         res.Header,
  5996  			HTTPStatusCode: res.StatusCode,
  5997  		},
  5998  	}
  5999  	target := &ret
  6000  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6001  		return nil, err
  6002  	}
  6003  	return ret, nil
  6004  }
  6005  
  6006  type ProjectsLocationsStudiesListCall struct {
  6007  	s            *Service
  6008  	parent       string
  6009  	urlParams_   gensupport.URLParams
  6010  	ifNoneMatch_ string
  6011  	ctx_         context.Context
  6012  	header_      http.Header
  6013  }
  6014  
  6015  // List: Lists all the studies in a region for an associated project.
  6016  //
  6017  //   - parent: The project and location that the study belongs to. Format:
  6018  //     projects/{project}/locations/{location}.
  6019  func (r *ProjectsLocationsStudiesService) List(parent string) *ProjectsLocationsStudiesListCall {
  6020  	c := &ProjectsLocationsStudiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6021  	c.parent = parent
  6022  	return c
  6023  }
  6024  
  6025  // Fields allows partial responses to be retrieved. See
  6026  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6027  // details.
  6028  func (c *ProjectsLocationsStudiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesListCall {
  6029  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6030  	return c
  6031  }
  6032  
  6033  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6034  // object's ETag matches the given value. This is useful for getting updates
  6035  // only after the object has changed since the last request.
  6036  func (c *ProjectsLocationsStudiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesListCall {
  6037  	c.ifNoneMatch_ = entityTag
  6038  	return c
  6039  }
  6040  
  6041  // Context sets the context to be used in this call's Do method.
  6042  func (c *ProjectsLocationsStudiesListCall) Context(ctx context.Context) *ProjectsLocationsStudiesListCall {
  6043  	c.ctx_ = ctx
  6044  	return c
  6045  }
  6046  
  6047  // Header returns a http.Header that can be modified by the caller to add
  6048  // headers to the request.
  6049  func (c *ProjectsLocationsStudiesListCall) Header() http.Header {
  6050  	if c.header_ == nil {
  6051  		c.header_ = make(http.Header)
  6052  	}
  6053  	return c.header_
  6054  }
  6055  
  6056  func (c *ProjectsLocationsStudiesListCall) doRequest(alt string) (*http.Response, error) {
  6057  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6058  	if c.ifNoneMatch_ != "" {
  6059  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6060  	}
  6061  	var body io.Reader = nil
  6062  	c.urlParams_.Set("alt", alt)
  6063  	c.urlParams_.Set("prettyPrint", "false")
  6064  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/studies")
  6065  	urls += "?" + c.urlParams_.Encode()
  6066  	req, err := http.NewRequest("GET", urls, body)
  6067  	if err != nil {
  6068  		return nil, err
  6069  	}
  6070  	req.Header = reqHeaders
  6071  	googleapi.Expand(req.URL, map[string]string{
  6072  		"parent": c.parent,
  6073  	})
  6074  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6075  }
  6076  
  6077  // Do executes the "ml.projects.locations.studies.list" call.
  6078  // Any non-2xx status code is an error. Response headers are in either
  6079  // *GoogleCloudMlV1__ListStudiesResponse.ServerResponse.Header or (if a
  6080  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6081  // googleapi.IsNotModified to check whether the returned error was because
  6082  // http.StatusNotModified was returned.
  6083  func (c *ProjectsLocationsStudiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListStudiesResponse, error) {
  6084  	gensupport.SetOptions(c.urlParams_, opts...)
  6085  	res, err := c.doRequest("json")
  6086  	if res != nil && res.StatusCode == http.StatusNotModified {
  6087  		if res.Body != nil {
  6088  			res.Body.Close()
  6089  		}
  6090  		return nil, gensupport.WrapError(&googleapi.Error{
  6091  			Code:   res.StatusCode,
  6092  			Header: res.Header,
  6093  		})
  6094  	}
  6095  	if err != nil {
  6096  		return nil, err
  6097  	}
  6098  	defer googleapi.CloseBody(res)
  6099  	if err := googleapi.CheckResponse(res); err != nil {
  6100  		return nil, gensupport.WrapError(err)
  6101  	}
  6102  	ret := &GoogleCloudMlV1__ListStudiesResponse{
  6103  		ServerResponse: googleapi.ServerResponse{
  6104  			Header:         res.Header,
  6105  			HTTPStatusCode: res.StatusCode,
  6106  		},
  6107  	}
  6108  	target := &ret
  6109  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6110  		return nil, err
  6111  	}
  6112  	return ret, nil
  6113  }
  6114  
  6115  type ProjectsLocationsStudiesTrialsAddMeasurementCall struct {
  6116  	s                                           *Service
  6117  	name                                        string
  6118  	googlecloudmlv1__addtrialmeasurementrequest *GoogleCloudMlV1__AddTrialMeasurementRequest
  6119  	urlParams_                                  gensupport.URLParams
  6120  	ctx_                                        context.Context
  6121  	header_                                     http.Header
  6122  }
  6123  
  6124  // AddMeasurement: Adds a measurement of the objective metrics to a trial. This
  6125  // measurement is assumed to have been taken before the trial is complete.
  6126  //
  6127  // - name: The trial name.
  6128  func (r *ProjectsLocationsStudiesTrialsService) AddMeasurement(name string, googlecloudmlv1__addtrialmeasurementrequest *GoogleCloudMlV1__AddTrialMeasurementRequest) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
  6129  	c := &ProjectsLocationsStudiesTrialsAddMeasurementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6130  	c.name = name
  6131  	c.googlecloudmlv1__addtrialmeasurementrequest = googlecloudmlv1__addtrialmeasurementrequest
  6132  	return c
  6133  }
  6134  
  6135  // Fields allows partial responses to be retrieved. See
  6136  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6137  // details.
  6138  func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
  6139  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6140  	return c
  6141  }
  6142  
  6143  // Context sets the context to be used in this call's Do method.
  6144  func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
  6145  	c.ctx_ = ctx
  6146  	return c
  6147  }
  6148  
  6149  // Header returns a http.Header that can be modified by the caller to add
  6150  // headers to the request.
  6151  func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Header() http.Header {
  6152  	if c.header_ == nil {
  6153  		c.header_ = make(http.Header)
  6154  	}
  6155  	return c.header_
  6156  }
  6157  
  6158  func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) doRequest(alt string) (*http.Response, error) {
  6159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6160  	var body io.Reader = nil
  6161  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__addtrialmeasurementrequest)
  6162  	if err != nil {
  6163  		return nil, err
  6164  	}
  6165  	c.urlParams_.Set("alt", alt)
  6166  	c.urlParams_.Set("prettyPrint", "false")
  6167  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:addMeasurement")
  6168  	urls += "?" + c.urlParams_.Encode()
  6169  	req, err := http.NewRequest("POST", urls, body)
  6170  	if err != nil {
  6171  		return nil, err
  6172  	}
  6173  	req.Header = reqHeaders
  6174  	googleapi.Expand(req.URL, map[string]string{
  6175  		"name": c.name,
  6176  	})
  6177  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6178  }
  6179  
  6180  // Do executes the "ml.projects.locations.studies.trials.addMeasurement" call.
  6181  // Any non-2xx status code is an error. Response headers are in either
  6182  // *GoogleCloudMlV1__Trial.ServerResponse.Header or (if a response was returned
  6183  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6184  // check whether the returned error was because http.StatusNotModified was
  6185  // returned.
  6186  func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
  6187  	gensupport.SetOptions(c.urlParams_, opts...)
  6188  	res, err := c.doRequest("json")
  6189  	if res != nil && res.StatusCode == http.StatusNotModified {
  6190  		if res.Body != nil {
  6191  			res.Body.Close()
  6192  		}
  6193  		return nil, gensupport.WrapError(&googleapi.Error{
  6194  			Code:   res.StatusCode,
  6195  			Header: res.Header,
  6196  		})
  6197  	}
  6198  	if err != nil {
  6199  		return nil, err
  6200  	}
  6201  	defer googleapi.CloseBody(res)
  6202  	if err := googleapi.CheckResponse(res); err != nil {
  6203  		return nil, gensupport.WrapError(err)
  6204  	}
  6205  	ret := &GoogleCloudMlV1__Trial{
  6206  		ServerResponse: googleapi.ServerResponse{
  6207  			Header:         res.Header,
  6208  			HTTPStatusCode: res.StatusCode,
  6209  		},
  6210  	}
  6211  	target := &ret
  6212  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6213  		return nil, err
  6214  	}
  6215  	return ret, nil
  6216  }
  6217  
  6218  type ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall struct {
  6219  	s                                                    *Service
  6220  	name                                                 string
  6221  	googlecloudmlv1__checktrialearlystoppingstaterequest *GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest
  6222  	urlParams_                                           gensupport.URLParams
  6223  	ctx_                                                 context.Context
  6224  	header_                                              http.Header
  6225  }
  6226  
  6227  // CheckEarlyStoppingState: Checks whether a trial should stop or not. Returns
  6228  // a long-running operation. When the operation is successful, it will contain
  6229  // a CheckTrialEarlyStoppingStateResponse.
  6230  //
  6231  // - name: The trial name.
  6232  func (r *ProjectsLocationsStudiesTrialsService) CheckEarlyStoppingState(name string, googlecloudmlv1__checktrialearlystoppingstaterequest *GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
  6233  	c := &ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6234  	c.name = name
  6235  	c.googlecloudmlv1__checktrialearlystoppingstaterequest = googlecloudmlv1__checktrialearlystoppingstaterequest
  6236  	return c
  6237  }
  6238  
  6239  // Fields allows partial responses to be retrieved. See
  6240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6241  // details.
  6242  func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
  6243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6244  	return c
  6245  }
  6246  
  6247  // Context sets the context to be used in this call's Do method.
  6248  func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
  6249  	c.ctx_ = ctx
  6250  	return c
  6251  }
  6252  
  6253  // Header returns a http.Header that can be modified by the caller to add
  6254  // headers to the request.
  6255  func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Header() http.Header {
  6256  	if c.header_ == nil {
  6257  		c.header_ = make(http.Header)
  6258  	}
  6259  	return c.header_
  6260  }
  6261  
  6262  func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) doRequest(alt string) (*http.Response, error) {
  6263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6264  	var body io.Reader = nil
  6265  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__checktrialearlystoppingstaterequest)
  6266  	if err != nil {
  6267  		return nil, err
  6268  	}
  6269  	c.urlParams_.Set("alt", alt)
  6270  	c.urlParams_.Set("prettyPrint", "false")
  6271  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkEarlyStoppingState")
  6272  	urls += "?" + c.urlParams_.Encode()
  6273  	req, err := http.NewRequest("POST", urls, body)
  6274  	if err != nil {
  6275  		return nil, err
  6276  	}
  6277  	req.Header = reqHeaders
  6278  	googleapi.Expand(req.URL, map[string]string{
  6279  		"name": c.name,
  6280  	})
  6281  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6282  }
  6283  
  6284  // Do executes the "ml.projects.locations.studies.trials.checkEarlyStoppingState" call.
  6285  // Any non-2xx status code is an error. Response headers are in either
  6286  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  6287  // returned at all) in error.(*googleapi.Error).Header. Use
  6288  // googleapi.IsNotModified to check whether the returned error was because
  6289  // http.StatusNotModified was returned.
  6290  func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  6291  	gensupport.SetOptions(c.urlParams_, opts...)
  6292  	res, err := c.doRequest("json")
  6293  	if res != nil && res.StatusCode == http.StatusNotModified {
  6294  		if res.Body != nil {
  6295  			res.Body.Close()
  6296  		}
  6297  		return nil, gensupport.WrapError(&googleapi.Error{
  6298  			Code:   res.StatusCode,
  6299  			Header: res.Header,
  6300  		})
  6301  	}
  6302  	if err != nil {
  6303  		return nil, err
  6304  	}
  6305  	defer googleapi.CloseBody(res)
  6306  	if err := googleapi.CheckResponse(res); err != nil {
  6307  		return nil, gensupport.WrapError(err)
  6308  	}
  6309  	ret := &GoogleLongrunning__Operation{
  6310  		ServerResponse: googleapi.ServerResponse{
  6311  			Header:         res.Header,
  6312  			HTTPStatusCode: res.StatusCode,
  6313  		},
  6314  	}
  6315  	target := &ret
  6316  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6317  		return nil, err
  6318  	}
  6319  	return ret, nil
  6320  }
  6321  
  6322  type ProjectsLocationsStudiesTrialsCompleteCall struct {
  6323  	s                                     *Service
  6324  	name                                  string
  6325  	googlecloudmlv1__completetrialrequest *GoogleCloudMlV1__CompleteTrialRequest
  6326  	urlParams_                            gensupport.URLParams
  6327  	ctx_                                  context.Context
  6328  	header_                               http.Header
  6329  }
  6330  
  6331  // Complete: Marks a trial as complete.
  6332  //
  6333  // - name: The trial name.metat.
  6334  func (r *ProjectsLocationsStudiesTrialsService) Complete(name string, googlecloudmlv1__completetrialrequest *GoogleCloudMlV1__CompleteTrialRequest) *ProjectsLocationsStudiesTrialsCompleteCall {
  6335  	c := &ProjectsLocationsStudiesTrialsCompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6336  	c.name = name
  6337  	c.googlecloudmlv1__completetrialrequest = googlecloudmlv1__completetrialrequest
  6338  	return c
  6339  }
  6340  
  6341  // Fields allows partial responses to be retrieved. See
  6342  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6343  // details.
  6344  func (c *ProjectsLocationsStudiesTrialsCompleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCompleteCall {
  6345  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6346  	return c
  6347  }
  6348  
  6349  // Context sets the context to be used in this call's Do method.
  6350  func (c *ProjectsLocationsStudiesTrialsCompleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCompleteCall {
  6351  	c.ctx_ = ctx
  6352  	return c
  6353  }
  6354  
  6355  // Header returns a http.Header that can be modified by the caller to add
  6356  // headers to the request.
  6357  func (c *ProjectsLocationsStudiesTrialsCompleteCall) Header() http.Header {
  6358  	if c.header_ == nil {
  6359  		c.header_ = make(http.Header)
  6360  	}
  6361  	return c.header_
  6362  }
  6363  
  6364  func (c *ProjectsLocationsStudiesTrialsCompleteCall) doRequest(alt string) (*http.Response, error) {
  6365  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6366  	var body io.Reader = nil
  6367  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__completetrialrequest)
  6368  	if err != nil {
  6369  		return nil, err
  6370  	}
  6371  	c.urlParams_.Set("alt", alt)
  6372  	c.urlParams_.Set("prettyPrint", "false")
  6373  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:complete")
  6374  	urls += "?" + c.urlParams_.Encode()
  6375  	req, err := http.NewRequest("POST", urls, body)
  6376  	if err != nil {
  6377  		return nil, err
  6378  	}
  6379  	req.Header = reqHeaders
  6380  	googleapi.Expand(req.URL, map[string]string{
  6381  		"name": c.name,
  6382  	})
  6383  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6384  }
  6385  
  6386  // Do executes the "ml.projects.locations.studies.trials.complete" call.
  6387  // Any non-2xx status code is an error. Response headers are in either
  6388  // *GoogleCloudMlV1__Trial.ServerResponse.Header or (if a response was returned
  6389  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6390  // check whether the returned error was because http.StatusNotModified was
  6391  // returned.
  6392  func (c *ProjectsLocationsStudiesTrialsCompleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
  6393  	gensupport.SetOptions(c.urlParams_, opts...)
  6394  	res, err := c.doRequest("json")
  6395  	if res != nil && res.StatusCode == http.StatusNotModified {
  6396  		if res.Body != nil {
  6397  			res.Body.Close()
  6398  		}
  6399  		return nil, gensupport.WrapError(&googleapi.Error{
  6400  			Code:   res.StatusCode,
  6401  			Header: res.Header,
  6402  		})
  6403  	}
  6404  	if err != nil {
  6405  		return nil, err
  6406  	}
  6407  	defer googleapi.CloseBody(res)
  6408  	if err := googleapi.CheckResponse(res); err != nil {
  6409  		return nil, gensupport.WrapError(err)
  6410  	}
  6411  	ret := &GoogleCloudMlV1__Trial{
  6412  		ServerResponse: googleapi.ServerResponse{
  6413  			Header:         res.Header,
  6414  			HTTPStatusCode: res.StatusCode,
  6415  		},
  6416  	}
  6417  	target := &ret
  6418  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6419  		return nil, err
  6420  	}
  6421  	return ret, nil
  6422  }
  6423  
  6424  type ProjectsLocationsStudiesTrialsCreateCall struct {
  6425  	s                      *Service
  6426  	parent                 string
  6427  	googlecloudmlv1__trial *GoogleCloudMlV1__Trial
  6428  	urlParams_             gensupport.URLParams
  6429  	ctx_                   context.Context
  6430  	header_                http.Header
  6431  }
  6432  
  6433  // Create: Adds a user provided trial to a study.
  6434  //
  6435  // - parent: The name of the study that the trial belongs to.
  6436  func (r *ProjectsLocationsStudiesTrialsService) Create(parent string, googlecloudmlv1__trial *GoogleCloudMlV1__Trial) *ProjectsLocationsStudiesTrialsCreateCall {
  6437  	c := &ProjectsLocationsStudiesTrialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6438  	c.parent = parent
  6439  	c.googlecloudmlv1__trial = googlecloudmlv1__trial
  6440  	return c
  6441  }
  6442  
  6443  // Fields allows partial responses to be retrieved. See
  6444  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6445  // details.
  6446  func (c *ProjectsLocationsStudiesTrialsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCreateCall {
  6447  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6448  	return c
  6449  }
  6450  
  6451  // Context sets the context to be used in this call's Do method.
  6452  func (c *ProjectsLocationsStudiesTrialsCreateCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCreateCall {
  6453  	c.ctx_ = ctx
  6454  	return c
  6455  }
  6456  
  6457  // Header returns a http.Header that can be modified by the caller to add
  6458  // headers to the request.
  6459  func (c *ProjectsLocationsStudiesTrialsCreateCall) Header() http.Header {
  6460  	if c.header_ == nil {
  6461  		c.header_ = make(http.Header)
  6462  	}
  6463  	return c.header_
  6464  }
  6465  
  6466  func (c *ProjectsLocationsStudiesTrialsCreateCall) doRequest(alt string) (*http.Response, error) {
  6467  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6468  	var body io.Reader = nil
  6469  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__trial)
  6470  	if err != nil {
  6471  		return nil, err
  6472  	}
  6473  	c.urlParams_.Set("alt", alt)
  6474  	c.urlParams_.Set("prettyPrint", "false")
  6475  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials")
  6476  	urls += "?" + c.urlParams_.Encode()
  6477  	req, err := http.NewRequest("POST", urls, body)
  6478  	if err != nil {
  6479  		return nil, err
  6480  	}
  6481  	req.Header = reqHeaders
  6482  	googleapi.Expand(req.URL, map[string]string{
  6483  		"parent": c.parent,
  6484  	})
  6485  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6486  }
  6487  
  6488  // Do executes the "ml.projects.locations.studies.trials.create" call.
  6489  // Any non-2xx status code is an error. Response headers are in either
  6490  // *GoogleCloudMlV1__Trial.ServerResponse.Header or (if a response was returned
  6491  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6492  // check whether the returned error was because http.StatusNotModified was
  6493  // returned.
  6494  func (c *ProjectsLocationsStudiesTrialsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
  6495  	gensupport.SetOptions(c.urlParams_, opts...)
  6496  	res, err := c.doRequest("json")
  6497  	if res != nil && res.StatusCode == http.StatusNotModified {
  6498  		if res.Body != nil {
  6499  			res.Body.Close()
  6500  		}
  6501  		return nil, gensupport.WrapError(&googleapi.Error{
  6502  			Code:   res.StatusCode,
  6503  			Header: res.Header,
  6504  		})
  6505  	}
  6506  	if err != nil {
  6507  		return nil, err
  6508  	}
  6509  	defer googleapi.CloseBody(res)
  6510  	if err := googleapi.CheckResponse(res); err != nil {
  6511  		return nil, gensupport.WrapError(err)
  6512  	}
  6513  	ret := &GoogleCloudMlV1__Trial{
  6514  		ServerResponse: googleapi.ServerResponse{
  6515  			Header:         res.Header,
  6516  			HTTPStatusCode: res.StatusCode,
  6517  		},
  6518  	}
  6519  	target := &ret
  6520  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6521  		return nil, err
  6522  	}
  6523  	return ret, nil
  6524  }
  6525  
  6526  type ProjectsLocationsStudiesTrialsDeleteCall struct {
  6527  	s          *Service
  6528  	name       string
  6529  	urlParams_ gensupport.URLParams
  6530  	ctx_       context.Context
  6531  	header_    http.Header
  6532  }
  6533  
  6534  // Delete: Deletes a trial.
  6535  //
  6536  // - name: The trial name.
  6537  func (r *ProjectsLocationsStudiesTrialsService) Delete(name string) *ProjectsLocationsStudiesTrialsDeleteCall {
  6538  	c := &ProjectsLocationsStudiesTrialsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6539  	c.name = name
  6540  	return c
  6541  }
  6542  
  6543  // Fields allows partial responses to be retrieved. See
  6544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6545  // details.
  6546  func (c *ProjectsLocationsStudiesTrialsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsDeleteCall {
  6547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6548  	return c
  6549  }
  6550  
  6551  // Context sets the context to be used in this call's Do method.
  6552  func (c *ProjectsLocationsStudiesTrialsDeleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsDeleteCall {
  6553  	c.ctx_ = ctx
  6554  	return c
  6555  }
  6556  
  6557  // Header returns a http.Header that can be modified by the caller to add
  6558  // headers to the request.
  6559  func (c *ProjectsLocationsStudiesTrialsDeleteCall) Header() http.Header {
  6560  	if c.header_ == nil {
  6561  		c.header_ = make(http.Header)
  6562  	}
  6563  	return c.header_
  6564  }
  6565  
  6566  func (c *ProjectsLocationsStudiesTrialsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6568  	var body io.Reader = nil
  6569  	c.urlParams_.Set("alt", alt)
  6570  	c.urlParams_.Set("prettyPrint", "false")
  6571  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6572  	urls += "?" + c.urlParams_.Encode()
  6573  	req, err := http.NewRequest("DELETE", urls, body)
  6574  	if err != nil {
  6575  		return nil, err
  6576  	}
  6577  	req.Header = reqHeaders
  6578  	googleapi.Expand(req.URL, map[string]string{
  6579  		"name": c.name,
  6580  	})
  6581  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6582  }
  6583  
  6584  // Do executes the "ml.projects.locations.studies.trials.delete" call.
  6585  // Any non-2xx status code is an error. Response headers are in either
  6586  // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was returned
  6587  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6588  // check whether the returned error was because http.StatusNotModified was
  6589  // returned.
  6590  func (c *ProjectsLocationsStudiesTrialsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  6591  	gensupport.SetOptions(c.urlParams_, opts...)
  6592  	res, err := c.doRequest("json")
  6593  	if res != nil && res.StatusCode == http.StatusNotModified {
  6594  		if res.Body != nil {
  6595  			res.Body.Close()
  6596  		}
  6597  		return nil, gensupport.WrapError(&googleapi.Error{
  6598  			Code:   res.StatusCode,
  6599  			Header: res.Header,
  6600  		})
  6601  	}
  6602  	if err != nil {
  6603  		return nil, err
  6604  	}
  6605  	defer googleapi.CloseBody(res)
  6606  	if err := googleapi.CheckResponse(res); err != nil {
  6607  		return nil, gensupport.WrapError(err)
  6608  	}
  6609  	ret := &GoogleProtobuf__Empty{
  6610  		ServerResponse: googleapi.ServerResponse{
  6611  			Header:         res.Header,
  6612  			HTTPStatusCode: res.StatusCode,
  6613  		},
  6614  	}
  6615  	target := &ret
  6616  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6617  		return nil, err
  6618  	}
  6619  	return ret, nil
  6620  }
  6621  
  6622  type ProjectsLocationsStudiesTrialsGetCall struct {
  6623  	s            *Service
  6624  	name         string
  6625  	urlParams_   gensupport.URLParams
  6626  	ifNoneMatch_ string
  6627  	ctx_         context.Context
  6628  	header_      http.Header
  6629  }
  6630  
  6631  // Get: Gets a trial.
  6632  //
  6633  // - name: The trial name.
  6634  func (r *ProjectsLocationsStudiesTrialsService) Get(name string) *ProjectsLocationsStudiesTrialsGetCall {
  6635  	c := &ProjectsLocationsStudiesTrialsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6636  	c.name = name
  6637  	return c
  6638  }
  6639  
  6640  // Fields allows partial responses to be retrieved. See
  6641  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6642  // details.
  6643  func (c *ProjectsLocationsStudiesTrialsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsGetCall {
  6644  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6645  	return c
  6646  }
  6647  
  6648  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6649  // object's ETag matches the given value. This is useful for getting updates
  6650  // only after the object has changed since the last request.
  6651  func (c *ProjectsLocationsStudiesTrialsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesTrialsGetCall {
  6652  	c.ifNoneMatch_ = entityTag
  6653  	return c
  6654  }
  6655  
  6656  // Context sets the context to be used in this call's Do method.
  6657  func (c *ProjectsLocationsStudiesTrialsGetCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsGetCall {
  6658  	c.ctx_ = ctx
  6659  	return c
  6660  }
  6661  
  6662  // Header returns a http.Header that can be modified by the caller to add
  6663  // headers to the request.
  6664  func (c *ProjectsLocationsStudiesTrialsGetCall) Header() http.Header {
  6665  	if c.header_ == nil {
  6666  		c.header_ = make(http.Header)
  6667  	}
  6668  	return c.header_
  6669  }
  6670  
  6671  func (c *ProjectsLocationsStudiesTrialsGetCall) doRequest(alt string) (*http.Response, error) {
  6672  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6673  	if c.ifNoneMatch_ != "" {
  6674  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6675  	}
  6676  	var body io.Reader = nil
  6677  	c.urlParams_.Set("alt", alt)
  6678  	c.urlParams_.Set("prettyPrint", "false")
  6679  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6680  	urls += "?" + c.urlParams_.Encode()
  6681  	req, err := http.NewRequest("GET", urls, body)
  6682  	if err != nil {
  6683  		return nil, err
  6684  	}
  6685  	req.Header = reqHeaders
  6686  	googleapi.Expand(req.URL, map[string]string{
  6687  		"name": c.name,
  6688  	})
  6689  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6690  }
  6691  
  6692  // Do executes the "ml.projects.locations.studies.trials.get" call.
  6693  // Any non-2xx status code is an error. Response headers are in either
  6694  // *GoogleCloudMlV1__Trial.ServerResponse.Header or (if a response was returned
  6695  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6696  // check whether the returned error was because http.StatusNotModified was
  6697  // returned.
  6698  func (c *ProjectsLocationsStudiesTrialsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
  6699  	gensupport.SetOptions(c.urlParams_, opts...)
  6700  	res, err := c.doRequest("json")
  6701  	if res != nil && res.StatusCode == http.StatusNotModified {
  6702  		if res.Body != nil {
  6703  			res.Body.Close()
  6704  		}
  6705  		return nil, gensupport.WrapError(&googleapi.Error{
  6706  			Code:   res.StatusCode,
  6707  			Header: res.Header,
  6708  		})
  6709  	}
  6710  	if err != nil {
  6711  		return nil, err
  6712  	}
  6713  	defer googleapi.CloseBody(res)
  6714  	if err := googleapi.CheckResponse(res); err != nil {
  6715  		return nil, gensupport.WrapError(err)
  6716  	}
  6717  	ret := &GoogleCloudMlV1__Trial{
  6718  		ServerResponse: googleapi.ServerResponse{
  6719  			Header:         res.Header,
  6720  			HTTPStatusCode: res.StatusCode,
  6721  		},
  6722  	}
  6723  	target := &ret
  6724  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6725  		return nil, err
  6726  	}
  6727  	return ret, nil
  6728  }
  6729  
  6730  type ProjectsLocationsStudiesTrialsListCall struct {
  6731  	s            *Service
  6732  	parent       string
  6733  	urlParams_   gensupport.URLParams
  6734  	ifNoneMatch_ string
  6735  	ctx_         context.Context
  6736  	header_      http.Header
  6737  }
  6738  
  6739  // List: Lists the trials associated with a study.
  6740  //
  6741  // - parent: The name of the study that the trial belongs to.
  6742  func (r *ProjectsLocationsStudiesTrialsService) List(parent string) *ProjectsLocationsStudiesTrialsListCall {
  6743  	c := &ProjectsLocationsStudiesTrialsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6744  	c.parent = parent
  6745  	return c
  6746  }
  6747  
  6748  // Fields allows partial responses to be retrieved. See
  6749  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6750  // details.
  6751  func (c *ProjectsLocationsStudiesTrialsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsListCall {
  6752  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6753  	return c
  6754  }
  6755  
  6756  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6757  // object's ETag matches the given value. This is useful for getting updates
  6758  // only after the object has changed since the last request.
  6759  func (c *ProjectsLocationsStudiesTrialsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesTrialsListCall {
  6760  	c.ifNoneMatch_ = entityTag
  6761  	return c
  6762  }
  6763  
  6764  // Context sets the context to be used in this call's Do method.
  6765  func (c *ProjectsLocationsStudiesTrialsListCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsListCall {
  6766  	c.ctx_ = ctx
  6767  	return c
  6768  }
  6769  
  6770  // Header returns a http.Header that can be modified by the caller to add
  6771  // headers to the request.
  6772  func (c *ProjectsLocationsStudiesTrialsListCall) Header() http.Header {
  6773  	if c.header_ == nil {
  6774  		c.header_ = make(http.Header)
  6775  	}
  6776  	return c.header_
  6777  }
  6778  
  6779  func (c *ProjectsLocationsStudiesTrialsListCall) doRequest(alt string) (*http.Response, error) {
  6780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6781  	if c.ifNoneMatch_ != "" {
  6782  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6783  	}
  6784  	var body io.Reader = nil
  6785  	c.urlParams_.Set("alt", alt)
  6786  	c.urlParams_.Set("prettyPrint", "false")
  6787  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials")
  6788  	urls += "?" + c.urlParams_.Encode()
  6789  	req, err := http.NewRequest("GET", urls, body)
  6790  	if err != nil {
  6791  		return nil, err
  6792  	}
  6793  	req.Header = reqHeaders
  6794  	googleapi.Expand(req.URL, map[string]string{
  6795  		"parent": c.parent,
  6796  	})
  6797  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6798  }
  6799  
  6800  // Do executes the "ml.projects.locations.studies.trials.list" call.
  6801  // Any non-2xx status code is an error. Response headers are in either
  6802  // *GoogleCloudMlV1__ListTrialsResponse.ServerResponse.Header or (if a response
  6803  // was returned at all) in error.(*googleapi.Error).Header. Use
  6804  // googleapi.IsNotModified to check whether the returned error was because
  6805  // http.StatusNotModified was returned.
  6806  func (c *ProjectsLocationsStudiesTrialsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListTrialsResponse, error) {
  6807  	gensupport.SetOptions(c.urlParams_, opts...)
  6808  	res, err := c.doRequest("json")
  6809  	if res != nil && res.StatusCode == http.StatusNotModified {
  6810  		if res.Body != nil {
  6811  			res.Body.Close()
  6812  		}
  6813  		return nil, gensupport.WrapError(&googleapi.Error{
  6814  			Code:   res.StatusCode,
  6815  			Header: res.Header,
  6816  		})
  6817  	}
  6818  	if err != nil {
  6819  		return nil, err
  6820  	}
  6821  	defer googleapi.CloseBody(res)
  6822  	if err := googleapi.CheckResponse(res); err != nil {
  6823  		return nil, gensupport.WrapError(err)
  6824  	}
  6825  	ret := &GoogleCloudMlV1__ListTrialsResponse{
  6826  		ServerResponse: googleapi.ServerResponse{
  6827  			Header:         res.Header,
  6828  			HTTPStatusCode: res.StatusCode,
  6829  		},
  6830  	}
  6831  	target := &ret
  6832  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6833  		return nil, err
  6834  	}
  6835  	return ret, nil
  6836  }
  6837  
  6838  type ProjectsLocationsStudiesTrialsListOptimalTrialsCall struct {
  6839  	s                                         *Service
  6840  	parent                                    string
  6841  	googlecloudmlv1__listoptimaltrialsrequest *GoogleCloudMlV1__ListOptimalTrialsRequest
  6842  	urlParams_                                gensupport.URLParams
  6843  	ctx_                                      context.Context
  6844  	header_                                   http.Header
  6845  }
  6846  
  6847  // ListOptimalTrials: Lists the pareto-optimal trials for multi-objective study
  6848  // or the optimal trials for single-objective study. The definition of
  6849  // pareto-optimal can be checked in wiki page.
  6850  // https://en.wikipedia.org/wiki/Pareto_efficiency
  6851  //
  6852  // - parent: The name of the study that the pareto-optimal trial belongs to.
  6853  func (r *ProjectsLocationsStudiesTrialsService) ListOptimalTrials(parent string, googlecloudmlv1__listoptimaltrialsrequest *GoogleCloudMlV1__ListOptimalTrialsRequest) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
  6854  	c := &ProjectsLocationsStudiesTrialsListOptimalTrialsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6855  	c.parent = parent
  6856  	c.googlecloudmlv1__listoptimaltrialsrequest = googlecloudmlv1__listoptimaltrialsrequest
  6857  	return c
  6858  }
  6859  
  6860  // Fields allows partial responses to be retrieved. See
  6861  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6862  // details.
  6863  func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
  6864  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6865  	return c
  6866  }
  6867  
  6868  // Context sets the context to be used in this call's Do method.
  6869  func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
  6870  	c.ctx_ = ctx
  6871  	return c
  6872  }
  6873  
  6874  // Header returns a http.Header that can be modified by the caller to add
  6875  // headers to the request.
  6876  func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Header() http.Header {
  6877  	if c.header_ == nil {
  6878  		c.header_ = make(http.Header)
  6879  	}
  6880  	return c.header_
  6881  }
  6882  
  6883  func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) doRequest(alt string) (*http.Response, error) {
  6884  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6885  	var body io.Reader = nil
  6886  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__listoptimaltrialsrequest)
  6887  	if err != nil {
  6888  		return nil, err
  6889  	}
  6890  	c.urlParams_.Set("alt", alt)
  6891  	c.urlParams_.Set("prettyPrint", "false")
  6892  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials:listOptimalTrials")
  6893  	urls += "?" + c.urlParams_.Encode()
  6894  	req, err := http.NewRequest("POST", urls, body)
  6895  	if err != nil {
  6896  		return nil, err
  6897  	}
  6898  	req.Header = reqHeaders
  6899  	googleapi.Expand(req.URL, map[string]string{
  6900  		"parent": c.parent,
  6901  	})
  6902  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6903  }
  6904  
  6905  // Do executes the "ml.projects.locations.studies.trials.listOptimalTrials" call.
  6906  // Any non-2xx status code is an error. Response headers are in either
  6907  // *GoogleCloudMlV1__ListOptimalTrialsResponse.ServerResponse.Header or (if a
  6908  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6909  // googleapi.IsNotModified to check whether the returned error was because
  6910  // http.StatusNotModified was returned.
  6911  func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListOptimalTrialsResponse, error) {
  6912  	gensupport.SetOptions(c.urlParams_, opts...)
  6913  	res, err := c.doRequest("json")
  6914  	if res != nil && res.StatusCode == http.StatusNotModified {
  6915  		if res.Body != nil {
  6916  			res.Body.Close()
  6917  		}
  6918  		return nil, gensupport.WrapError(&googleapi.Error{
  6919  			Code:   res.StatusCode,
  6920  			Header: res.Header,
  6921  		})
  6922  	}
  6923  	if err != nil {
  6924  		return nil, err
  6925  	}
  6926  	defer googleapi.CloseBody(res)
  6927  	if err := googleapi.CheckResponse(res); err != nil {
  6928  		return nil, gensupport.WrapError(err)
  6929  	}
  6930  	ret := &GoogleCloudMlV1__ListOptimalTrialsResponse{
  6931  		ServerResponse: googleapi.ServerResponse{
  6932  			Header:         res.Header,
  6933  			HTTPStatusCode: res.StatusCode,
  6934  		},
  6935  	}
  6936  	target := &ret
  6937  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6938  		return nil, err
  6939  	}
  6940  	return ret, nil
  6941  }
  6942  
  6943  type ProjectsLocationsStudiesTrialsStopCall struct {
  6944  	s                                 *Service
  6945  	name                              string
  6946  	googlecloudmlv1__stoptrialrequest *GoogleCloudMlV1__StopTrialRequest
  6947  	urlParams_                        gensupport.URLParams
  6948  	ctx_                              context.Context
  6949  	header_                           http.Header
  6950  }
  6951  
  6952  // Stop: Stops a trial.
  6953  //
  6954  // - name: The trial name.
  6955  func (r *ProjectsLocationsStudiesTrialsService) Stop(name string, googlecloudmlv1__stoptrialrequest *GoogleCloudMlV1__StopTrialRequest) *ProjectsLocationsStudiesTrialsStopCall {
  6956  	c := &ProjectsLocationsStudiesTrialsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6957  	c.name = name
  6958  	c.googlecloudmlv1__stoptrialrequest = googlecloudmlv1__stoptrialrequest
  6959  	return c
  6960  }
  6961  
  6962  // Fields allows partial responses to be retrieved. See
  6963  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6964  // details.
  6965  func (c *ProjectsLocationsStudiesTrialsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsStopCall {
  6966  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6967  	return c
  6968  }
  6969  
  6970  // Context sets the context to be used in this call's Do method.
  6971  func (c *ProjectsLocationsStudiesTrialsStopCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsStopCall {
  6972  	c.ctx_ = ctx
  6973  	return c
  6974  }
  6975  
  6976  // Header returns a http.Header that can be modified by the caller to add
  6977  // headers to the request.
  6978  func (c *ProjectsLocationsStudiesTrialsStopCall) Header() http.Header {
  6979  	if c.header_ == nil {
  6980  		c.header_ = make(http.Header)
  6981  	}
  6982  	return c.header_
  6983  }
  6984  
  6985  func (c *ProjectsLocationsStudiesTrialsStopCall) doRequest(alt string) (*http.Response, error) {
  6986  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6987  	var body io.Reader = nil
  6988  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__stoptrialrequest)
  6989  	if err != nil {
  6990  		return nil, err
  6991  	}
  6992  	c.urlParams_.Set("alt", alt)
  6993  	c.urlParams_.Set("prettyPrint", "false")
  6994  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop")
  6995  	urls += "?" + c.urlParams_.Encode()
  6996  	req, err := http.NewRequest("POST", urls, body)
  6997  	if err != nil {
  6998  		return nil, err
  6999  	}
  7000  	req.Header = reqHeaders
  7001  	googleapi.Expand(req.URL, map[string]string{
  7002  		"name": c.name,
  7003  	})
  7004  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7005  }
  7006  
  7007  // Do executes the "ml.projects.locations.studies.trials.stop" call.
  7008  // Any non-2xx status code is an error. Response headers are in either
  7009  // *GoogleCloudMlV1__Trial.ServerResponse.Header or (if a response was returned
  7010  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7011  // check whether the returned error was because http.StatusNotModified was
  7012  // returned.
  7013  func (c *ProjectsLocationsStudiesTrialsStopCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
  7014  	gensupport.SetOptions(c.urlParams_, opts...)
  7015  	res, err := c.doRequest("json")
  7016  	if res != nil && res.StatusCode == http.StatusNotModified {
  7017  		if res.Body != nil {
  7018  			res.Body.Close()
  7019  		}
  7020  		return nil, gensupport.WrapError(&googleapi.Error{
  7021  			Code:   res.StatusCode,
  7022  			Header: res.Header,
  7023  		})
  7024  	}
  7025  	if err != nil {
  7026  		return nil, err
  7027  	}
  7028  	defer googleapi.CloseBody(res)
  7029  	if err := googleapi.CheckResponse(res); err != nil {
  7030  		return nil, gensupport.WrapError(err)
  7031  	}
  7032  	ret := &GoogleCloudMlV1__Trial{
  7033  		ServerResponse: googleapi.ServerResponse{
  7034  			Header:         res.Header,
  7035  			HTTPStatusCode: res.StatusCode,
  7036  		},
  7037  	}
  7038  	target := &ret
  7039  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7040  		return nil, err
  7041  	}
  7042  	return ret, nil
  7043  }
  7044  
  7045  type ProjectsLocationsStudiesTrialsSuggestCall struct {
  7046  	s                                     *Service
  7047  	parent                                string
  7048  	googlecloudmlv1__suggesttrialsrequest *GoogleCloudMlV1__SuggestTrialsRequest
  7049  	urlParams_                            gensupport.URLParams
  7050  	ctx_                                  context.Context
  7051  	header_                               http.Header
  7052  }
  7053  
  7054  // Suggest: Adds one or more trials to a study, with parameter values suggested
  7055  // by AI Platform Vizier. Returns a long-running operation associated with the
  7056  // generation of trial suggestions. When this long-running operation succeeds,
  7057  // it will contain a SuggestTrialsResponse.
  7058  //
  7059  // - parent: The name of the study that the trial belongs to.
  7060  func (r *ProjectsLocationsStudiesTrialsService) Suggest(parent string, googlecloudmlv1__suggesttrialsrequest *GoogleCloudMlV1__SuggestTrialsRequest) *ProjectsLocationsStudiesTrialsSuggestCall {
  7061  	c := &ProjectsLocationsStudiesTrialsSuggestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7062  	c.parent = parent
  7063  	c.googlecloudmlv1__suggesttrialsrequest = googlecloudmlv1__suggesttrialsrequest
  7064  	return c
  7065  }
  7066  
  7067  // Fields allows partial responses to be retrieved. See
  7068  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7069  // details.
  7070  func (c *ProjectsLocationsStudiesTrialsSuggestCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsSuggestCall {
  7071  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7072  	return c
  7073  }
  7074  
  7075  // Context sets the context to be used in this call's Do method.
  7076  func (c *ProjectsLocationsStudiesTrialsSuggestCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsSuggestCall {
  7077  	c.ctx_ = ctx
  7078  	return c
  7079  }
  7080  
  7081  // Header returns a http.Header that can be modified by the caller to add
  7082  // headers to the request.
  7083  func (c *ProjectsLocationsStudiesTrialsSuggestCall) Header() http.Header {
  7084  	if c.header_ == nil {
  7085  		c.header_ = make(http.Header)
  7086  	}
  7087  	return c.header_
  7088  }
  7089  
  7090  func (c *ProjectsLocationsStudiesTrialsSuggestCall) doRequest(alt string) (*http.Response, error) {
  7091  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7092  	var body io.Reader = nil
  7093  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__suggesttrialsrequest)
  7094  	if err != nil {
  7095  		return nil, err
  7096  	}
  7097  	c.urlParams_.Set("alt", alt)
  7098  	c.urlParams_.Set("prettyPrint", "false")
  7099  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials:suggest")
  7100  	urls += "?" + c.urlParams_.Encode()
  7101  	req, err := http.NewRequest("POST", urls, body)
  7102  	if err != nil {
  7103  		return nil, err
  7104  	}
  7105  	req.Header = reqHeaders
  7106  	googleapi.Expand(req.URL, map[string]string{
  7107  		"parent": c.parent,
  7108  	})
  7109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7110  }
  7111  
  7112  // Do executes the "ml.projects.locations.studies.trials.suggest" call.
  7113  // Any non-2xx status code is an error. Response headers are in either
  7114  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  7115  // returned at all) in error.(*googleapi.Error).Header. Use
  7116  // googleapi.IsNotModified to check whether the returned error was because
  7117  // http.StatusNotModified was returned.
  7118  func (c *ProjectsLocationsStudiesTrialsSuggestCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  7119  	gensupport.SetOptions(c.urlParams_, opts...)
  7120  	res, err := c.doRequest("json")
  7121  	if res != nil && res.StatusCode == http.StatusNotModified {
  7122  		if res.Body != nil {
  7123  			res.Body.Close()
  7124  		}
  7125  		return nil, gensupport.WrapError(&googleapi.Error{
  7126  			Code:   res.StatusCode,
  7127  			Header: res.Header,
  7128  		})
  7129  	}
  7130  	if err != nil {
  7131  		return nil, err
  7132  	}
  7133  	defer googleapi.CloseBody(res)
  7134  	if err := googleapi.CheckResponse(res); err != nil {
  7135  		return nil, gensupport.WrapError(err)
  7136  	}
  7137  	ret := &GoogleLongrunning__Operation{
  7138  		ServerResponse: googleapi.ServerResponse{
  7139  			Header:         res.Header,
  7140  			HTTPStatusCode: res.StatusCode,
  7141  		},
  7142  	}
  7143  	target := &ret
  7144  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7145  		return nil, err
  7146  	}
  7147  	return ret, nil
  7148  }
  7149  
  7150  type ProjectsModelsCreateCall struct {
  7151  	s                      *Service
  7152  	parent                 string
  7153  	googlecloudmlv1__model *GoogleCloudMlV1__Model
  7154  	urlParams_             gensupport.URLParams
  7155  	ctx_                   context.Context
  7156  	header_                http.Header
  7157  }
  7158  
  7159  // Create: Creates a model which will later contain one or more versions. You
  7160  // must add at least one version before you can request predictions from the
  7161  // model. Add versions by calling projects.models.versions.create.
  7162  //
  7163  // - parent: The project name.
  7164  func (r *ProjectsModelsService) Create(parent string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsCreateCall {
  7165  	c := &ProjectsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7166  	c.parent = parent
  7167  	c.googlecloudmlv1__model = googlecloudmlv1__model
  7168  	return c
  7169  }
  7170  
  7171  // Fields allows partial responses to be retrieved. See
  7172  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7173  // details.
  7174  func (c *ProjectsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsCreateCall {
  7175  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7176  	return c
  7177  }
  7178  
  7179  // Context sets the context to be used in this call's Do method.
  7180  func (c *ProjectsModelsCreateCall) Context(ctx context.Context) *ProjectsModelsCreateCall {
  7181  	c.ctx_ = ctx
  7182  	return c
  7183  }
  7184  
  7185  // Header returns a http.Header that can be modified by the caller to add
  7186  // headers to the request.
  7187  func (c *ProjectsModelsCreateCall) Header() http.Header {
  7188  	if c.header_ == nil {
  7189  		c.header_ = make(http.Header)
  7190  	}
  7191  	return c.header_
  7192  }
  7193  
  7194  func (c *ProjectsModelsCreateCall) doRequest(alt string) (*http.Response, error) {
  7195  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7196  	var body io.Reader = nil
  7197  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
  7198  	if err != nil {
  7199  		return nil, err
  7200  	}
  7201  	c.urlParams_.Set("alt", alt)
  7202  	c.urlParams_.Set("prettyPrint", "false")
  7203  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
  7204  	urls += "?" + c.urlParams_.Encode()
  7205  	req, err := http.NewRequest("POST", urls, body)
  7206  	if err != nil {
  7207  		return nil, err
  7208  	}
  7209  	req.Header = reqHeaders
  7210  	googleapi.Expand(req.URL, map[string]string{
  7211  		"parent": c.parent,
  7212  	})
  7213  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7214  }
  7215  
  7216  // Do executes the "ml.projects.models.create" call.
  7217  // Any non-2xx status code is an error. Response headers are in either
  7218  // *GoogleCloudMlV1__Model.ServerResponse.Header or (if a response was returned
  7219  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7220  // check whether the returned error was because http.StatusNotModified was
  7221  // returned.
  7222  func (c *ProjectsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
  7223  	gensupport.SetOptions(c.urlParams_, opts...)
  7224  	res, err := c.doRequest("json")
  7225  	if res != nil && res.StatusCode == http.StatusNotModified {
  7226  		if res.Body != nil {
  7227  			res.Body.Close()
  7228  		}
  7229  		return nil, gensupport.WrapError(&googleapi.Error{
  7230  			Code:   res.StatusCode,
  7231  			Header: res.Header,
  7232  		})
  7233  	}
  7234  	if err != nil {
  7235  		return nil, err
  7236  	}
  7237  	defer googleapi.CloseBody(res)
  7238  	if err := googleapi.CheckResponse(res); err != nil {
  7239  		return nil, gensupport.WrapError(err)
  7240  	}
  7241  	ret := &GoogleCloudMlV1__Model{
  7242  		ServerResponse: googleapi.ServerResponse{
  7243  			Header:         res.Header,
  7244  			HTTPStatusCode: res.StatusCode,
  7245  		},
  7246  	}
  7247  	target := &ret
  7248  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7249  		return nil, err
  7250  	}
  7251  	return ret, nil
  7252  }
  7253  
  7254  type ProjectsModelsDeleteCall struct {
  7255  	s          *Service
  7256  	name       string
  7257  	urlParams_ gensupport.URLParams
  7258  	ctx_       context.Context
  7259  	header_    http.Header
  7260  }
  7261  
  7262  // Delete: Deletes a model. You can only delete a model if there are no
  7263  // versions in it. You can delete versions by calling
  7264  // projects.models.versions.delete.
  7265  //
  7266  // - name: The name of the model.
  7267  func (r *ProjectsModelsService) Delete(name string) *ProjectsModelsDeleteCall {
  7268  	c := &ProjectsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7269  	c.name = name
  7270  	return c
  7271  }
  7272  
  7273  // Fields allows partial responses to be retrieved. See
  7274  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7275  // details.
  7276  func (c *ProjectsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsDeleteCall {
  7277  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7278  	return c
  7279  }
  7280  
  7281  // Context sets the context to be used in this call's Do method.
  7282  func (c *ProjectsModelsDeleteCall) Context(ctx context.Context) *ProjectsModelsDeleteCall {
  7283  	c.ctx_ = ctx
  7284  	return c
  7285  }
  7286  
  7287  // Header returns a http.Header that can be modified by the caller to add
  7288  // headers to the request.
  7289  func (c *ProjectsModelsDeleteCall) Header() http.Header {
  7290  	if c.header_ == nil {
  7291  		c.header_ = make(http.Header)
  7292  	}
  7293  	return c.header_
  7294  }
  7295  
  7296  func (c *ProjectsModelsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7297  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7298  	var body io.Reader = nil
  7299  	c.urlParams_.Set("alt", alt)
  7300  	c.urlParams_.Set("prettyPrint", "false")
  7301  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7302  	urls += "?" + c.urlParams_.Encode()
  7303  	req, err := http.NewRequest("DELETE", urls, body)
  7304  	if err != nil {
  7305  		return nil, err
  7306  	}
  7307  	req.Header = reqHeaders
  7308  	googleapi.Expand(req.URL, map[string]string{
  7309  		"name": c.name,
  7310  	})
  7311  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7312  }
  7313  
  7314  // Do executes the "ml.projects.models.delete" call.
  7315  // Any non-2xx status code is an error. Response headers are in either
  7316  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  7317  // returned at all) in error.(*googleapi.Error).Header. Use
  7318  // googleapi.IsNotModified to check whether the returned error was because
  7319  // http.StatusNotModified was returned.
  7320  func (c *ProjectsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  7321  	gensupport.SetOptions(c.urlParams_, opts...)
  7322  	res, err := c.doRequest("json")
  7323  	if res != nil && res.StatusCode == http.StatusNotModified {
  7324  		if res.Body != nil {
  7325  			res.Body.Close()
  7326  		}
  7327  		return nil, gensupport.WrapError(&googleapi.Error{
  7328  			Code:   res.StatusCode,
  7329  			Header: res.Header,
  7330  		})
  7331  	}
  7332  	if err != nil {
  7333  		return nil, err
  7334  	}
  7335  	defer googleapi.CloseBody(res)
  7336  	if err := googleapi.CheckResponse(res); err != nil {
  7337  		return nil, gensupport.WrapError(err)
  7338  	}
  7339  	ret := &GoogleLongrunning__Operation{
  7340  		ServerResponse: googleapi.ServerResponse{
  7341  			Header:         res.Header,
  7342  			HTTPStatusCode: res.StatusCode,
  7343  		},
  7344  	}
  7345  	target := &ret
  7346  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7347  		return nil, err
  7348  	}
  7349  	return ret, nil
  7350  }
  7351  
  7352  type ProjectsModelsGetCall struct {
  7353  	s            *Service
  7354  	name         string
  7355  	urlParams_   gensupport.URLParams
  7356  	ifNoneMatch_ string
  7357  	ctx_         context.Context
  7358  	header_      http.Header
  7359  }
  7360  
  7361  // Get: Gets information about a model, including its name, the description (if
  7362  // set), and the default version (if at least one version of the model has been
  7363  // deployed).
  7364  //
  7365  // - name: The name of the model.
  7366  func (r *ProjectsModelsService) Get(name string) *ProjectsModelsGetCall {
  7367  	c := &ProjectsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7368  	c.name = name
  7369  	return c
  7370  }
  7371  
  7372  // Fields allows partial responses to be retrieved. See
  7373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7374  // details.
  7375  func (c *ProjectsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsGetCall {
  7376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7377  	return c
  7378  }
  7379  
  7380  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7381  // object's ETag matches the given value. This is useful for getting updates
  7382  // only after the object has changed since the last request.
  7383  func (c *ProjectsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsGetCall {
  7384  	c.ifNoneMatch_ = entityTag
  7385  	return c
  7386  }
  7387  
  7388  // Context sets the context to be used in this call's Do method.
  7389  func (c *ProjectsModelsGetCall) Context(ctx context.Context) *ProjectsModelsGetCall {
  7390  	c.ctx_ = ctx
  7391  	return c
  7392  }
  7393  
  7394  // Header returns a http.Header that can be modified by the caller to add
  7395  // headers to the request.
  7396  func (c *ProjectsModelsGetCall) Header() http.Header {
  7397  	if c.header_ == nil {
  7398  		c.header_ = make(http.Header)
  7399  	}
  7400  	return c.header_
  7401  }
  7402  
  7403  func (c *ProjectsModelsGetCall) doRequest(alt string) (*http.Response, error) {
  7404  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7405  	if c.ifNoneMatch_ != "" {
  7406  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7407  	}
  7408  	var body io.Reader = nil
  7409  	c.urlParams_.Set("alt", alt)
  7410  	c.urlParams_.Set("prettyPrint", "false")
  7411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7412  	urls += "?" + c.urlParams_.Encode()
  7413  	req, err := http.NewRequest("GET", urls, body)
  7414  	if err != nil {
  7415  		return nil, err
  7416  	}
  7417  	req.Header = reqHeaders
  7418  	googleapi.Expand(req.URL, map[string]string{
  7419  		"name": c.name,
  7420  	})
  7421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7422  }
  7423  
  7424  // Do executes the "ml.projects.models.get" call.
  7425  // Any non-2xx status code is an error. Response headers are in either
  7426  // *GoogleCloudMlV1__Model.ServerResponse.Header or (if a response was returned
  7427  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7428  // check whether the returned error was because http.StatusNotModified was
  7429  // returned.
  7430  func (c *ProjectsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
  7431  	gensupport.SetOptions(c.urlParams_, opts...)
  7432  	res, err := c.doRequest("json")
  7433  	if res != nil && res.StatusCode == http.StatusNotModified {
  7434  		if res.Body != nil {
  7435  			res.Body.Close()
  7436  		}
  7437  		return nil, gensupport.WrapError(&googleapi.Error{
  7438  			Code:   res.StatusCode,
  7439  			Header: res.Header,
  7440  		})
  7441  	}
  7442  	if err != nil {
  7443  		return nil, err
  7444  	}
  7445  	defer googleapi.CloseBody(res)
  7446  	if err := googleapi.CheckResponse(res); err != nil {
  7447  		return nil, gensupport.WrapError(err)
  7448  	}
  7449  	ret := &GoogleCloudMlV1__Model{
  7450  		ServerResponse: googleapi.ServerResponse{
  7451  			Header:         res.Header,
  7452  			HTTPStatusCode: res.StatusCode,
  7453  		},
  7454  	}
  7455  	target := &ret
  7456  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7457  		return nil, err
  7458  	}
  7459  	return ret, nil
  7460  }
  7461  
  7462  type ProjectsModelsGetIamPolicyCall struct {
  7463  	s            *Service
  7464  	resource     string
  7465  	urlParams_   gensupport.URLParams
  7466  	ifNoneMatch_ string
  7467  	ctx_         context.Context
  7468  	header_      http.Header
  7469  }
  7470  
  7471  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  7472  // empty policy if the resource exists and does not have a policy set.
  7473  //
  7474  //   - resource: REQUIRED: The resource for which the policy is being requested.
  7475  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7476  //     for the appropriate value for this field.
  7477  func (r *ProjectsModelsService) GetIamPolicy(resource string) *ProjectsModelsGetIamPolicyCall {
  7478  	c := &ProjectsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7479  	c.resource = resource
  7480  	return c
  7481  }
  7482  
  7483  // OptionsRequestedPolicyVersion sets the optional parameter
  7484  // "options.requestedPolicyVersion": The maximum policy version that will be
  7485  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  7486  // an invalid value will be rejected. Requests for policies with any
  7487  // conditional role bindings must specify version 3. Policies with no
  7488  // conditional role bindings may specify any valid value or leave the field
  7489  // unset. The policy in the response might use the policy version that you
  7490  // specified, or it might use a lower policy version. For example, if you
  7491  // specify version 3, but the policy has no conditional role bindings, the
  7492  // response uses version 1. To learn which resources support conditions in
  7493  // their IAM policies, see the IAM documentation
  7494  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  7495  func (c *ProjectsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsModelsGetIamPolicyCall {
  7496  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  7497  	return c
  7498  }
  7499  
  7500  // Fields allows partial responses to be retrieved. See
  7501  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7502  // details.
  7503  func (c *ProjectsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsGetIamPolicyCall {
  7504  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7505  	return c
  7506  }
  7507  
  7508  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7509  // object's ETag matches the given value. This is useful for getting updates
  7510  // only after the object has changed since the last request.
  7511  func (c *ProjectsModelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsModelsGetIamPolicyCall {
  7512  	c.ifNoneMatch_ = entityTag
  7513  	return c
  7514  }
  7515  
  7516  // Context sets the context to be used in this call's Do method.
  7517  func (c *ProjectsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsGetIamPolicyCall {
  7518  	c.ctx_ = ctx
  7519  	return c
  7520  }
  7521  
  7522  // Header returns a http.Header that can be modified by the caller to add
  7523  // headers to the request.
  7524  func (c *ProjectsModelsGetIamPolicyCall) Header() http.Header {
  7525  	if c.header_ == nil {
  7526  		c.header_ = make(http.Header)
  7527  	}
  7528  	return c.header_
  7529  }
  7530  
  7531  func (c *ProjectsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7532  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7533  	if c.ifNoneMatch_ != "" {
  7534  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7535  	}
  7536  	var body io.Reader = nil
  7537  	c.urlParams_.Set("alt", alt)
  7538  	c.urlParams_.Set("prettyPrint", "false")
  7539  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  7540  	urls += "?" + c.urlParams_.Encode()
  7541  	req, err := http.NewRequest("GET", urls, body)
  7542  	if err != nil {
  7543  		return nil, err
  7544  	}
  7545  	req.Header = reqHeaders
  7546  	googleapi.Expand(req.URL, map[string]string{
  7547  		"resource": c.resource,
  7548  	})
  7549  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7550  }
  7551  
  7552  // Do executes the "ml.projects.models.getIamPolicy" call.
  7553  // Any non-2xx status code is an error. Response headers are in either
  7554  // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was returned at
  7555  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7556  // check whether the returned error was because http.StatusNotModified was
  7557  // returned.
  7558  func (c *ProjectsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  7559  	gensupport.SetOptions(c.urlParams_, opts...)
  7560  	res, err := c.doRequest("json")
  7561  	if res != nil && res.StatusCode == http.StatusNotModified {
  7562  		if res.Body != nil {
  7563  			res.Body.Close()
  7564  		}
  7565  		return nil, gensupport.WrapError(&googleapi.Error{
  7566  			Code:   res.StatusCode,
  7567  			Header: res.Header,
  7568  		})
  7569  	}
  7570  	if err != nil {
  7571  		return nil, err
  7572  	}
  7573  	defer googleapi.CloseBody(res)
  7574  	if err := googleapi.CheckResponse(res); err != nil {
  7575  		return nil, gensupport.WrapError(err)
  7576  	}
  7577  	ret := &GoogleIamV1__Policy{
  7578  		ServerResponse: googleapi.ServerResponse{
  7579  			Header:         res.Header,
  7580  			HTTPStatusCode: res.StatusCode,
  7581  		},
  7582  	}
  7583  	target := &ret
  7584  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7585  		return nil, err
  7586  	}
  7587  	return ret, nil
  7588  }
  7589  
  7590  type ProjectsModelsListCall struct {
  7591  	s            *Service
  7592  	parent       string
  7593  	urlParams_   gensupport.URLParams
  7594  	ifNoneMatch_ string
  7595  	ctx_         context.Context
  7596  	header_      http.Header
  7597  }
  7598  
  7599  // List: Lists the models in a project. Each project can contain multiple
  7600  // models, and each model can have multiple versions. If there are no models
  7601  // that match the request parameters, the list request returns an empty
  7602  // response body: {}.
  7603  //
  7604  // - parent: The name of the project whose models are to be listed.
  7605  func (r *ProjectsModelsService) List(parent string) *ProjectsModelsListCall {
  7606  	c := &ProjectsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7607  	c.parent = parent
  7608  	return c
  7609  }
  7610  
  7611  // Filter sets the optional parameter "filter": Specifies the subset of models
  7612  // to retrieve.
  7613  func (c *ProjectsModelsListCall) Filter(filter string) *ProjectsModelsListCall {
  7614  	c.urlParams_.Set("filter", filter)
  7615  	return c
  7616  }
  7617  
  7618  // PageSize sets the optional parameter "pageSize": The number of models to
  7619  // retrieve per "page" of results. If there are more remaining results than
  7620  // this number, the response message will contain a valid value in the
  7621  // `next_page_token` field. The default value is 20, and the maximum page size
  7622  // is 100.
  7623  func (c *ProjectsModelsListCall) PageSize(pageSize int64) *ProjectsModelsListCall {
  7624  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7625  	return c
  7626  }
  7627  
  7628  // PageToken sets the optional parameter "pageToken": A page token to request
  7629  // the next page of results. You get the token from the `next_page_token` field
  7630  // of the response from the previous call.
  7631  func (c *ProjectsModelsListCall) PageToken(pageToken string) *ProjectsModelsListCall {
  7632  	c.urlParams_.Set("pageToken", pageToken)
  7633  	return c
  7634  }
  7635  
  7636  // Fields allows partial responses to be retrieved. See
  7637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7638  // details.
  7639  func (c *ProjectsModelsListCall) Fields(s ...googleapi.Field) *ProjectsModelsListCall {
  7640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7641  	return c
  7642  }
  7643  
  7644  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7645  // object's ETag matches the given value. This is useful for getting updates
  7646  // only after the object has changed since the last request.
  7647  func (c *ProjectsModelsListCall) IfNoneMatch(entityTag string) *ProjectsModelsListCall {
  7648  	c.ifNoneMatch_ = entityTag
  7649  	return c
  7650  }
  7651  
  7652  // Context sets the context to be used in this call's Do method.
  7653  func (c *ProjectsModelsListCall) Context(ctx context.Context) *ProjectsModelsListCall {
  7654  	c.ctx_ = ctx
  7655  	return c
  7656  }
  7657  
  7658  // Header returns a http.Header that can be modified by the caller to add
  7659  // headers to the request.
  7660  func (c *ProjectsModelsListCall) Header() http.Header {
  7661  	if c.header_ == nil {
  7662  		c.header_ = make(http.Header)
  7663  	}
  7664  	return c.header_
  7665  }
  7666  
  7667  func (c *ProjectsModelsListCall) doRequest(alt string) (*http.Response, error) {
  7668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7669  	if c.ifNoneMatch_ != "" {
  7670  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7671  	}
  7672  	var body io.Reader = nil
  7673  	c.urlParams_.Set("alt", alt)
  7674  	c.urlParams_.Set("prettyPrint", "false")
  7675  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
  7676  	urls += "?" + c.urlParams_.Encode()
  7677  	req, err := http.NewRequest("GET", urls, body)
  7678  	if err != nil {
  7679  		return nil, err
  7680  	}
  7681  	req.Header = reqHeaders
  7682  	googleapi.Expand(req.URL, map[string]string{
  7683  		"parent": c.parent,
  7684  	})
  7685  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7686  }
  7687  
  7688  // Do executes the "ml.projects.models.list" call.
  7689  // Any non-2xx status code is an error. Response headers are in either
  7690  // *GoogleCloudMlV1__ListModelsResponse.ServerResponse.Header or (if a response
  7691  // was returned at all) in error.(*googleapi.Error).Header. Use
  7692  // googleapi.IsNotModified to check whether the returned error was because
  7693  // http.StatusNotModified was returned.
  7694  func (c *ProjectsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListModelsResponse, error) {
  7695  	gensupport.SetOptions(c.urlParams_, opts...)
  7696  	res, err := c.doRequest("json")
  7697  	if res != nil && res.StatusCode == http.StatusNotModified {
  7698  		if res.Body != nil {
  7699  			res.Body.Close()
  7700  		}
  7701  		return nil, gensupport.WrapError(&googleapi.Error{
  7702  			Code:   res.StatusCode,
  7703  			Header: res.Header,
  7704  		})
  7705  	}
  7706  	if err != nil {
  7707  		return nil, err
  7708  	}
  7709  	defer googleapi.CloseBody(res)
  7710  	if err := googleapi.CheckResponse(res); err != nil {
  7711  		return nil, gensupport.WrapError(err)
  7712  	}
  7713  	ret := &GoogleCloudMlV1__ListModelsResponse{
  7714  		ServerResponse: googleapi.ServerResponse{
  7715  			Header:         res.Header,
  7716  			HTTPStatusCode: res.StatusCode,
  7717  		},
  7718  	}
  7719  	target := &ret
  7720  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7721  		return nil, err
  7722  	}
  7723  	return ret, nil
  7724  }
  7725  
  7726  // Pages invokes f for each page of results.
  7727  // A non-nil error returned from f will halt the iteration.
  7728  // The provided context supersedes any context provided to the Context method.
  7729  func (c *ProjectsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListModelsResponse) error) error {
  7730  	c.ctx_ = ctx
  7731  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7732  	for {
  7733  		x, err := c.Do()
  7734  		if err != nil {
  7735  			return err
  7736  		}
  7737  		if err := f(x); err != nil {
  7738  			return err
  7739  		}
  7740  		if x.NextPageToken == "" {
  7741  			return nil
  7742  		}
  7743  		c.PageToken(x.NextPageToken)
  7744  	}
  7745  }
  7746  
  7747  type ProjectsModelsPatchCall struct {
  7748  	s                      *Service
  7749  	name                   string
  7750  	googlecloudmlv1__model *GoogleCloudMlV1__Model
  7751  	urlParams_             gensupport.URLParams
  7752  	ctx_                   context.Context
  7753  	header_                http.Header
  7754  }
  7755  
  7756  // Patch: Updates a specific model resource. Currently the only supported
  7757  // fields to update are `description` and `default_version.name`.
  7758  //
  7759  // - name: The project name.
  7760  func (r *ProjectsModelsService) Patch(name string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsPatchCall {
  7761  	c := &ProjectsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7762  	c.name = name
  7763  	c.googlecloudmlv1__model = googlecloudmlv1__model
  7764  	return c
  7765  }
  7766  
  7767  // UpdateMask sets the optional parameter "updateMask": Required. Specifies the
  7768  // path, relative to `Model`, of the field to update. For example, to change
  7769  // the description of a model to "foo" and set its default version to
  7770  // "version_1", the `update_mask` parameter would be specified as
  7771  // `description`, `default_version.name`, and the `PATCH` request body would
  7772  // specify the new value, as follows: { "description": "foo", "defaultVersion":
  7773  // { "name":"version_1" } } Currently the supported update masks are
  7774  // `description` and `default_version.name`.
  7775  func (c *ProjectsModelsPatchCall) UpdateMask(updateMask string) *ProjectsModelsPatchCall {
  7776  	c.urlParams_.Set("updateMask", updateMask)
  7777  	return c
  7778  }
  7779  
  7780  // Fields allows partial responses to be retrieved. See
  7781  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7782  // details.
  7783  func (c *ProjectsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsPatchCall {
  7784  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7785  	return c
  7786  }
  7787  
  7788  // Context sets the context to be used in this call's Do method.
  7789  func (c *ProjectsModelsPatchCall) Context(ctx context.Context) *ProjectsModelsPatchCall {
  7790  	c.ctx_ = ctx
  7791  	return c
  7792  }
  7793  
  7794  // Header returns a http.Header that can be modified by the caller to add
  7795  // headers to the request.
  7796  func (c *ProjectsModelsPatchCall) Header() http.Header {
  7797  	if c.header_ == nil {
  7798  		c.header_ = make(http.Header)
  7799  	}
  7800  	return c.header_
  7801  }
  7802  
  7803  func (c *ProjectsModelsPatchCall) doRequest(alt string) (*http.Response, error) {
  7804  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7805  	var body io.Reader = nil
  7806  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
  7807  	if err != nil {
  7808  		return nil, err
  7809  	}
  7810  	c.urlParams_.Set("alt", alt)
  7811  	c.urlParams_.Set("prettyPrint", "false")
  7812  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7813  	urls += "?" + c.urlParams_.Encode()
  7814  	req, err := http.NewRequest("PATCH", urls, body)
  7815  	if err != nil {
  7816  		return nil, err
  7817  	}
  7818  	req.Header = reqHeaders
  7819  	googleapi.Expand(req.URL, map[string]string{
  7820  		"name": c.name,
  7821  	})
  7822  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7823  }
  7824  
  7825  // Do executes the "ml.projects.models.patch" call.
  7826  // Any non-2xx status code is an error. Response headers are in either
  7827  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  7828  // returned at all) in error.(*googleapi.Error).Header. Use
  7829  // googleapi.IsNotModified to check whether the returned error was because
  7830  // http.StatusNotModified was returned.
  7831  func (c *ProjectsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  7832  	gensupport.SetOptions(c.urlParams_, opts...)
  7833  	res, err := c.doRequest("json")
  7834  	if res != nil && res.StatusCode == http.StatusNotModified {
  7835  		if res.Body != nil {
  7836  			res.Body.Close()
  7837  		}
  7838  		return nil, gensupport.WrapError(&googleapi.Error{
  7839  			Code:   res.StatusCode,
  7840  			Header: res.Header,
  7841  		})
  7842  	}
  7843  	if err != nil {
  7844  		return nil, err
  7845  	}
  7846  	defer googleapi.CloseBody(res)
  7847  	if err := googleapi.CheckResponse(res); err != nil {
  7848  		return nil, gensupport.WrapError(err)
  7849  	}
  7850  	ret := &GoogleLongrunning__Operation{
  7851  		ServerResponse: googleapi.ServerResponse{
  7852  			Header:         res.Header,
  7853  			HTTPStatusCode: res.StatusCode,
  7854  		},
  7855  	}
  7856  	target := &ret
  7857  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7858  		return nil, err
  7859  	}
  7860  	return ret, nil
  7861  }
  7862  
  7863  type ProjectsModelsSetIamPolicyCall struct {
  7864  	s                                *Service
  7865  	resource                         string
  7866  	googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
  7867  	urlParams_                       gensupport.URLParams
  7868  	ctx_                             context.Context
  7869  	header_                          http.Header
  7870  }
  7871  
  7872  // SetIamPolicy: Sets the access control policy on the specified resource.
  7873  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  7874  // and `PERMISSION_DENIED` errors.
  7875  //
  7876  //   - resource: REQUIRED: The resource for which the policy is being specified.
  7877  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7878  //     for the appropriate value for this field.
  7879  func (r *ProjectsModelsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsModelsSetIamPolicyCall {
  7880  	c := &ProjectsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7881  	c.resource = resource
  7882  	c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
  7883  	return c
  7884  }
  7885  
  7886  // Fields allows partial responses to be retrieved. See
  7887  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7888  // details.
  7889  func (c *ProjectsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsSetIamPolicyCall {
  7890  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7891  	return c
  7892  }
  7893  
  7894  // Context sets the context to be used in this call's Do method.
  7895  func (c *ProjectsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsSetIamPolicyCall {
  7896  	c.ctx_ = ctx
  7897  	return c
  7898  }
  7899  
  7900  // Header returns a http.Header that can be modified by the caller to add
  7901  // headers to the request.
  7902  func (c *ProjectsModelsSetIamPolicyCall) Header() http.Header {
  7903  	if c.header_ == nil {
  7904  		c.header_ = make(http.Header)
  7905  	}
  7906  	return c.header_
  7907  }
  7908  
  7909  func (c *ProjectsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7910  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7911  	var body io.Reader = nil
  7912  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
  7913  	if err != nil {
  7914  		return nil, err
  7915  	}
  7916  	c.urlParams_.Set("alt", alt)
  7917  	c.urlParams_.Set("prettyPrint", "false")
  7918  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  7919  	urls += "?" + c.urlParams_.Encode()
  7920  	req, err := http.NewRequest("POST", urls, body)
  7921  	if err != nil {
  7922  		return nil, err
  7923  	}
  7924  	req.Header = reqHeaders
  7925  	googleapi.Expand(req.URL, map[string]string{
  7926  		"resource": c.resource,
  7927  	})
  7928  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7929  }
  7930  
  7931  // Do executes the "ml.projects.models.setIamPolicy" call.
  7932  // Any non-2xx status code is an error. Response headers are in either
  7933  // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was returned at
  7934  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7935  // check whether the returned error was because http.StatusNotModified was
  7936  // returned.
  7937  func (c *ProjectsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  7938  	gensupport.SetOptions(c.urlParams_, opts...)
  7939  	res, err := c.doRequest("json")
  7940  	if res != nil && res.StatusCode == http.StatusNotModified {
  7941  		if res.Body != nil {
  7942  			res.Body.Close()
  7943  		}
  7944  		return nil, gensupport.WrapError(&googleapi.Error{
  7945  			Code:   res.StatusCode,
  7946  			Header: res.Header,
  7947  		})
  7948  	}
  7949  	if err != nil {
  7950  		return nil, err
  7951  	}
  7952  	defer googleapi.CloseBody(res)
  7953  	if err := googleapi.CheckResponse(res); err != nil {
  7954  		return nil, gensupport.WrapError(err)
  7955  	}
  7956  	ret := &GoogleIamV1__Policy{
  7957  		ServerResponse: googleapi.ServerResponse{
  7958  			Header:         res.Header,
  7959  			HTTPStatusCode: res.StatusCode,
  7960  		},
  7961  	}
  7962  	target := &ret
  7963  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7964  		return nil, err
  7965  	}
  7966  	return ret, nil
  7967  }
  7968  
  7969  type ProjectsModelsTestIamPermissionsCall struct {
  7970  	s                                      *Service
  7971  	resource                               string
  7972  	googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
  7973  	urlParams_                             gensupport.URLParams
  7974  	ctx_                                   context.Context
  7975  	header_                                http.Header
  7976  }
  7977  
  7978  // TestIamPermissions: Returns permissions that a caller has on the specified
  7979  // resource. If the resource does not exist, this will return an empty set of
  7980  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  7981  // used for building permission-aware UIs and command-line tools, not for
  7982  // authorization checking. This operation may "fail open" without warning.
  7983  //
  7984  //   - resource: REQUIRED: The resource for which the policy detail is being
  7985  //     requested. See Resource names
  7986  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  7987  //     value for this field.
  7988  func (r *ProjectsModelsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsModelsTestIamPermissionsCall {
  7989  	c := &ProjectsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7990  	c.resource = resource
  7991  	c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
  7992  	return c
  7993  }
  7994  
  7995  // Fields allows partial responses to be retrieved. See
  7996  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7997  // details.
  7998  func (c *ProjectsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsModelsTestIamPermissionsCall {
  7999  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8000  	return c
  8001  }
  8002  
  8003  // Context sets the context to be used in this call's Do method.
  8004  func (c *ProjectsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsModelsTestIamPermissionsCall {
  8005  	c.ctx_ = ctx
  8006  	return c
  8007  }
  8008  
  8009  // Header returns a http.Header that can be modified by the caller to add
  8010  // headers to the request.
  8011  func (c *ProjectsModelsTestIamPermissionsCall) Header() http.Header {
  8012  	if c.header_ == nil {
  8013  		c.header_ = make(http.Header)
  8014  	}
  8015  	return c.header_
  8016  }
  8017  
  8018  func (c *ProjectsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8019  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8020  	var body io.Reader = nil
  8021  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
  8022  	if err != nil {
  8023  		return nil, err
  8024  	}
  8025  	c.urlParams_.Set("alt", alt)
  8026  	c.urlParams_.Set("prettyPrint", "false")
  8027  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  8028  	urls += "?" + c.urlParams_.Encode()
  8029  	req, err := http.NewRequest("POST", urls, body)
  8030  	if err != nil {
  8031  		return nil, err
  8032  	}
  8033  	req.Header = reqHeaders
  8034  	googleapi.Expand(req.URL, map[string]string{
  8035  		"resource": c.resource,
  8036  	})
  8037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8038  }
  8039  
  8040  // Do executes the "ml.projects.models.testIamPermissions" call.
  8041  // Any non-2xx status code is an error. Response headers are in either
  8042  // *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if a
  8043  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8044  // googleapi.IsNotModified to check whether the returned error was because
  8045  // http.StatusNotModified was returned.
  8046  func (c *ProjectsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
  8047  	gensupport.SetOptions(c.urlParams_, opts...)
  8048  	res, err := c.doRequest("json")
  8049  	if res != nil && res.StatusCode == http.StatusNotModified {
  8050  		if res.Body != nil {
  8051  			res.Body.Close()
  8052  		}
  8053  		return nil, gensupport.WrapError(&googleapi.Error{
  8054  			Code:   res.StatusCode,
  8055  			Header: res.Header,
  8056  		})
  8057  	}
  8058  	if err != nil {
  8059  		return nil, err
  8060  	}
  8061  	defer googleapi.CloseBody(res)
  8062  	if err := googleapi.CheckResponse(res); err != nil {
  8063  		return nil, gensupport.WrapError(err)
  8064  	}
  8065  	ret := &GoogleIamV1__TestIamPermissionsResponse{
  8066  		ServerResponse: googleapi.ServerResponse{
  8067  			Header:         res.Header,
  8068  			HTTPStatusCode: res.StatusCode,
  8069  		},
  8070  	}
  8071  	target := &ret
  8072  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8073  		return nil, err
  8074  	}
  8075  	return ret, nil
  8076  }
  8077  
  8078  type ProjectsModelsVersionsCreateCall struct {
  8079  	s                        *Service
  8080  	parent                   string
  8081  	googlecloudmlv1__version *GoogleCloudMlV1__Version
  8082  	urlParams_               gensupport.URLParams
  8083  	ctx_                     context.Context
  8084  	header_                  http.Header
  8085  }
  8086  
  8087  // Create: Creates a new version of a model from a trained TensorFlow model. If
  8088  // the version created in the cloud by this call is the first deployed version
  8089  // of the specified model, it will be made the default version of the model.
  8090  // When you add a version to a model that already has one or more versions, the
  8091  // default version does not automatically change. If you want a new version to
  8092  // be the default, you must call projects.models.versions.setDefault.
  8093  //
  8094  // - parent: The name of the model.
  8095  func (r *ProjectsModelsVersionsService) Create(parent string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsCreateCall {
  8096  	c := &ProjectsModelsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8097  	c.parent = parent
  8098  	c.googlecloudmlv1__version = googlecloudmlv1__version
  8099  	return c
  8100  }
  8101  
  8102  // Fields allows partial responses to be retrieved. See
  8103  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8104  // details.
  8105  func (c *ProjectsModelsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsCreateCall {
  8106  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8107  	return c
  8108  }
  8109  
  8110  // Context sets the context to be used in this call's Do method.
  8111  func (c *ProjectsModelsVersionsCreateCall) Context(ctx context.Context) *ProjectsModelsVersionsCreateCall {
  8112  	c.ctx_ = ctx
  8113  	return c
  8114  }
  8115  
  8116  // Header returns a http.Header that can be modified by the caller to add
  8117  // headers to the request.
  8118  func (c *ProjectsModelsVersionsCreateCall) Header() http.Header {
  8119  	if c.header_ == nil {
  8120  		c.header_ = make(http.Header)
  8121  	}
  8122  	return c.header_
  8123  }
  8124  
  8125  func (c *ProjectsModelsVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  8126  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8127  	var body io.Reader = nil
  8128  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
  8129  	if err != nil {
  8130  		return nil, err
  8131  	}
  8132  	c.urlParams_.Set("alt", alt)
  8133  	c.urlParams_.Set("prettyPrint", "false")
  8134  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
  8135  	urls += "?" + c.urlParams_.Encode()
  8136  	req, err := http.NewRequest("POST", urls, body)
  8137  	if err != nil {
  8138  		return nil, err
  8139  	}
  8140  	req.Header = reqHeaders
  8141  	googleapi.Expand(req.URL, map[string]string{
  8142  		"parent": c.parent,
  8143  	})
  8144  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8145  }
  8146  
  8147  // Do executes the "ml.projects.models.versions.create" call.
  8148  // Any non-2xx status code is an error. Response headers are in either
  8149  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  8150  // returned at all) in error.(*googleapi.Error).Header. Use
  8151  // googleapi.IsNotModified to check whether the returned error was because
  8152  // http.StatusNotModified was returned.
  8153  func (c *ProjectsModelsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  8154  	gensupport.SetOptions(c.urlParams_, opts...)
  8155  	res, err := c.doRequest("json")
  8156  	if res != nil && res.StatusCode == http.StatusNotModified {
  8157  		if res.Body != nil {
  8158  			res.Body.Close()
  8159  		}
  8160  		return nil, gensupport.WrapError(&googleapi.Error{
  8161  			Code:   res.StatusCode,
  8162  			Header: res.Header,
  8163  		})
  8164  	}
  8165  	if err != nil {
  8166  		return nil, err
  8167  	}
  8168  	defer googleapi.CloseBody(res)
  8169  	if err := googleapi.CheckResponse(res); err != nil {
  8170  		return nil, gensupport.WrapError(err)
  8171  	}
  8172  	ret := &GoogleLongrunning__Operation{
  8173  		ServerResponse: googleapi.ServerResponse{
  8174  			Header:         res.Header,
  8175  			HTTPStatusCode: res.StatusCode,
  8176  		},
  8177  	}
  8178  	target := &ret
  8179  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8180  		return nil, err
  8181  	}
  8182  	return ret, nil
  8183  }
  8184  
  8185  type ProjectsModelsVersionsDeleteCall struct {
  8186  	s          *Service
  8187  	name       string
  8188  	urlParams_ gensupport.URLParams
  8189  	ctx_       context.Context
  8190  	header_    http.Header
  8191  }
  8192  
  8193  // Delete: Deletes a model version. Each model can have multiple versions
  8194  // deployed and in use at any given time. Use this method to remove a single
  8195  // version. Note: You cannot delete the version that is set as the default
  8196  // version of the model unless it is the only remaining version.
  8197  //
  8198  //   - name: The name of the version. You can get the names of all the versions
  8199  //     of a model by calling projects.models.versions.list.
  8200  func (r *ProjectsModelsVersionsService) Delete(name string) *ProjectsModelsVersionsDeleteCall {
  8201  	c := &ProjectsModelsVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8202  	c.name = name
  8203  	return c
  8204  }
  8205  
  8206  // Fields allows partial responses to be retrieved. See
  8207  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8208  // details.
  8209  func (c *ProjectsModelsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsDeleteCall {
  8210  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8211  	return c
  8212  }
  8213  
  8214  // Context sets the context to be used in this call's Do method.
  8215  func (c *ProjectsModelsVersionsDeleteCall) Context(ctx context.Context) *ProjectsModelsVersionsDeleteCall {
  8216  	c.ctx_ = ctx
  8217  	return c
  8218  }
  8219  
  8220  // Header returns a http.Header that can be modified by the caller to add
  8221  // headers to the request.
  8222  func (c *ProjectsModelsVersionsDeleteCall) Header() http.Header {
  8223  	if c.header_ == nil {
  8224  		c.header_ = make(http.Header)
  8225  	}
  8226  	return c.header_
  8227  }
  8228  
  8229  func (c *ProjectsModelsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8230  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8231  	var body io.Reader = nil
  8232  	c.urlParams_.Set("alt", alt)
  8233  	c.urlParams_.Set("prettyPrint", "false")
  8234  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8235  	urls += "?" + c.urlParams_.Encode()
  8236  	req, err := http.NewRequest("DELETE", urls, body)
  8237  	if err != nil {
  8238  		return nil, err
  8239  	}
  8240  	req.Header = reqHeaders
  8241  	googleapi.Expand(req.URL, map[string]string{
  8242  		"name": c.name,
  8243  	})
  8244  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8245  }
  8246  
  8247  // Do executes the "ml.projects.models.versions.delete" call.
  8248  // Any non-2xx status code is an error. Response headers are in either
  8249  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  8250  // returned at all) in error.(*googleapi.Error).Header. Use
  8251  // googleapi.IsNotModified to check whether the returned error was because
  8252  // http.StatusNotModified was returned.
  8253  func (c *ProjectsModelsVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  8254  	gensupport.SetOptions(c.urlParams_, opts...)
  8255  	res, err := c.doRequest("json")
  8256  	if res != nil && res.StatusCode == http.StatusNotModified {
  8257  		if res.Body != nil {
  8258  			res.Body.Close()
  8259  		}
  8260  		return nil, gensupport.WrapError(&googleapi.Error{
  8261  			Code:   res.StatusCode,
  8262  			Header: res.Header,
  8263  		})
  8264  	}
  8265  	if err != nil {
  8266  		return nil, err
  8267  	}
  8268  	defer googleapi.CloseBody(res)
  8269  	if err := googleapi.CheckResponse(res); err != nil {
  8270  		return nil, gensupport.WrapError(err)
  8271  	}
  8272  	ret := &GoogleLongrunning__Operation{
  8273  		ServerResponse: googleapi.ServerResponse{
  8274  			Header:         res.Header,
  8275  			HTTPStatusCode: res.StatusCode,
  8276  		},
  8277  	}
  8278  	target := &ret
  8279  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8280  		return nil, err
  8281  	}
  8282  	return ret, nil
  8283  }
  8284  
  8285  type ProjectsModelsVersionsGetCall struct {
  8286  	s            *Service
  8287  	name         string
  8288  	urlParams_   gensupport.URLParams
  8289  	ifNoneMatch_ string
  8290  	ctx_         context.Context
  8291  	header_      http.Header
  8292  }
  8293  
  8294  // Get: Gets information about a model version. Models can have multiple
  8295  // versions. You can call projects.models.versions.list to get the same
  8296  // information that this method returns for all of the versions of a model.
  8297  //
  8298  // - name: The name of the version.
  8299  func (r *ProjectsModelsVersionsService) Get(name string) *ProjectsModelsVersionsGetCall {
  8300  	c := &ProjectsModelsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8301  	c.name = name
  8302  	return c
  8303  }
  8304  
  8305  // Fields allows partial responses to be retrieved. See
  8306  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8307  // details.
  8308  func (c *ProjectsModelsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsGetCall {
  8309  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8310  	return c
  8311  }
  8312  
  8313  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8314  // object's ETag matches the given value. This is useful for getting updates
  8315  // only after the object has changed since the last request.
  8316  func (c *ProjectsModelsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsGetCall {
  8317  	c.ifNoneMatch_ = entityTag
  8318  	return c
  8319  }
  8320  
  8321  // Context sets the context to be used in this call's Do method.
  8322  func (c *ProjectsModelsVersionsGetCall) Context(ctx context.Context) *ProjectsModelsVersionsGetCall {
  8323  	c.ctx_ = ctx
  8324  	return c
  8325  }
  8326  
  8327  // Header returns a http.Header that can be modified by the caller to add
  8328  // headers to the request.
  8329  func (c *ProjectsModelsVersionsGetCall) Header() http.Header {
  8330  	if c.header_ == nil {
  8331  		c.header_ = make(http.Header)
  8332  	}
  8333  	return c.header_
  8334  }
  8335  
  8336  func (c *ProjectsModelsVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  8337  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8338  	if c.ifNoneMatch_ != "" {
  8339  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8340  	}
  8341  	var body io.Reader = nil
  8342  	c.urlParams_.Set("alt", alt)
  8343  	c.urlParams_.Set("prettyPrint", "false")
  8344  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8345  	urls += "?" + c.urlParams_.Encode()
  8346  	req, err := http.NewRequest("GET", urls, body)
  8347  	if err != nil {
  8348  		return nil, err
  8349  	}
  8350  	req.Header = reqHeaders
  8351  	googleapi.Expand(req.URL, map[string]string{
  8352  		"name": c.name,
  8353  	})
  8354  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8355  }
  8356  
  8357  // Do executes the "ml.projects.models.versions.get" call.
  8358  // Any non-2xx status code is an error. Response headers are in either
  8359  // *GoogleCloudMlV1__Version.ServerResponse.Header or (if a response was
  8360  // returned at all) in error.(*googleapi.Error).Header. Use
  8361  // googleapi.IsNotModified to check whether the returned error was because
  8362  // http.StatusNotModified was returned.
  8363  func (c *ProjectsModelsVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
  8364  	gensupport.SetOptions(c.urlParams_, opts...)
  8365  	res, err := c.doRequest("json")
  8366  	if res != nil && res.StatusCode == http.StatusNotModified {
  8367  		if res.Body != nil {
  8368  			res.Body.Close()
  8369  		}
  8370  		return nil, gensupport.WrapError(&googleapi.Error{
  8371  			Code:   res.StatusCode,
  8372  			Header: res.Header,
  8373  		})
  8374  	}
  8375  	if err != nil {
  8376  		return nil, err
  8377  	}
  8378  	defer googleapi.CloseBody(res)
  8379  	if err := googleapi.CheckResponse(res); err != nil {
  8380  		return nil, gensupport.WrapError(err)
  8381  	}
  8382  	ret := &GoogleCloudMlV1__Version{
  8383  		ServerResponse: googleapi.ServerResponse{
  8384  			Header:         res.Header,
  8385  			HTTPStatusCode: res.StatusCode,
  8386  		},
  8387  	}
  8388  	target := &ret
  8389  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8390  		return nil, err
  8391  	}
  8392  	return ret, nil
  8393  }
  8394  
  8395  type ProjectsModelsVersionsListCall struct {
  8396  	s            *Service
  8397  	parent       string
  8398  	urlParams_   gensupport.URLParams
  8399  	ifNoneMatch_ string
  8400  	ctx_         context.Context
  8401  	header_      http.Header
  8402  }
  8403  
  8404  // List: Gets basic information about all the versions of a model. If you
  8405  // expect that a model has many versions, or if you need to handle only a
  8406  // limited number of results at a time, you can request that the list be
  8407  // retrieved in batches (called pages). If there are no versions that match the
  8408  // request parameters, the list request returns an empty response body: {}.
  8409  //
  8410  // - parent: The name of the model for which to list the version.
  8411  func (r *ProjectsModelsVersionsService) List(parent string) *ProjectsModelsVersionsListCall {
  8412  	c := &ProjectsModelsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8413  	c.parent = parent
  8414  	return c
  8415  }
  8416  
  8417  // Filter sets the optional parameter "filter": Specifies the subset of
  8418  // versions to retrieve.
  8419  func (c *ProjectsModelsVersionsListCall) Filter(filter string) *ProjectsModelsVersionsListCall {
  8420  	c.urlParams_.Set("filter", filter)
  8421  	return c
  8422  }
  8423  
  8424  // PageSize sets the optional parameter "pageSize": The number of versions to
  8425  // retrieve per "page" of results. If there are more remaining results than
  8426  // this number, the response message will contain a valid value in the
  8427  // `next_page_token` field. The default value is 20, and the maximum page size
  8428  // is 100.
  8429  func (c *ProjectsModelsVersionsListCall) PageSize(pageSize int64) *ProjectsModelsVersionsListCall {
  8430  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8431  	return c
  8432  }
  8433  
  8434  // PageToken sets the optional parameter "pageToken": A page token to request
  8435  // the next page of results. You get the token from the `next_page_token` field
  8436  // of the response from the previous call.
  8437  func (c *ProjectsModelsVersionsListCall) PageToken(pageToken string) *ProjectsModelsVersionsListCall {
  8438  	c.urlParams_.Set("pageToken", pageToken)
  8439  	return c
  8440  }
  8441  
  8442  // Fields allows partial responses to be retrieved. See
  8443  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8444  // details.
  8445  func (c *ProjectsModelsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsListCall {
  8446  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8447  	return c
  8448  }
  8449  
  8450  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8451  // object's ETag matches the given value. This is useful for getting updates
  8452  // only after the object has changed since the last request.
  8453  func (c *ProjectsModelsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsListCall {
  8454  	c.ifNoneMatch_ = entityTag
  8455  	return c
  8456  }
  8457  
  8458  // Context sets the context to be used in this call's Do method.
  8459  func (c *ProjectsModelsVersionsListCall) Context(ctx context.Context) *ProjectsModelsVersionsListCall {
  8460  	c.ctx_ = ctx
  8461  	return c
  8462  }
  8463  
  8464  // Header returns a http.Header that can be modified by the caller to add
  8465  // headers to the request.
  8466  func (c *ProjectsModelsVersionsListCall) Header() http.Header {
  8467  	if c.header_ == nil {
  8468  		c.header_ = make(http.Header)
  8469  	}
  8470  	return c.header_
  8471  }
  8472  
  8473  func (c *ProjectsModelsVersionsListCall) doRequest(alt string) (*http.Response, error) {
  8474  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8475  	if c.ifNoneMatch_ != "" {
  8476  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8477  	}
  8478  	var body io.Reader = nil
  8479  	c.urlParams_.Set("alt", alt)
  8480  	c.urlParams_.Set("prettyPrint", "false")
  8481  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
  8482  	urls += "?" + c.urlParams_.Encode()
  8483  	req, err := http.NewRequest("GET", urls, body)
  8484  	if err != nil {
  8485  		return nil, err
  8486  	}
  8487  	req.Header = reqHeaders
  8488  	googleapi.Expand(req.URL, map[string]string{
  8489  		"parent": c.parent,
  8490  	})
  8491  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8492  }
  8493  
  8494  // Do executes the "ml.projects.models.versions.list" call.
  8495  // Any non-2xx status code is an error. Response headers are in either
  8496  // *GoogleCloudMlV1__ListVersionsResponse.ServerResponse.Header or (if a
  8497  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8498  // googleapi.IsNotModified to check whether the returned error was because
  8499  // http.StatusNotModified was returned.
  8500  func (c *ProjectsModelsVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListVersionsResponse, error) {
  8501  	gensupport.SetOptions(c.urlParams_, opts...)
  8502  	res, err := c.doRequest("json")
  8503  	if res != nil && res.StatusCode == http.StatusNotModified {
  8504  		if res.Body != nil {
  8505  			res.Body.Close()
  8506  		}
  8507  		return nil, gensupport.WrapError(&googleapi.Error{
  8508  			Code:   res.StatusCode,
  8509  			Header: res.Header,
  8510  		})
  8511  	}
  8512  	if err != nil {
  8513  		return nil, err
  8514  	}
  8515  	defer googleapi.CloseBody(res)
  8516  	if err := googleapi.CheckResponse(res); err != nil {
  8517  		return nil, gensupport.WrapError(err)
  8518  	}
  8519  	ret := &GoogleCloudMlV1__ListVersionsResponse{
  8520  		ServerResponse: googleapi.ServerResponse{
  8521  			Header:         res.Header,
  8522  			HTTPStatusCode: res.StatusCode,
  8523  		},
  8524  	}
  8525  	target := &ret
  8526  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8527  		return nil, err
  8528  	}
  8529  	return ret, nil
  8530  }
  8531  
  8532  // Pages invokes f for each page of results.
  8533  // A non-nil error returned from f will halt the iteration.
  8534  // The provided context supersedes any context provided to the Context method.
  8535  func (c *ProjectsModelsVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListVersionsResponse) error) error {
  8536  	c.ctx_ = ctx
  8537  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8538  	for {
  8539  		x, err := c.Do()
  8540  		if err != nil {
  8541  			return err
  8542  		}
  8543  		if err := f(x); err != nil {
  8544  			return err
  8545  		}
  8546  		if x.NextPageToken == "" {
  8547  			return nil
  8548  		}
  8549  		c.PageToken(x.NextPageToken)
  8550  	}
  8551  }
  8552  
  8553  type ProjectsModelsVersionsPatchCall struct {
  8554  	s                        *Service
  8555  	name                     string
  8556  	googlecloudmlv1__version *GoogleCloudMlV1__Version
  8557  	urlParams_               gensupport.URLParams
  8558  	ctx_                     context.Context
  8559  	header_                  http.Header
  8560  }
  8561  
  8562  // Patch: Updates the specified Version resource. Currently the only
  8563  // update-able fields are `description`, `requestLoggingConfig`,
  8564  // `autoScaling.minNodes`, and `manualScaling.nodes`.
  8565  //
  8566  // - name: The name of the model.
  8567  func (r *ProjectsModelsVersionsService) Patch(name string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsPatchCall {
  8568  	c := &ProjectsModelsVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8569  	c.name = name
  8570  	c.googlecloudmlv1__version = googlecloudmlv1__version
  8571  	return c
  8572  }
  8573  
  8574  // UpdateMask sets the optional parameter "updateMask": Required. Specifies the
  8575  // path, relative to `Version`, of the field to update. Must be present and
  8576  // non-empty. For example, to change the description of a version to "foo", the
  8577  // `update_mask` parameter would be specified as `description`, and the `PATCH`
  8578  // request body would specify the new value, as follows: ``` { "description":
  8579  // "foo" } ``` Currently the only supported update mask fields are
  8580  // `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and
  8581  // `manualScaling.nodes`. However, you can only update `manualScaling.nodes` if
  8582  // the version uses a Compute Engine (N1) machine type
  8583  // (/ml-engine/docs/machine-types-online-prediction).
  8584  func (c *ProjectsModelsVersionsPatchCall) UpdateMask(updateMask string) *ProjectsModelsVersionsPatchCall {
  8585  	c.urlParams_.Set("updateMask", updateMask)
  8586  	return c
  8587  }
  8588  
  8589  // Fields allows partial responses to be retrieved. See
  8590  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8591  // details.
  8592  func (c *ProjectsModelsVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsPatchCall {
  8593  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8594  	return c
  8595  }
  8596  
  8597  // Context sets the context to be used in this call's Do method.
  8598  func (c *ProjectsModelsVersionsPatchCall) Context(ctx context.Context) *ProjectsModelsVersionsPatchCall {
  8599  	c.ctx_ = ctx
  8600  	return c
  8601  }
  8602  
  8603  // Header returns a http.Header that can be modified by the caller to add
  8604  // headers to the request.
  8605  func (c *ProjectsModelsVersionsPatchCall) Header() http.Header {
  8606  	if c.header_ == nil {
  8607  		c.header_ = make(http.Header)
  8608  	}
  8609  	return c.header_
  8610  }
  8611  
  8612  func (c *ProjectsModelsVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8613  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8614  	var body io.Reader = nil
  8615  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
  8616  	if err != nil {
  8617  		return nil, err
  8618  	}
  8619  	c.urlParams_.Set("alt", alt)
  8620  	c.urlParams_.Set("prettyPrint", "false")
  8621  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8622  	urls += "?" + c.urlParams_.Encode()
  8623  	req, err := http.NewRequest("PATCH", urls, body)
  8624  	if err != nil {
  8625  		return nil, err
  8626  	}
  8627  	req.Header = reqHeaders
  8628  	googleapi.Expand(req.URL, map[string]string{
  8629  		"name": c.name,
  8630  	})
  8631  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8632  }
  8633  
  8634  // Do executes the "ml.projects.models.versions.patch" call.
  8635  // Any non-2xx status code is an error. Response headers are in either
  8636  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  8637  // returned at all) in error.(*googleapi.Error).Header. Use
  8638  // googleapi.IsNotModified to check whether the returned error was because
  8639  // http.StatusNotModified was returned.
  8640  func (c *ProjectsModelsVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  8641  	gensupport.SetOptions(c.urlParams_, opts...)
  8642  	res, err := c.doRequest("json")
  8643  	if res != nil && res.StatusCode == http.StatusNotModified {
  8644  		if res.Body != nil {
  8645  			res.Body.Close()
  8646  		}
  8647  		return nil, gensupport.WrapError(&googleapi.Error{
  8648  			Code:   res.StatusCode,
  8649  			Header: res.Header,
  8650  		})
  8651  	}
  8652  	if err != nil {
  8653  		return nil, err
  8654  	}
  8655  	defer googleapi.CloseBody(res)
  8656  	if err := googleapi.CheckResponse(res); err != nil {
  8657  		return nil, gensupport.WrapError(err)
  8658  	}
  8659  	ret := &GoogleLongrunning__Operation{
  8660  		ServerResponse: googleapi.ServerResponse{
  8661  			Header:         res.Header,
  8662  			HTTPStatusCode: res.StatusCode,
  8663  		},
  8664  	}
  8665  	target := &ret
  8666  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8667  		return nil, err
  8668  	}
  8669  	return ret, nil
  8670  }
  8671  
  8672  type ProjectsModelsVersionsSetDefaultCall struct {
  8673  	s                                         *Service
  8674  	name                                      string
  8675  	googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest
  8676  	urlParams_                                gensupport.URLParams
  8677  	ctx_                                      context.Context
  8678  	header_                                   http.Header
  8679  }
  8680  
  8681  // SetDefault: Designates a version to be the default for the model. The
  8682  // default version is used for prediction requests made against the model that
  8683  // don't specify a version. The first version to be created for a model is
  8684  // automatically set as the default. You must make any subsequent changes to
  8685  // the default version setting manually using this method.
  8686  //
  8687  //   - name: The name of the version to make the default for the model. You can
  8688  //     get the names of all the versions of a model by calling
  8689  //     projects.models.versions.list.
  8690  func (r *ProjectsModelsVersionsService) SetDefault(name string, googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest) *ProjectsModelsVersionsSetDefaultCall {
  8691  	c := &ProjectsModelsVersionsSetDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8692  	c.name = name
  8693  	c.googlecloudmlv1__setdefaultversionrequest = googlecloudmlv1__setdefaultversionrequest
  8694  	return c
  8695  }
  8696  
  8697  // Fields allows partial responses to be retrieved. See
  8698  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8699  // details.
  8700  func (c *ProjectsModelsVersionsSetDefaultCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsSetDefaultCall {
  8701  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8702  	return c
  8703  }
  8704  
  8705  // Context sets the context to be used in this call's Do method.
  8706  func (c *ProjectsModelsVersionsSetDefaultCall) Context(ctx context.Context) *ProjectsModelsVersionsSetDefaultCall {
  8707  	c.ctx_ = ctx
  8708  	return c
  8709  }
  8710  
  8711  // Header returns a http.Header that can be modified by the caller to add
  8712  // headers to the request.
  8713  func (c *ProjectsModelsVersionsSetDefaultCall) Header() http.Header {
  8714  	if c.header_ == nil {
  8715  		c.header_ = make(http.Header)
  8716  	}
  8717  	return c.header_
  8718  }
  8719  
  8720  func (c *ProjectsModelsVersionsSetDefaultCall) doRequest(alt string) (*http.Response, error) {
  8721  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8722  	var body io.Reader = nil
  8723  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__setdefaultversionrequest)
  8724  	if err != nil {
  8725  		return nil, err
  8726  	}
  8727  	c.urlParams_.Set("alt", alt)
  8728  	c.urlParams_.Set("prettyPrint", "false")
  8729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setDefault")
  8730  	urls += "?" + c.urlParams_.Encode()
  8731  	req, err := http.NewRequest("POST", urls, body)
  8732  	if err != nil {
  8733  		return nil, err
  8734  	}
  8735  	req.Header = reqHeaders
  8736  	googleapi.Expand(req.URL, map[string]string{
  8737  		"name": c.name,
  8738  	})
  8739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8740  }
  8741  
  8742  // Do executes the "ml.projects.models.versions.setDefault" call.
  8743  // Any non-2xx status code is an error. Response headers are in either
  8744  // *GoogleCloudMlV1__Version.ServerResponse.Header or (if a response was
  8745  // returned at all) in error.(*googleapi.Error).Header. Use
  8746  // googleapi.IsNotModified to check whether the returned error was because
  8747  // http.StatusNotModified was returned.
  8748  func (c *ProjectsModelsVersionsSetDefaultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
  8749  	gensupport.SetOptions(c.urlParams_, opts...)
  8750  	res, err := c.doRequest("json")
  8751  	if res != nil && res.StatusCode == http.StatusNotModified {
  8752  		if res.Body != nil {
  8753  			res.Body.Close()
  8754  		}
  8755  		return nil, gensupport.WrapError(&googleapi.Error{
  8756  			Code:   res.StatusCode,
  8757  			Header: res.Header,
  8758  		})
  8759  	}
  8760  	if err != nil {
  8761  		return nil, err
  8762  	}
  8763  	defer googleapi.CloseBody(res)
  8764  	if err := googleapi.CheckResponse(res); err != nil {
  8765  		return nil, gensupport.WrapError(err)
  8766  	}
  8767  	ret := &GoogleCloudMlV1__Version{
  8768  		ServerResponse: googleapi.ServerResponse{
  8769  			Header:         res.Header,
  8770  			HTTPStatusCode: res.StatusCode,
  8771  		},
  8772  	}
  8773  	target := &ret
  8774  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8775  		return nil, err
  8776  	}
  8777  	return ret, nil
  8778  }
  8779  
  8780  type ProjectsOperationsCancelCall struct {
  8781  	s          *Service
  8782  	name       string
  8783  	urlParams_ gensupport.URLParams
  8784  	ctx_       context.Context
  8785  	header_    http.Header
  8786  }
  8787  
  8788  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  8789  // server makes a best effort to cancel the operation, but success is not
  8790  // guaranteed. If the server doesn't support this method, it returns
  8791  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  8792  // other methods to check whether the cancellation succeeded or whether the
  8793  // operation completed despite cancellation. On successful cancellation, the
  8794  // operation is not deleted; instead, it becomes an operation with an
  8795  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  8796  // `Code.CANCELLED`.
  8797  //
  8798  // - name: The name of the operation resource to be cancelled.
  8799  func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
  8800  	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8801  	c.name = name
  8802  	return c
  8803  }
  8804  
  8805  // Fields allows partial responses to be retrieved. See
  8806  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8807  // details.
  8808  func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
  8809  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8810  	return c
  8811  }
  8812  
  8813  // Context sets the context to be used in this call's Do method.
  8814  func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
  8815  	c.ctx_ = ctx
  8816  	return c
  8817  }
  8818  
  8819  // Header returns a http.Header that can be modified by the caller to add
  8820  // headers to the request.
  8821  func (c *ProjectsOperationsCancelCall) Header() http.Header {
  8822  	if c.header_ == nil {
  8823  		c.header_ = make(http.Header)
  8824  	}
  8825  	return c.header_
  8826  }
  8827  
  8828  func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  8829  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8830  	var body io.Reader = nil
  8831  	c.urlParams_.Set("alt", alt)
  8832  	c.urlParams_.Set("prettyPrint", "false")
  8833  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  8834  	urls += "?" + c.urlParams_.Encode()
  8835  	req, err := http.NewRequest("POST", urls, body)
  8836  	if err != nil {
  8837  		return nil, err
  8838  	}
  8839  	req.Header = reqHeaders
  8840  	googleapi.Expand(req.URL, map[string]string{
  8841  		"name": c.name,
  8842  	})
  8843  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8844  }
  8845  
  8846  // Do executes the "ml.projects.operations.cancel" call.
  8847  // Any non-2xx status code is an error. Response headers are in either
  8848  // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was returned
  8849  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8850  // check whether the returned error was because http.StatusNotModified was
  8851  // returned.
  8852  func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  8853  	gensupport.SetOptions(c.urlParams_, opts...)
  8854  	res, err := c.doRequest("json")
  8855  	if res != nil && res.StatusCode == http.StatusNotModified {
  8856  		if res.Body != nil {
  8857  			res.Body.Close()
  8858  		}
  8859  		return nil, gensupport.WrapError(&googleapi.Error{
  8860  			Code:   res.StatusCode,
  8861  			Header: res.Header,
  8862  		})
  8863  	}
  8864  	if err != nil {
  8865  		return nil, err
  8866  	}
  8867  	defer googleapi.CloseBody(res)
  8868  	if err := googleapi.CheckResponse(res); err != nil {
  8869  		return nil, gensupport.WrapError(err)
  8870  	}
  8871  	ret := &GoogleProtobuf__Empty{
  8872  		ServerResponse: googleapi.ServerResponse{
  8873  			Header:         res.Header,
  8874  			HTTPStatusCode: res.StatusCode,
  8875  		},
  8876  	}
  8877  	target := &ret
  8878  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8879  		return nil, err
  8880  	}
  8881  	return ret, nil
  8882  }
  8883  
  8884  type ProjectsOperationsGetCall struct {
  8885  	s            *Service
  8886  	name         string
  8887  	urlParams_   gensupport.URLParams
  8888  	ifNoneMatch_ string
  8889  	ctx_         context.Context
  8890  	header_      http.Header
  8891  }
  8892  
  8893  // Get: Gets the latest state of a long-running operation. Clients can use this
  8894  // method to poll the operation result at intervals as recommended by the API
  8895  // service.
  8896  //
  8897  // - name: The name of the operation resource.
  8898  func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
  8899  	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8900  	c.name = name
  8901  	return c
  8902  }
  8903  
  8904  // Fields allows partial responses to be retrieved. See
  8905  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8906  // details.
  8907  func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
  8908  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8909  	return c
  8910  }
  8911  
  8912  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8913  // object's ETag matches the given value. This is useful for getting updates
  8914  // only after the object has changed since the last request.
  8915  func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
  8916  	c.ifNoneMatch_ = entityTag
  8917  	return c
  8918  }
  8919  
  8920  // Context sets the context to be used in this call's Do method.
  8921  func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
  8922  	c.ctx_ = ctx
  8923  	return c
  8924  }
  8925  
  8926  // Header returns a http.Header that can be modified by the caller to add
  8927  // headers to the request.
  8928  func (c *ProjectsOperationsGetCall) Header() http.Header {
  8929  	if c.header_ == nil {
  8930  		c.header_ = make(http.Header)
  8931  	}
  8932  	return c.header_
  8933  }
  8934  
  8935  func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  8936  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8937  	if c.ifNoneMatch_ != "" {
  8938  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8939  	}
  8940  	var body io.Reader = nil
  8941  	c.urlParams_.Set("alt", alt)
  8942  	c.urlParams_.Set("prettyPrint", "false")
  8943  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8944  	urls += "?" + c.urlParams_.Encode()
  8945  	req, err := http.NewRequest("GET", urls, body)
  8946  	if err != nil {
  8947  		return nil, err
  8948  	}
  8949  	req.Header = reqHeaders
  8950  	googleapi.Expand(req.URL, map[string]string{
  8951  		"name": c.name,
  8952  	})
  8953  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8954  }
  8955  
  8956  // Do executes the "ml.projects.operations.get" call.
  8957  // Any non-2xx status code is an error. Response headers are in either
  8958  // *GoogleLongrunning__Operation.ServerResponse.Header or (if a response was
  8959  // returned at all) in error.(*googleapi.Error).Header. Use
  8960  // googleapi.IsNotModified to check whether the returned error was because
  8961  // http.StatusNotModified was returned.
  8962  func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
  8963  	gensupport.SetOptions(c.urlParams_, opts...)
  8964  	res, err := c.doRequest("json")
  8965  	if res != nil && res.StatusCode == http.StatusNotModified {
  8966  		if res.Body != nil {
  8967  			res.Body.Close()
  8968  		}
  8969  		return nil, gensupport.WrapError(&googleapi.Error{
  8970  			Code:   res.StatusCode,
  8971  			Header: res.Header,
  8972  		})
  8973  	}
  8974  	if err != nil {
  8975  		return nil, err
  8976  	}
  8977  	defer googleapi.CloseBody(res)
  8978  	if err := googleapi.CheckResponse(res); err != nil {
  8979  		return nil, gensupport.WrapError(err)
  8980  	}
  8981  	ret := &GoogleLongrunning__Operation{
  8982  		ServerResponse: googleapi.ServerResponse{
  8983  			Header:         res.Header,
  8984  			HTTPStatusCode: res.StatusCode,
  8985  		},
  8986  	}
  8987  	target := &ret
  8988  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8989  		return nil, err
  8990  	}
  8991  	return ret, nil
  8992  }
  8993  
  8994  type ProjectsOperationsListCall struct {
  8995  	s            *Service
  8996  	name         string
  8997  	urlParams_   gensupport.URLParams
  8998  	ifNoneMatch_ string
  8999  	ctx_         context.Context
  9000  	header_      http.Header
  9001  }
  9002  
  9003  // List: Lists operations that match the specified filter in the request. If
  9004  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  9005  //
  9006  // - name: The name of the operation's parent resource.
  9007  func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
  9008  	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9009  	c.name = name
  9010  	return c
  9011  }
  9012  
  9013  // Filter sets the optional parameter "filter": The standard list filter.
  9014  func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
  9015  	c.urlParams_.Set("filter", filter)
  9016  	return c
  9017  }
  9018  
  9019  // PageSize sets the optional parameter "pageSize": The standard list page
  9020  // size.
  9021  func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
  9022  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9023  	return c
  9024  }
  9025  
  9026  // PageToken sets the optional parameter "pageToken": The standard list page
  9027  // token.
  9028  func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
  9029  	c.urlParams_.Set("pageToken", pageToken)
  9030  	return c
  9031  }
  9032  
  9033  // Fields allows partial responses to be retrieved. See
  9034  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9035  // details.
  9036  func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
  9037  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9038  	return c
  9039  }
  9040  
  9041  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9042  // object's ETag matches the given value. This is useful for getting updates
  9043  // only after the object has changed since the last request.
  9044  func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
  9045  	c.ifNoneMatch_ = entityTag
  9046  	return c
  9047  }
  9048  
  9049  // Context sets the context to be used in this call's Do method.
  9050  func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
  9051  	c.ctx_ = ctx
  9052  	return c
  9053  }
  9054  
  9055  // Header returns a http.Header that can be modified by the caller to add
  9056  // headers to the request.
  9057  func (c *ProjectsOperationsListCall) Header() http.Header {
  9058  	if c.header_ == nil {
  9059  		c.header_ = make(http.Header)
  9060  	}
  9061  	return c.header_
  9062  }
  9063  
  9064  func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  9065  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9066  	if c.ifNoneMatch_ != "" {
  9067  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9068  	}
  9069  	var body io.Reader = nil
  9070  	c.urlParams_.Set("alt", alt)
  9071  	c.urlParams_.Set("prettyPrint", "false")
  9072  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  9073  	urls += "?" + c.urlParams_.Encode()
  9074  	req, err := http.NewRequest("GET", urls, body)
  9075  	if err != nil {
  9076  		return nil, err
  9077  	}
  9078  	req.Header = reqHeaders
  9079  	googleapi.Expand(req.URL, map[string]string{
  9080  		"name": c.name,
  9081  	})
  9082  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9083  }
  9084  
  9085  // Do executes the "ml.projects.operations.list" call.
  9086  // Any non-2xx status code is an error. Response headers are in either
  9087  // *GoogleLongrunning__ListOperationsResponse.ServerResponse.Header or (if a
  9088  // response was returned at all) in error.(*googleapi.Error).Header. Use
  9089  // googleapi.IsNotModified to check whether the returned error was because
  9090  // http.StatusNotModified was returned.
  9091  func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__ListOperationsResponse, error) {
  9092  	gensupport.SetOptions(c.urlParams_, opts...)
  9093  	res, err := c.doRequest("json")
  9094  	if res != nil && res.StatusCode == http.StatusNotModified {
  9095  		if res.Body != nil {
  9096  			res.Body.Close()
  9097  		}
  9098  		return nil, gensupport.WrapError(&googleapi.Error{
  9099  			Code:   res.StatusCode,
  9100  			Header: res.Header,
  9101  		})
  9102  	}
  9103  	if err != nil {
  9104  		return nil, err
  9105  	}
  9106  	defer googleapi.CloseBody(res)
  9107  	if err := googleapi.CheckResponse(res); err != nil {
  9108  		return nil, gensupport.WrapError(err)
  9109  	}
  9110  	ret := &GoogleLongrunning__ListOperationsResponse{
  9111  		ServerResponse: googleapi.ServerResponse{
  9112  			Header:         res.Header,
  9113  			HTTPStatusCode: res.StatusCode,
  9114  		},
  9115  	}
  9116  	target := &ret
  9117  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9118  		return nil, err
  9119  	}
  9120  	return ret, nil
  9121  }
  9122  
  9123  // Pages invokes f for each page of results.
  9124  // A non-nil error returned from f will halt the iteration.
  9125  // The provided context supersedes any context provided to the Context method.
  9126  func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunning__ListOperationsResponse) error) error {
  9127  	c.ctx_ = ctx
  9128  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9129  	for {
  9130  		x, err := c.Do()
  9131  		if err != nil {
  9132  			return err
  9133  		}
  9134  		if err := f(x); err != nil {
  9135  			return err
  9136  		}
  9137  		if x.NextPageToken == "" {
  9138  			return nil
  9139  		}
  9140  		c.PageToken(x.NextPageToken)
  9141  	}
  9142  }
  9143  

View as plain text